Changeset 338
- Timestamp:
- Aug 29, 2008 8:30:19 AM (16 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Auth_SQL.inc.php
r334 r338 960 960 function inClearanceZone($security_zone, $user_type='') 961 961 { 962 return true;962 // return true; /// WTF? 963 963 $zone_members = preg_split('/,\s*/', $security_zone); 964 964 $user_type = empty($user_type) ? $this->get('user_type') : $user_type; … … 985 985 $app =& App::getInstance(); 986 986 987 return true;987 // return true; /// WTF? 988 988 $zone_members = preg_split('/,\s*/', $security_zone); 989 989 -
trunk/lib/Utilities.inc.php
r336 r338 266 266 case 'end' : 267 267 return preg_replace(array(sprintf('/^(.{%s}).{4,}$/sU', $part1 + $part2), '/\s*\.{3,}\s*/sU'), array('$1' . $delim, $delim), $str); 268 break; 269 } 270 } 271 272 /** 273 * Return a human readable filesize.274 * 275 * @param int $size Size 268 break; 269 } 270 } 271 272 /** 273 * Return a human readable disk space measurement. Input value measured in bytes. 274 * 275 * @param int $size Size in bytes. 276 276 * @param int $unit The maximum unit 277 277 * @param int $format The return string format … … 279 279 * @version 1.1.0 280 280 */ 281 function humanFileSize($size, $format='%01.2f %s', $max_unit=null )281 function humanFileSize($size, $format='%01.2f %s', $max_unit=null, $multiplier=1024) 282 282 { 283 283 // Units … … 293 293 // Loop 294 294 $i = 0; 295 while ($max_unit != $i && $size >= 1024&& $i < $ii) {296 $size /= 1024;295 while ($max_unit != $i && $size >= $multiplier && $i < $ii) { 296 $size /= $multiplier; 297 297 $i++; 298 298 }
Note: See TracChangeset
for help on using the changeset viewer.