humansize moved to filecheck
authorJoey Hess <joey@kodama.kitenet.net>
Wed, 27 Aug 2008 19:31:48 +0000 (15:31 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Wed, 27 Aug 2008 19:31:48 +0000 (15:31 -0400)
It's not used there, but it makes sense to keep it there as it's the
inverse of parsesize.

IkiWiki/Plugin/attachment.pm
IkiWiki/Plugin/filecheck.pm

index f1f792a5a56ffc4cdd5ec4547d614ddf98570de2..999fa4a8609c1b9f48702b3f6132e6d44a87cf71 100644 (file)
@@ -277,7 +277,7 @@ sub attachment_list ($) { #{{{
                        push @ret, {
                                "field-select" => '<input type="checkbox" name="attachment_select" value="'.$f.'" />',
                                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},
                        };
index 6f71be3015489712d57a88a3eaaf9bbef3609403..1855a8b48720baece395eeb06b4f2e1f84d701e4 100644 (file)
@@ -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;