diff options
| author | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2025-12-15 16:46:48 +0100 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-01-16 12:28:12 +0100 |
| commit | 293b52b6624699ecb36b4bf54e492ce8840a31c5 (patch) | |
| tree | 1b2fd37aa40e831568f201127317cc3474204324 | |
| parent | 0b63c73d18a39e5f1c3877300c8d895378227b06 (diff) | |
Revert "Klick auf das Ankündigungen-Symbol kann zur falschen Stelle führen", fixes #6115
Closes #6115
Merge request studip/studip!4649
| -rw-r--r-- | app/controllers/institute/overview.php | 11 | ||||
| -rw-r--r-- | lib/classes/MyRealmModel.php | 3 | ||||
| -rw-r--r-- | lib/modules/CoreOverview.class.php | 3 |
3 files changed, 5 insertions, 12 deletions
diff --git a/app/controllers/institute/overview.php b/app/controllers/institute/overview.php index 8326fa2..f511bd4 100644 --- a/app/controllers/institute/overview.php +++ b/app/controllers/institute/overview.php @@ -57,18 +57,13 @@ class Institute_OverviewController extends AuthenticatedController { //gibt es eine Anweisung zur Umleitung? $redirect_to = Request::get('redirect_to'); - if ( - $redirect_to - && !( - str_starts_with($redirect_to, '#') - || str_starts_with($redirect_to, '?') - ) - ) { + if ($redirect_to) { if (!is_internal_url($redirect_to)) { throw new Exception('Invalid redirection'); } - $this->redirect(URLHelper::getURL($redirect_to, ['cid' => $this->institute_id])); + $this->response->add_header('Location', URLHelper::getURL($redirect_to, ['cid' => $this->institute_id])); + $this->render_nothing(); return; } diff --git a/lib/classes/MyRealmModel.php b/lib/classes/MyRealmModel.php index 0a23218..173cec2 100644 --- a/lib/classes/MyRealmModel.php +++ b/lib/classes/MyRealmModel.php @@ -123,8 +123,7 @@ class MyRealmModel if ($neue || $count > 0) { - $base_url = $my_obj['obj_type'] === 'sem' ? 'course' : 'institute'; - $nav = new Navigation('vote', "dispatch.php/$base_url/overview"); + $nav = new Navigation('vote', '#vote'); if ($neue) { $nav->setImage(Icon::create('vote', Icon::ROLE_ATTENTION, [ 'title' => sprintf( diff --git a/lib/modules/CoreOverview.class.php b/lib/modules/CoreOverview.class.php index 6aa4a43..b83160f 100644 --- a/lib/modules/CoreOverview.class.php +++ b/lib/modules/CoreOverview.class.php @@ -40,8 +40,7 @@ class CoreOverview extends CorePlugin implements StudipModule return null; } - $base_url = get_object_type($course_id, ['sem']) ? 'course' : 'institute'; - $nav = new Navigation('Ankündigungen', "dispatch.php/$base_url/overview"); + $nav = new Navigation(_('Ankündigungen'), ''); if ($result['neue']) { $nav->setURL('?new_news=true'); $nav->setImage(Icon::create('news', Icon::ROLE_ATTENTION), [ |
