comparison index.php @ 35:21132c7b6aaa

Only 1 is singular.
author edogawaconan <me@myconan.net>
date Thu, 13 Nov 2014 15:46:42 +0900
parents f761177dc1d4
children 9a2e0b2a2d1d
comparison
equal deleted inserted replaced
34:f761177dc1d4 35:21132c7b6aaa
47 function human_size($size) { 47 function human_size($size) {
48 $thousand_units = array("ko", "Mo", "Go", "To", "Po"); 48 $thousand_units = array("ko", "Mo", "Go", "To", "Po");
49 49
50 $return_format = "%d %s"; 50 $return_format = "%d %s";
51 51
52 if ($size <= 1) { 52 if ($size === 1) {
53 $return_unit = "octet"; 53 $return_unit = "octet";
54 } elseif ($size < 1000) { 54 } elseif ($size < 1000) {
55 $return_unit = "octets"; 55 $return_unit = "octets";
56 } else { 56 } else {
57 $size /= 1000; 57 $size /= 1000;