06aef4e8b1
This reverts commit 6a1a4880f0
.
17 lines
370 B
PHP
17 lines
370 B
PHP
<?php
|
|
|
|
$dir = '/';
|
|
|
|
if (isset($_GET['dir'])) {
|
|
$dir = (string)$_GET['dir'];
|
|
}
|
|
|
|
OCP\JSON::checkLoggedIn();
|
|
\OC::$server->getSession()->close();
|
|
|
|
// send back json
|
|
try {
|
|
OCP\JSON::success(array('data' => \OCA\Files\Helper::buildFileStorageStatistics($dir)));
|
|
} catch (\OCP\Files\NotFoundException $e) {
|
|
OCP\JSON::error(['data' => ['message' => 'Folder not found']]);
|
|
}
|