aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/inline.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-09-14 13:50:34 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-09-14 13:50:34 -0400
commitee94407891dd648a46be56c2cc62b21cca690de9 (patch)
treec5594582faaebce61ba2180b35158eb8916b31c7 /IkiWiki/Plugin/inline.pm
parent1e4c9e6733b0566d472107d27d64962f7a8f01e3 (diff)
downloadikiwiki-ee94407891dd648a46be56c2cc62b21cca690de9.tar
ikiwiki-ee94407891dd648a46be56c2cc62b21cca690de9.tar.gz
rootpage is not a pagespec
So ./posts won't be interpreted right. Just "posts" should do, I think.
Diffstat (limited to 'IkiWiki/Plugin/inline.pm')
-rw-r--r--IkiWiki/Plugin/inline.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 02c9cbdc0..8efef3fc8 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -263,8 +263,14 @@ sub preprocess_inline (@) { #{{{
# Add a blog post form, with feed buttons.
my $formtemplate=template("blogpost.tmpl", blind_cache => 1);
$formtemplate->param(cgiurl => $config{cgiurl});
- $formtemplate->param(rootpage =>
- exists $params{rootpage} ? $params{rootpage} : $params{page});
+ my $rootpage;
+ if (exists $params{rootpage}) {
+ $rootpage=bestlink($params{page}, $params{rootpage});
+ }
+ else {
+ $rootpage=$params{page};
+ }
+ $formtemplate->param(rootpage => $rootpage);
$formtemplate->param(rssurl => $rssurl) if $feeds && $rss;
$formtemplate->param(atomurl => $atomurl) if $feeds && $atom;
if (exists $params{postformtext}) {