From b9efeba972c82da706756eee51a0682018663586 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 27 Aug 2008 15:31:48 -0400 Subject: humansize moved to filecheck It's not used there, but it makes sense to keep it there as it's the inverse of parsesize. --- IkiWiki/Plugin/attachment.pm | 2 +- IkiWiki/Plugin/filecheck.pm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3