recentchanges: Fix redirects to non-page files.
authorJoey Hess <joey@kodama.kitenet.net>
Thu, 25 Sep 2008 17:46:12 +0000 (13:46 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 25 Sep 2008 17:46:12 +0000 (13:46 -0400)
IkiWiki/Plugin/recentchanges.pm
debian/changelog

index 7bc48297455933156a62c4be363f835e4d63944e..37e45a05af65109bedb626eb56d6de8ae20ac3d1 100644 (file)
@@ -103,7 +103,12 @@ sub cgi ($) { #{{{
                                "</p>");
                }
                else {
-                       IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_urlpath("/".htmlpage($link)));
+                       if (defined pagetype($link)) {
+                               IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_urlpath("/".htmlpage($link)));
+                       }
+                       else {
+                               IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_urlpath("/".$link));
+                       }
                }
 
                exit;
index e9adfcac034fc60c769a15847964dda330effb25..f3f30dc21da5c68d962fc096edd8fc68c503bc69 100644 (file)
@@ -1,3 +1,9 @@
+ikiwiki (2.66) UNRELEASED; urgency=low
+
+  * recentchanges: Fix redirects to non-page files. 
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 25 Sep 2008 13:45:55 -0400
+
 ikiwiki (2.65) unstable; urgency=low
 
   * aggregate: Expire excess or old items on the same pass that adds them,