X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/02b9f69ba5da59cca9ff198b731d63d643fff4db..a651a28e69f429f932e092b9ce67f5744a508000:/IkiWiki/Plugin/inline.pm diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index fc1dfdac3..9cf781a25 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -137,6 +137,14 @@ sub preprocess_inline (@) { #{{{ exists $params{rootpage} ? $params{rootpage} : $params{page}); $formtemplate->param(rssurl => $rssurl) if $feeds && $rss; $formtemplate->param(atomurl => $atomurl) if $feeds && $atom; + if (exists $params{postformtext}) { + $formtemplate->param(postformtext => + $params{postformtext}); + } + else { + $formtemplate->param(postformtext => + gettext("Add a new post titled:")); + } $ret.=$formtemplate->output; } elsif ($feeds) { @@ -266,8 +274,6 @@ sub get_inline_content ($$) { #{{{ sub date_822 ($) { #{{{ my $time=shift; - eval q{use POSIX}; - error($@) if $@; 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)); @@ -278,8 +284,6 @@ sub date_822 ($) { #{{{ sub date_3339 ($) { #{{{ my $time=shift; - eval q{use POSIX}; - error($@) if $@; 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)); @@ -401,7 +405,6 @@ sub pingurl (@) { #{{{ defined(my $pid = fork) or error("Can't fork: $!"); return if $pid; chdir '/'; - eval q{use POSIX 'setsid'}; setsid() or error("Can't start a new session: $!"); open STDIN, '/dev/null'; open STDOUT, '>/dev/null';