aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/files.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2021-12-09 09:15:12 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2021-12-09 09:15:12 +0000
commitecc7f65602cb1e94040e094756fddbf5e01a9608 (patch)
treee829dff57f3f960b8d052fc7564256d27bcb553d /app/controllers/files.php
parentb55e4ef94131cdfdb8919b01299818db322f9f66 (diff)
fixes #448
Diffstat (limited to 'app/controllers/files.php')
-rw-r--r--app/controllers/files.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/controllers/files.php b/app/controllers/files.php
index bfc2e98..4e11440 100644
--- a/app/controllers/files.php
+++ b/app/controllers/files.php
@@ -46,13 +46,11 @@ class FilesController extends AuthenticatedController
throw new AccessDeniedException();
}
+ $constraints = FileManager::getUploadTypeConfig($this->user->id);
+
PageLayout::addHeadElement('script', ['type' => 'text/javascript'], sprintf(
'STUDIP.Files.setUploadConstraints(%s);',
- json_encode([
- 'filesize' => $GLOBALS['UPLOAD_TYPES']['personalfiles']['file_sizes'][$this->user->perms],
- 'type' => $GLOBALS['UPLOAD_TYPES']['personalfiles']['type'],
- 'file_types' => $GLOBALS['UPLOAD_TYPES']['personalfiles']['file_types'],
- ])
+ json_encode($constraints)
));
}