diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-06 10:55:19 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-06 10:55:19 +0100 |
commit | 31181e4348b9af2625cf4d6ad38cf4cd81db3c1f (patch) | |
tree | fc295013189c1c371b35c5080d85787b83f5b70a /apps/files/ajax | |
parent | 5d9ab6e7ac161a2431d9baca59281c03015b4ff5 (diff) | |
download | nextcloud-server-31181e4348b9af2625cf4d6ad38cf4cd81db3c1f.tar.gz nextcloud-server-31181e4348b9af2625cf4d6ad38cf4cd81db3c1f.zip |
Fixed storage stats to be based on current directory
Previously, the storage statistics were always for the root dir.
This means that the upload button would always show the limit for the
root dir, even when uploading to a shared dir or external storage.
This fix adds a "dir" argument to getstoragestats.php.
Diffstat (limited to 'apps/files/ajax')
-rw-r--r-- | apps/files/ajax/getstoragestats.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files/ajax/getstoragestats.php b/apps/files/ajax/getstoragestats.php index 32a77bff6c3..dd7c7dc5571 100644 --- a/apps/files/ajax/getstoragestats.php +++ b/apps/files/ajax/getstoragestats.php @@ -3,7 +3,13 @@ // only need filesystem apps $RUNTIME_APPTYPES = array('filesystem'); +$dir = '/'; + +if (isset($_GET['dir'])) { + $dir = $_GET['dir']; +} + OCP\JSON::checkLoggedIn(); // send back json -OCP\JSON::success(array('data' => \OCA\Files\Helper::buildFileStorageStatistics('/'))); +OCP\JSON::success(array('data' => \OCA\Files\Helper::buildFileStorageStatistics($dir))); |