X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/3945473f8a0284066c8751940299fa9153efd0a7..e79eac82b0b6b8769c72e0ebeeac278718ae1c58:/IkiWiki.pm?ds=sidebyside diff --git a/IkiWiki.pm b/IkiWiki.pm index 7a189cc8b..eb003a1fb 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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 " "create", page => pagetitle(lc($link), 1),