summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-11-05 21:39:11 +0100
committerGravatar GitHub <noreply@github.com> 2016-11-05 21:39:11 +0100
commit8e55aa98034e177d3b8251234100782150f743e8 (patch)
tree24433cc1081704dd54e4573184eca29c22d64150 /cli
parente66247f01271eb96ac96aad6c0631d9f544ce80c (diff)
parent1f37424c09a2b0e6769f8250b65f3652f4e80f14 (diff)
Merge pull request #1359 from Alkarex/units-policy
CLI: IEC prefix (binary) for units
Diffstat (limited to 'cli')
-rwxr-xr-x[-rw-r--r--]cli/user-info.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/cli/user-info.php b/cli/user-info.php
index 5b26ecb15..dd38e6c7f 100644..100755
--- a/cli/user-info.php
+++ b/cli/user-info.php
@@ -2,14 +2,6 @@
<?php
require('_cli.php');
-function formatSize($bytes)
-{//http://www.php.net/manual/function.disk-free-space.php#103382
- $si_prefix = array('', 'k', 'M', 'G', 'T', 'P');
- $i = min((int)log($bytes, 1024), count($si_prefix) - 1);
- return ($i <= 0) ? $bytes.'B' :
- round($bytes / pow(1024, $i), 2).' '.$si_prefix[$i].'B';
-}
-
$options = getopt('h', array(
'user:',
));
@@ -31,7 +23,7 @@ foreach ($users as $username) {
echo
$username, "\t",
date('c', FreshRSS_UserDAO::mtime($username)), "\t",
- formatSize($entryDAO->size()), "\t",
+ format_bytes($entryDAO->size()), "\t",
"\n";
} else {
echo