inline: Fix handling of rootpage that doesn't exist.

It makes sense to use bestlink to determine which page rootpage refers to,
but if no page matches, just use the raw value.
master
Joey Hess 2008-10-01 17:29:03 -04:00
parent f2b1a918b0
commit bf386e22f5
3 changed files with 7 additions and 0 deletions

View File

@ -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};

1
debian/changelog vendored
View File

@ -32,6 +32,7 @@ ikiwiki (2.66) UNRELEASED; urgency=low
(Sponsored by The TOVA Company.)
* httpauth: Document that ikiwiki.cgi has to be in a directory subject to
authentication. Closes: #500524
* inline: Fix handling of rootpage that doesn't exist.
-- Joey Hess <joeyh@debian.org> Thu, 25 Sep 2008 13:45:55 -0400

View File

@ -15,3 +15,6 @@ When I create posts (touch posts.mdwn), I get the following in index.html
<input type="hidden" name="subpage" value="1" />
Bug?
> Yes, thanks for reminding me I need to do something about that... [[done]]
> --[[Joey]]