aboutsummaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/file.php4
-rw-r--r--app/controllers/oer/mymaterial.php10
2 files changed, 9 insertions, 5 deletions
diff --git a/app/controllers/file.php b/app/controllers/file.php
index cfeee5a..2573df7 100644
--- a/app/controllers/file.php
+++ b/app/controllers/file.php
@@ -522,13 +522,13 @@ class FileController extends AuthenticatedController
];
// only if you were in Dateibereich
- if ($this->redirect == 'redirect_to_files') {
+ if ($this->redirect === 'redirect_to_files') {
$_SESSION['NEW_OER']['redirect_url'] = 'files';
$_SESSION['NEW_OER']['dir'] = $this->folder->getId();
$_SESSION['NEW_OER']['cid'] = $this->folder->range_id;
}
- $this->redirect("oer/mymaterial/edit/");
+ $this->redirect('oer/mymaterial/edit');
}
/**
diff --git a/app/controllers/oer/mymaterial.php b/app/controllers/oer/mymaterial.php
index b3617b2..2d5b93c 100644
--- a/app/controllers/oer/mymaterial.php
+++ b/app/controllers/oer/mymaterial.php
@@ -148,9 +148,13 @@ class Oer_MymaterialController extends AuthenticatedController
PageLayout::postSuccess(_('Lernmaterial erfolgreich gespeichert.'));
if (Request::get('redirect_url')) {
- if (Request::get('redirect_url') == 'files') {
- $this->redirect(URLHelper::getURL('dispatch.php/course/files/index/'
- . Request::get('dir') . '?cid=' . Request::get('cid')));
+ if (Request::get('redirect_url') === 'files') {
+ $this->redirect(
+ URLHelper::getURL(
+ 'dispatch.php/course/files/index/' . Request::get('dir'),
+ ['cid' => Request::get('cid')]
+ )
+ );
} else {
$this->redirect(URLHelper::getURL(Request::get('redirect_url'), [
'material_id' => $material->getId(),