]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge pull request #4339 from owncloud/mimetype-defaults
authorThomas Müller <thomas.mueller@tmit.eu>
Sat, 17 Aug 2013 15:42:49 +0000 (08:42 -0700)
committerThomas Müller <thomas.mueller@tmit.eu>
Sat, 17 Aug 2013 15:42:49 +0000 (08:42 -0700)
Add the option to provide templates for newly created files

1  2 
lib/helper.php

diff --cc lib/helper.php
index 31f0f1698d55c992c58ee01bbe4c61420733a241,8b64baaea7275a993f98efcdfda23713c0a84bc0..51165193623614cb01bc27160597a0ccfefb20e8
@@@ -229,20 -226,20 +226,20 @@@ class OC_Helper 
         *
         * 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";
                }