rename beautify_url to stress it only works on the path component
authorJoey Hess <joey@kodama.kitenet.net>
Fri, 11 Jul 2008 14:33:41 +0000 (10:33 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Fri, 11 Jul 2008 14:33:41 +0000 (10:33 -0400)
IkiWiki.pm
IkiWiki/Plugin/recentchanges.pm

index 6e03121c078242c9ef35d2d050224b7f3d79c3ff..c1d9119e840662f449d0cd257c0ca1c14df48653 100644 (file)
@@ -533,7 +533,7 @@ sub displaytime ($;$) { #{{{
        return decode_utf8(POSIX::strftime($format, localtime($time)));
 } #}}}
 
        return decode_utf8(POSIX::strftime($format, localtime($time)));
 } #}}}
 
-sub beautify_url ($) { #{{{
+sub beautify_urlpath ($) { #{{{
        my $url=shift;
 
        if ($config{usedirs}) {
        my $url=shift;
 
        if ($config{usedirs}) {
@@ -554,7 +554,7 @@ sub urlto ($$) { #{{{
        my $from=shift;
 
        if (! length $to) {
        my $from=shift;
 
        if (! length $to) {
-               return beautify_url(baseurl($from)."index.$config{htmlext}");
+               return beautify_urlpath(baseurl($from)."index.$config{htmlext}");
        }
 
        if (! $destsources{$to}) {
        }
 
        if (! $destsources{$to}) {
@@ -563,7 +563,7 @@ sub urlto ($$) { #{{{
 
        my $link = abs2rel($to, dirname(htmlpage($from)));
 
 
        my $link = abs2rel($to, dirname(htmlpage($from)));
 
-       return beautify_url($link);
+       return beautify_urlpath($link);
 } #}}}
 
 sub htmllink ($$$;@) { #{{{
 } #}}}
 
 sub htmllink ($$$;@) { #{{{
@@ -610,7 +610,7 @@ sub htmllink ($$$;@) { #{{{
        }
        
        $bestlink=abs2rel($bestlink, dirname(htmlpage($page)));
        }
        
        $bestlink=abs2rel($bestlink, dirname(htmlpage($page)));
-       $bestlink=beautify_url($bestlink);
+       $bestlink=beautify_urlpath($bestlink);
        
        if (! $opts{noimageinline} && isinlinableimage($bestlink)) {
                return "<img src=\"$bestlink\" alt=\"$linktext\" />";
        
        if (! $opts{noimageinline} && isinlinableimage($bestlink)) {
                return "<img src=\"$bestlink\" alt=\"$linktext\" />";
index bc069fbf258eb8669b01c0b930e8cb8cb0fdbb70..8383fb72a12e19c8d92627956efc154855ff57e5 100644 (file)
@@ -80,7 +80,7 @@ sub cgi ($) { #{{{
                                "</p>");
                }
                else {
                                "</p>");
                }
                else {
-                       IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_url("/".htmlpage($link)));
+                       IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_urlpath("/".htmlpage($link)));
                }
 
                exit;
                }
 
                exit;