]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
inline: Fix handling of rootpage that doesn't exist.
authorJoey Hess <joey@kodama.kitenet.net>
Wed, 1 Oct 2008 21:29:03 +0000 (17:29 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Wed, 1 Oct 2008 21:29:03 +0000 (17:29 -0400)
It makes sense to use bestlink to determine which page rootpage refers to,
but if no page matches, just use the raw value.

IkiWiki/Plugin/inline.pm
debian/changelog
doc/bugs/inline_from_field_empty_if_rootpage_doesn__39__t_exist.mdwn

index e0f33ef315e8a1539c3e5c4da1bb4fa03d419d65..5d2ef5681b3d6ab84f16932f8e5efdbc030345a3 100644 (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};
index 1320e4f413855402c17f8b421401e1d4d2c9716b..6c6eea205dd061dfe00c8cda79830d5056a047a6 100644 (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
 
index 995f0836ff131de14849cef76cd91c948d58d298..61aeff244ca205da5f5224ed5d1cf68a6bf09aaf 100644 (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]]