X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2697ac99cf3bbc65f2183e07f688c1d93e2047f0..9dbbbd0efacb5acebaed2d0ee74d1c185b27394a:/IkiWiki/Plugin/inline.pm diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index bb160ac4d..53b051816 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -14,7 +14,7 @@ my %page_numfeeds; sub import { #{{{ hook(type => "getopt", id => "inline", call => \&getopt); hook(type => "checkconfig", id => "inline", call => \&checkconfig); - hook(type => "sessioncgi", id => "skeleton", call => \&sessioncgi); + hook(type => "sessioncgi", id => "inline", call => \&sessioncgi); hook(type => "preprocess", id => "inline", call => \&IkiWiki::preprocess_inline); hook(type => "pagetemplate", id => "inline", @@ -161,16 +161,20 @@ sub preprocess_inline (@) { #{{{ } else { if (exists $page_numfeeds{$params{destpage}}) { - $feednum=$knownfeeds{$feedid}=++$page_numfeeds{$params{destpage}}; + if ($feeds) { + $feednum=$knownfeeds{$feedid}=++$page_numfeeds{$params{destpage}}; + } } else { $feednum=$knownfeeds{$feedid}=""; - $page_numfeeds{$params{destpage}}=1; + if ($feeds) { + $page_numfeeds{$params{destpage}}=1; + } } } - my $rssurl=basename(rsspage($params{destpage}).$feednum); - my $atomurl=basename(atompage($params{destpage}).$feednum); + my $rssurl=basename(rsspage($params{destpage}).$feednum) if $feeds && $rss; + my $atomurl=basename(atompage($params{destpage}).$feednum) if $feeds && $atom; my $ret=""; if ($config{cgiurl} && (exists $params{rootpage} || @@ -221,7 +225,7 @@ 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})); + $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat})); if ($actions) { my $file = $pagesources{$page};