aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-10-01 17:29:03 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-10-01 17:29:03 -0400
commitbf386e22f5fb65999c38668cb011bdf4ae26d72c (patch)
tree7bb0c075e343e211c540b6af51658b98776ab502
parentf2b1a918b022863c6baf010bee3e57b5f08a794f (diff)
downloadikiwiki-bf386e22f5fb65999c38668cb011bdf4ae26d72c.tar
ikiwiki-bf386e22f5fb65999c38668cb011bdf4ae26d72c.tar.gz
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.
-rw-r--r--IkiWiki/Plugin/inline.pm3
-rw-r--r--debian/changelog1
-rw-r--r--doc/bugs/inline_from_field_empty_if_rootpage_doesn__39__t_exist.mdwn3
3 files changed, 7 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index e0f33ef31..5d2ef5681 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -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};
diff --git a/debian/changelog b/debian/changelog
index 1320e4f41..6c6eea205 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/doc/bugs/inline_from_field_empty_if_rootpage_doesn__39__t_exist.mdwn b/doc/bugs/inline_from_field_empty_if_rootpage_doesn__39__t_exist.mdwn
index 995f0836f..61aeff244 100644
--- a/doc/bugs/inline_from_field_empty_if_rootpage_doesn__39__t_exist.mdwn
+++ b/doc/bugs/inline_from_field_empty_if_rootpage_doesn__39__t_exist.mdwn
@@ -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]]