diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-22 20:34:58 +0400 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-22 20:34:58 +0400 |
commit | 880769976bbc8c75186c89268c78bc40efb80998 (patch) | |
tree | a3dff4bd4a46a846f1a76e388bf32de7a8ab3342 /apps | |
parent | 2565a94e7d0785433dff73a022ae712bee24ca9f (diff) | |
parent | 5e6ea1565af95298a7cae39df561aa01d74b4862 (diff) |
Merge pull request #5934 from owncloud/stable5-excludeextstoragefromquota
[Stable5] Exclude ext storage from quota
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/ajax/getstoragestats.php | 8 | ||||
-rw-r--r-- | apps/files/js/files.js | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/apps/files/ajax/getstoragestats.php b/apps/files/ajax/getstoragestats.php index 7a2b642a9bd..573179e2866 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\lib\Helper::buildFileStorageStatistics('/'))); +OCP\JSON::success(array('data' => \OCA\files\lib\Helper::buildFileStorageStatistics($dir))); diff --git a/apps/files/js/files.js b/apps/files/js/files.js index d8aca4dd26a..1e523e8441d 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -523,7 +523,8 @@ $(document).ready(function() { // file space size sync function update_storage_statistics() { - $.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) { + var currentDir = $('#dir').val() || '/'; + $.getJSON(OC.filePath('files','ajax','getstoragestats.php?dir=' + encodeURIComponent(currentDir)),function(response) { Files.updateMaxUploadFilesize(response); }); } |