From 4aa2263709aed90f4a7d5e99fd8eb0a0a9ac3225 Mon Sep 17 00:00:00 2001 From: David Siegfried Date: Tue, 15 Nov 2022 15:39:09 +0000 Subject: Apply 13 suggestion(s) to 4 file(s) --- app/controllers/file.php | 4 ++-- app/controllers/oer/mymaterial.php | 10 +++++++--- app/views/file/oer_post_upload.php | 18 +++++++++--------- lib/cronjobs/remind_oer_upload.class.php | 2 +- 4 files changed, 19 insertions(+), 15 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(), diff --git a/app/views/file/oer_post_upload.php b/app/views/file/oer_post_upload.php index bc49399..6645dab 100644 --- a/app/views/file/oer_post_upload.php +++ b/app/views/file/oer_post_upload.php @@ -16,13 +16,13 @@ if (!$selected_oer_upload) { >
@@ -35,13 +35,13 @@ if (!$selected_oer_upload) { >
@@ -53,13 +53,13 @@ if (!$selected_oer_upload) { >
diff --git a/lib/cronjobs/remind_oer_upload.class.php b/lib/cronjobs/remind_oer_upload.class.php index b3dc455..51b9ca5 100644 --- a/lib/cronjobs/remind_oer_upload.class.php +++ b/lib/cronjobs/remind_oer_upload.class.php @@ -40,7 +40,7 @@ class RemindOerUpload extends CronJob $file_to_suggest = $filetype->convertToStandardFile(); $this->author = $file_ref->owner->username; - $this->link_to_share = URLHelper::getURL("dispatch.php/file/share_oer/" . $result['file_ref_id']); + $this->link_to_share = URLHelper::getURL('dispatch.php/file/share_oer/' . $result['file_ref_id']); $this->linktext = _('Klicken Sie hier, um das Material im OER-Campus zu veröffentlichen.'); $this->formatted_link = '['. $this->linktext .']' . $this->link_to_share; -- cgit v1.0