diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-27 00:59:58 +0200 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-08-27 10:54:13 +0200 |
commit | b2d676dda54ab58ac59a794d8b832df50f0b0d43 (patch) | |
tree | 6d7821fc8f3c00905f6e6d1feee89fd1b7f0d36f | |
parent | 17dfdcc6456fa2facd1f99af0d7228d88d03396a (diff) | |
download | nextcloud-server-b2d676dda54ab58ac59a794d8b832df50f0b0d43.tar.gz nextcloud-server-b2d676dda54ab58ac59a794d8b832df50f0b0d43.zip |
storage information is path specific
-rw-r--r-- | apps/files/index.php | 2 | ||||
-rw-r--r-- | apps/files/lib/helper.php | 2 | ||||
-rw-r--r-- | lib/helper.php | 7 | ||||
-rw-r--r-- | settings/personal.php | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/apps/files/index.php b/apps/files/index.php index 2f005391509..dd5ea445daf 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -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')) { diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php index f2b1f142e9b..7135ef9f656 100644 --- a/apps/files/lib/helper.php +++ b/apps/files/lib/helper.php @@ -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, diff --git a/lib/helper.php b/lib/helper.php index d987d972431..a612b7493da 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -805,9 +805,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) { diff --git a/settings/personal.php b/settings/personal.php index 96de05f7eef..003203ec4a5 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -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', ''); |