diff options
Diffstat (limited to 'apps/files/ajax/list.php')
-rw-r--r-- | apps/files/ajax/list.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php index 0b66ed10897..8cbe5841aaf 100644 --- a/apps/files/ajax/list.php +++ b/apps/files/ajax/list.php @@ -43,7 +43,7 @@ try { exit(); } - $data = array(); + $data = []; $baseUrl = \OC::$server->getURLGenerator()->linkTo('files', 'index.php') . '?dir='; $permissions = $dirInfo->getPermissions(); @@ -80,7 +80,7 @@ try { $data['files'] = \OCA\Files\Helper::formatFileInfos($files); $data['permissions'] = $permissions; - \OC_JSON::success(array('data' => $data)); + \OC_JSON::success(['data' => $data]); } catch (\OCP\Files\StorageNotAvailableException $e) { \OC::$server->getLogger()->logException($e, ['app' => 'files']); \OC_JSON::error([ @@ -91,18 +91,18 @@ try { ]); } catch (\OCP\Files\StorageInvalidException $e) { \OC::$server->getLogger()->logException($e, ['app' => 'files']); - \OC_JSON::error(array( - 'data' => array( + \OC_JSON::error([ + 'data' => [ 'exception' => StorageInvalidException::class, 'message' => $l->t('Storage invalid') - ) - )); + ] + ]); } catch (\Exception $e) { \OC::$server->getLogger()->logException($e, ['app' => 'files']); - \OC_JSON::error(array( - 'data' => array( + \OC_JSON::error([ + 'data' => [ 'exception' => \Exception::class, 'message' => $l->t('Unknown error') - ) - )); + ] + ]); } |