From ecb8d1bd7861a74290329ae75da196a2a39b3f7b Mon Sep 17 00:00:00 2001 From: Elmar Ludwig Date: Mon, 15 Dec 2025 16:46:48 +0100 Subject: =?UTF-8?q?Revert=20"Klick=20auf=20das=20Ank=C3=BCndigungen-Symbol?= =?UTF-8?q?=20kann=20zur=20falschen=20Stelle=20f=C3=BChren",=20fixes=20#61?= =?UTF-8?q?15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #6115 Merge request studip/studip!4649 --- app/controllers/institute/overview.php | 11 +++-------- lib/classes/MyRealmModel.php | 3 +-- lib/modules/CoreOverview.php | 3 +-- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/app/controllers/institute/overview.php b/app/controllers/institute/overview.php index 603e632..db83115 100644 --- a/app/controllers/institute/overview.php +++ b/app/controllers/institute/overview.php @@ -60,18 +60,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 fefb4ee..7ebb31c 100644 --- a/lib/classes/MyRealmModel.php +++ b/lib/classes/MyRealmModel.php @@ -93,8 +93,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.php b/lib/modules/CoreOverview.php index 5550ed3..ae4293c 100644 --- a/lib/modules/CoreOverview.php +++ b/lib/modules/CoreOverview.php @@ -40,8 +40,7 @@ class CoreOverview extends CorePlugin implements StudipModuleExtended 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, [ -- cgit v1.0