Changeset 144 for trunk


Ignore:
Timestamp:
2006-09-08T14:12:30+02:00 (9 years ago)
Author:
moo
Message:

compat size() func

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/xcache.php

    r142 r144  
    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.