X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/b86f9b8409bb55162dfc7d4d13ea3ee577cce525..264a82a435b9ce5560f4bbea7b53270c53ef5720:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 1c8783187..ad4d26741 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 ($) { #{{{ @@ -563,7 +566,7 @@ sub htmllink ($$$;@) { #{{{ if (! $destsources{$bestlink}) { return $linktext unless length $config{cgiurl}; - return " "create", page => pagetitle(lc($link), 1), @@ -826,6 +829,11 @@ sub enable_commit_hook () { #{{{ } #}}} sub loadindex () { #{{{ + %oldrenderedfiles=%pagectime=(); + if (! $config{rebuild}) { + %pagesources=%pagemtime=%oldlinks=%links=%depends= + %destsources=%renderedfiles=%pagecase=(); + } open (my $in, "<", "$config{wikistatedir}/index") || return; while (<$in>) { $_=possibly_foolish_untaint($_);