From: Joey Hess Date: Wed, 27 Aug 2008 19:31:48 +0000 (-0400) Subject: humansize moved to filecheck X-Git-Tag: 2.62~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b9efeba972c82da706756eee51a0682018663586;p=ikiwiki.git humansize moved to filecheck It's not used there, but it makes sense to keep it there as it's the inverse of parsesize. --- diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index f1f792a5a..999fa4a86 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -277,7 +277,7 @@ sub attachment_list ($) { #{{{ push @ret, { "field-select" => '', link => htmllink($page, $page, $f, noimageinline => 1), - size => humansize((stat(_))[7]), + size => IkiWiki::Plugin::filecheck::humansize((stat(_))[7]), mtime => displaytime($IkiWiki::pagemtime{$f}), mtime_raw => $IkiWiki::pagemtime{$f}, }; diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm index 6f71be301..1855a8b48 100644 --- a/IkiWiki/Plugin/filecheck.pm +++ b/IkiWiki/Plugin/filecheck.pm @@ -53,6 +53,7 @@ sub parsesize ($) { #{{{ return $base; } #}}} +# This is provided for other plugins that want to convert back the other way. sub humansize ($) { #{{{ my $size=shift;