X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/912521ef0711204965aa2319d41c7741bd3f4f4c..a6e1274f468477cceb9b118aa5b49bd74e9385c4:/IkiWiki/Plugin/inline.pm?ds=inline diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index eb21959f9..13ff0aa19 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -5,7 +5,6 @@ package IkiWiki::Plugin::inline; use warnings; use strict; use IkiWiki 1.00; -use IkiWiki::Render; # for displaytime use URI; sub import { #{{{ @@ -157,7 +156,9 @@ sub preprocess_inline (@) { #{{{ if ($actions) { my $file = $pagesources{$page}; my $type = pagetype($file); - if ($config{discussion}) { + if ($config{discussion} && + $page !~ /.*\/discussion$/ && + (length $config{cgiurl} || exists $links{$page."/".gettext("discussion")})) { $template->param(have_actions => 1); $template->param(discussionlink => htmllink($page, $params{page}, "Discussion", 1, 1)); } @@ -236,7 +237,7 @@ sub date_822 ($) { #{{{ eval q{use POSIX}; error($@) if $@; - my $lc_time= POSIX::setlocale(&POSIX::LC_TIME); + my $lc_time=POSIX::setlocale(&POSIX::LC_TIME); POSIX::setlocale(&POSIX::LC_TIME, "C"); my $ret=POSIX::strftime("%a, %d %b %Y %H:%M:%S %z", localtime($time)); POSIX::setlocale(&POSIX::LC_TIME, $lc_time); @@ -248,7 +249,7 @@ sub date_3339 ($) { #{{{ eval q{use POSIX}; error($@) if $@; - my $lc_time= POSIX::setlocale(&POSIX::LC_TIME); + my $lc_time=POSIX::setlocale(&POSIX::LC_TIME); POSIX::setlocale(&POSIX::LC_TIME, "C"); my $ret=POSIX::strftime("%Y-%m-%dT%H:%M:%SZ", localtime($time)); POSIX::setlocale(&POSIX::LC_TIME, $lc_time);