]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
web commit by intrigeri: bug submission
[ikiwiki.git] / IkiWiki.pm
index 6e03121c078242c9ef35d2d050224b7f3d79c3ff..f1a5f8058ec551667027e1af755848f7c11655aa 100644 (file)
@@ -337,7 +337,7 @@ sub readfile ($;$$) { #{{{
        return $ret;
 } #}}}
 
-sub prep_writefile ($$) {
+sub prep_writefile ($$) { #{{{
        my $file=shift;
        my $destdir=shift;
        
@@ -361,7 +361,7 @@ sub prep_writefile ($$) {
        }
 
        return 1;
-}
+} #}}}
 
 sub writefile ($$$;$$) { #{{{
        my $file=shift; # can include subdirs
@@ -533,7 +533,7 @@ sub displaytime ($;$) { #{{{
        return decode_utf8(POSIX::strftime($format, localtime($time)));
 } #}}}
 
-sub beautify_url ($) { #{{{
+sub beautify_urlpath ($) { #{{{
        my $url=shift;
 
        if ($config{usedirs}) {
@@ -554,7 +554,7 @@ sub urlto ($$) { #{{{
        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}) {
@@ -563,7 +563,7 @@ sub urlto ($$) { #{{{
 
        my $link = abs2rel($to, dirname(htmlpage($from)));
 
-       return beautify_url($link);
+       return beautify_urlpath($link);
 } #}}}
 
 sub htmllink ($$$;@) { #{{{
@@ -610,7 +610,7 @@ sub htmllink ($$$;@) { #{{{
        }
        
        $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\" />";
@@ -1202,6 +1202,12 @@ sub gettext { #{{{
        }
 } #}}}
 
+sub yesno ($) { #{{{
+       my $val=shift;
+
+       return (defined $val && lc($val) eq gettext("yes"));
+} #}}}
+
 sub pagespec_merge ($$) { #{{{
        my $a=shift;
        my $b=shift;