aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoshtriplett <joshtriplett@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-27 09:11:14 +0000
committerjoshtriplett <joshtriplett@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-27 09:11:14 +0000
commitbf006f771b77dc37c525e4ee1d26e212871212c6 (patch)
tree636925c3b44fc202d083816da7725ba1c36b4f86
parent8fa8bd0adb034f05131648dcb7b14011672649e8 (diff)
downloadikiwiki-bf006f771b77dc37c525e4ee1d26e212871212c6.tar
ikiwiki-bf006f771b77dc37c525e4ee1d26e212871212c6.tar.gz
* Fix bestlink to use pagecase for pages in userdir, to support pages
with non-lowercase filenames.
-rw-r--r--IkiWiki.pm10
-rw-r--r--debian/changelog6
2 files changed, 13 insertions, 3 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 73280abf1..212b0de08 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -362,8 +362,14 @@ sub bestlink ($$) { #{{{
}
} while $cwd=~s!/?[^/]+$!!;
- if (length $config{userdir} && exists $links{"$config{userdir}/".lc($link)}) {
- return "$config{userdir}/".lc($link);
+ if (length $config{userdir}) {
+ my $l = "$config{userdir}/".lc($link);
+ if (exists $links{$l}) {
+ return $l;
+ }
+ elsif (exists $pagecase{lc $l}) {
+ return $pagecase{lc $l};
+ }
}
#print STDERR "warning: page $page, broken link: $link\n";
diff --git a/debian/changelog b/debian/changelog
index 867934f24..b634bea3b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -35,7 +35,11 @@ ikiwiki (1.51) UNRELEASED; urgency=low
* Add testpagespec plugin, which might be useful to see why a pagespec isn't
working as desired.
- -- Joey Hess <joeyh@debian.org> Fri, 27 Apr 2007 03:41:52 -0400
+ [ Josh Triplett ]
+ * Fix bestlink to use pagecase for pages in userdir, to support pages
+ with non-lowercase filenames.
+
+ -- Josh Triplett <josh@freedesktop.org> Fri, 27 Apr 2007 02:08:58 -0700
ikiwiki (1.50) unstable; urgency=low