Changeset ab1bf16 in git


Ignore:
Timestamp:
2006-09-08T12:12:30Z (13 years ago)
Author:
Xuefer <xuefer@…>
Branches:
1.1, 1.2, 1.3, 3.0, 3.1, 3.2, master, trunk
Children:
cf59070
Parents:
9c3e3d9
Message:

compat size() func

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@144 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/xcache.php

    rb980b78 rab1bf16  
    4141}
    4242
    43 function size($size, $suffix = '', $precision = 2)
     43function size($size)
    4444{
    4545    $size = (int) $size;
    4646    if ($size < 1024)
    47         return number_format($size, $precision) . ' ' . $suffix;
     47        return number_format($size, 2) . ' b';
    4848
    4949    if ($size < 1048576)
    50         return number_format($size / 1024, $precision) . ' K' . $suffix;
    51 
    52     return number_format($size / 1048576, $precision) . ' M' . $suffix;
     50        return number_format($size / 1024, 2) . ' K';
     51
     52    return number_format($size / 1048576, 2) . ' M';
    5353}
    5454
Note: See TracChangeset for help on using the changeset viewer.