Changeset 4640 in subversion
- Timestamp:
- Apr 11, 2011 7:00:30 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_shared.inc
r4639 r4640 181 181 return floatval($bytes); 182 182 } 183 183 184 184 /** 185 185 * Create a human readable string for a number of bytes … … 190 190 function show_bytes($bytes) 191 191 { 192 if ($bytes > 1073741824)192 if ($bytes >= 1073741824) 193 193 { 194 194 $gb = $bytes/1073741824; 195 195 $str = sprintf($gb>=10 ? "%d " : "%.1f ", $gb) . rcube_label('GB'); 196 196 } 197 else if ($bytes > 1048576)197 else if ($bytes >= 1048576) 198 198 { 199 199 $mb = $bytes/1048576; 200 200 $str = sprintf($mb>=10 ? "%d " : "%.1f ", $mb) . rcube_label('MB'); 201 201 } 202 else if ($bytes > 1024)202 else if ($bytes >= 1024) 203 203 $str = sprintf("%d ", round($bytes/1024)) . rcube_label('KB'); 204 204 else … … 207 207 return $str; 208 208 } 209 210 209 211 210 /**
Note: See TracChangeset
for help on using the changeset viewer.
