]> source.dussan.org Git - nextcloud-server.git/commitdiff
storage information is path specific
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 26 Aug 2013 22:59:58 +0000 (00:59 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 26 Aug 2013 22:59:58 +0000 (00:59 +0200)
apps/files/index.php
apps/files/lib/helper.php
lib/helper.php
settings/personal.php

index 94c792303da747a04e4dfdc0a09420b8bcb7e187..e4d8e353858e185e3b5b654f8cd4814761080b12 100644 (file)
@@ -119,7 +119,7 @@ if ($needUpgrade) {
        $tmpl->printPage();
 } else {
        // information about storage capacities
-       $storageInfo=OC_Helper::getStorageInfo();
+       $storageInfo=OC_Helper::getStorageInfo($dir);
        $maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
        $publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');
        if (OC_App::isEnabled('files_encryption')) {
index f2b1f142e9b81bd745393c19b22e3ee27783cda2..7135ef9f656525fbc18b3fd7c87b95873ce481a2 100644 (file)
@@ -11,7 +11,7 @@ class Helper
                $maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize;
 
                // information about storage capacities
-               $storageInfo = \OC_Helper::getStorageInfo();
+               $storageInfo = \OC_Helper::getStorageInfo($dir);
 
                return array('uploadMaxFilesize' => $maxUploadFilesize,
                                         'maxHumanFilesize'  => $maxHumanFilesize,
index 128786087b8e6424a20a8ee2c8d72eba7923ff85..dd2476eda5cf87c6e76c20b71c49421cf0372842 100644 (file)
@@ -841,9 +841,12 @@ class OC_Helper {
        }
 
        /**
-        * Calculate the disc space
+        * Calculate the disc space for the given path
+        *
+        * @param string $path
+        * @return array
         */
-       public static function getStorageInfo($path = '/') {
+       public static function getStorageInfo($path) {
                $rootInfo = \OC\Files\Filesystem::getFileInfo($path);
                $used = $rootInfo['size'];
                if ($used < 0) {
index e69898f6f8fcacde6b1550a881ea070f48fd4d68..112eaa3c748425e2538f60ef9f87e3c08614960b 100644 (file)
@@ -17,7 +17,7 @@ OC_Util::addScript( '3rdparty', 'chosen/chosen.jquery.min' );
 OC_Util::addStyle( '3rdparty', 'chosen' );
 OC_App::setActiveNavigationEntry( 'personal' );
 
-$storageInfo=OC_Helper::getStorageInfo();
+$storageInfo=OC_Helper::getStorageInfo('/');
 
 $email=OC_Preferences::getValue(OC_User::getUser(), 'settings', 'email', '');