]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki.pm
broken link :-)
[git.ikiwiki.info.git] / IkiWiki.pm
index 7a189cc8b282ac889ed8dd37ae71394e0fdafec3..eb003a1fb9992e940dec64d2a315cca4260307c2 100644 (file)
@@ -498,13 +498,16 @@ sub abs2rel ($$) { #{{{
        return $ret;
 } #}}}
 
-sub displaytime ($) { #{{{
+sub displaytime ($;$) { #{{{
        my $time=shift;
+       my $format=shift;
+       if (! defined $format) {
+               $format=$config{timeformat};
+       }
 
        # strftime doesn't know about encodings, so make sure
        # its output is properly treated as utf8
-       return decode_utf8(POSIX::strftime(
-                       $config{timeformat}, localtime($time)));
+       return decode_utf8(POSIX::strftime($format, localtime($time)));
 } #}}}
 
 sub beautify_url ($) { #{{{
@@ -538,6 +541,7 @@ sub htmllink ($$$;@) { #{{{
        my $page=shift; # the page that will contain the link (different for inline)
        my $link=shift;
        my %opts=@_;
+       $link=~s/\/$//;
 
        my $bestlink;
        if (! $opts{forcesubpage}) {
@@ -563,7 +567,7 @@ sub htmllink ($$$;@) { #{{{
 
                if (! $destsources{$bestlink}) {
                        return $linktext unless length $config{cgiurl};
-                       return "<span><a href=\"".
+                       return "<span class=\"createlink\"><a href=\"".
                                cgiurl(
                                        do => "create",
                                        page => pagetitle(lc($link), 1),