diff options
| author | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2022-09-05 13:19:33 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2022-09-05 13:19:33 +0000 |
| commit | b1cc4ba35b1cb02444560a6a87fce3fcbc83df29 (patch) | |
| tree | e9a1f62100de42fed52541d4bb762e48826d9e99 /app/controllers/institute/overview.php | |
| parent | d18e898794273352f64ecc056f886fb4c32f2381 (diff) | |
transfer fixes from #368 to my_studygroups, fixes #1541
Closes #1541
Merge request studip/studip!958
Diffstat (limited to 'app/controllers/institute/overview.php')
| -rw-r--r-- | app/controllers/institute/overview.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/app/controllers/institute/overview.php b/app/controllers/institute/overview.php index 38cf381..99a59ca 100644 --- a/app/controllers/institute/overview.php +++ b/app/controllers/institute/overview.php @@ -42,17 +42,6 @@ class Institute_OverviewController extends AuthenticatedController object_set_visit($this->institute_id, 0); } - //gibt es eine Anweisung zur Umleitung? - if (Request::get('redirect_to')) { - $query_parts = explode('&', mb_stristr(urldecode($_SERVER['QUERY_STRING']), 'redirect_to')); - list( , $where_to) = explode('=', array_shift($query_parts)); - $new_query = $where_to . '?' . join('&', $query_parts); - page_close(); - $new_query = preg_replace('/[^:0-9a-z+_.#?&=\/-]/i', '', $new_query); - header('Location: '.URLHelper::getURL($new_query, ['cid' => $this->institute_id])); - die; - } - PageLayout::setHelpKeyword("Basis.Einrichtungen"); PageLayout::setTitle($this->institute->getFullName() . " - " ._("Kurzinfo")); Navigation::activateItem('/course/main/info'); @@ -66,6 +55,17 @@ class Institute_OverviewController extends AuthenticatedController */ function index_action() { + //gibt es eine Anweisung zur Umleitung? + $redirect_to = Request::get('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])); + return; + } + $this->sidebar = Sidebar::get(); if (Config::get()->NEWS_RSS_EXPORT_ENABLE && $this->institute_id){ |
