31181e4348
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.
15 lines
278 B
PHP
15 lines
278 B
PHP
<?php
|
|
|
|
// 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($dir)));
|