Add the option to provide templates for newly created files
*
* Makes 2048 to 2 kB.
*/
- public static function humanFileSize( $bytes ) {
- if( $bytes < 0 ) {
+ public static function humanFileSize($bytes) {
+ if ($bytes < 0) {
$l = OC_L10N::get('lib');
- return $l->t("couldn't be determined");
+ return "?";
}
- if( $bytes < 1024 ) {
+ if ($bytes < 1024) {
return "$bytes B";
}
- $bytes = round( $bytes / 1024, 1 );
- if( $bytes < 1024 ) {
+ $bytes = round($bytes / 1024, 1);
+ if ($bytes < 1024) {
return "$bytes kB";
}
- $bytes = round( $bytes / 1024, 1 );
- if( $bytes < 1024 ) {
+ $bytes = round($bytes / 1024, 1);
+ if ($bytes < 1024) {
return "$bytes MB";
}