aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/files.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2023-03-13 09:30:37 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2023-03-13 09:30:37 +0000
commit8897e57da8ba5b34703f8586313454e0ccf23c0a (patch)
treec006be6025269598f1994e22a7eabcf736c8d6e7 /app/controllers/files.php
parent710f175b5618672ace2c0771f6b6b31922bfcc66 (diff)
use config setting instead of hardwired number, fixes #2294
Closes #2294 Merge request studip/studip!1546
Diffstat (limited to 'app/controllers/files.php')
-rw-r--r--app/controllers/files.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/files.php b/app/controllers/files.php
index 62ff059..555e788 100644
--- a/app/controllers/files.php
+++ b/app/controllers/files.php
@@ -429,10 +429,10 @@ class FilesController extends AuthenticatedController
}
} elseif ($this->current_view == 'all_files') {
$this->table_title = _('Alle Dateien');
- $this->page_size = 25;
+ $this->page_size = Config::get()->ENTRIES_PER_PAGE;
$this->page = 1;
if (!$course_did_change) {
- $this->page = Request::get('page') + 1;
+ $this->page = Request::int('page') + 1;
}
if (($this->page < 1) || !$this->page) {
$this->page = 1;
@@ -505,12 +505,12 @@ class FilesController extends AuthenticatedController
$this->files[] = $file_ref->getFileType();
}
} elseif ($this->current_view == 'my_uploaded_files') {
- $this->page_size = 25;
+ $this->page_size = Config::get()->ENTRIES_PER_PAGE;
$this->page = 1;
if (!$course_did_change) {
- $this->page = Request::get('page') + 1;
+ $this->page = Request::int('page') + 1;
}
- if (($this->page < 1) || !$this->page) {
+ if ($this->page < 1) {
$this->page = 1;
}
$offset = $this->page_size * ($this->page - 1);