X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ee94407891dd648a46be56c2cc62b21cca690de9..a28559798ad8c60e79fe80f109dd8e63204cd208:/IkiWiki/Plugin/inline.pm?ds=inline
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 8efef3fc8..536d7cd02 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -114,12 +114,12 @@ sub format (@) { #{{{
return $params{content};
} #}}}
-sub sessioncgi () { #{{{
+sub sessioncgi ($$) { #{{{
my $q=shift;
my $session=shift;
if ($q->param('do') eq 'blog') {
- my $page=IkiWiki::titlepage(decode_utf8($q->param('title')));
+ my $page=titlepage(decode_utf8($q->param('title')));
$page=~s/(\/)/"__".ord($1)."__"/eg; # don't create subdirs
# if the page already exists, munge it to be unique
my $from=$q->param('from');
@@ -266,6 +266,9 @@ sub preprocess_inline (@) { #{{{
my $rootpage;
if (exists $params{rootpage}) {
$rootpage=bestlink($params{page}, $params{rootpage});
+ if (!length $rootpage) {
+ $rootpage=$params{rootpage};
+ }
}
else {
$rootpage=$params{page};
@@ -313,6 +316,9 @@ sub preprocess_inline (@) { #{{{
$template->param(pageurl => urlto(bestlink($params{page}, $page), $params{destpage}));
$template->param(title => pagetitle(basename($page)));
$template->param(ctime => displaytime($pagectime{$page}, $params{timeformat}));
+ $template->param(ctime_raw => scalar localtime($pagectime{$page}));
+ $template->param(mtime => displaytime($pagemtime{$page}, $params{timeformat}));
+ $template->param(mtime_raw => scalar localtime($pagemtime{$page}));
$template->param(first => 1) if $page eq $list[0];
$template->param(last => 1) if $page eq $list[$#list];
@@ -372,7 +378,7 @@ sub preprocess_inline (@) { #{{{
genfeed("rss",
$config{url}."/".$rssp, $desc, $params{guid}, $params{destpage}, @feedlist));
$toping{$params{destpage}}=1 unless $config{rebuild};
- $feedlinks{$params{destpage}}=qq{};
+ $feedlinks{$params{destpage}}=qq{};
}
}
if ($atom) {
@@ -382,7 +388,7 @@ sub preprocess_inline (@) { #{{{
writefile($atomp, $config{destdir},
genfeed("atom", $config{url}."/".$atomp, $desc, $params{guid}, $params{destpage}, @feedlist));
$toping{$params{destpage}}=1 unless $config{rebuild};
- $feedlinks{$params{destpage}}=qq{};
+ $feedlinks{$params{destpage}}=qq{};
}
}
}