Skip to content
Snippets Groups Projects
Commit b1cc4ba3 authored by Elmar Ludwig's avatar Elmar Ludwig Committed by Jan-Hendrik Willms
Browse files

transfer fixes from #368 to my_studygroups, fixes #1541

Closes #1541

Merge request studip/studip!958
parent d18e8987
No related branches found
No related tags found
No related merge requests found
...@@ -42,17 +42,6 @@ class Institute_OverviewController extends AuthenticatedController ...@@ -42,17 +42,6 @@ class Institute_OverviewController extends AuthenticatedController
object_set_visit($this->institute_id, 0); 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::setHelpKeyword("Basis.Einrichtungen");
PageLayout::setTitle($this->institute->getFullName() . " - " ._("Kurzinfo")); PageLayout::setTitle($this->institute->getFullName() . " - " ._("Kurzinfo"));
Navigation::activateItem('/course/main/info'); Navigation::activateItem('/course/main/info');
...@@ -66,6 +55,17 @@ class Institute_OverviewController extends AuthenticatedController ...@@ -66,6 +55,17 @@ class Institute_OverviewController extends AuthenticatedController
*/ */
function index_action() 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(); $this->sidebar = Sidebar::get();
if (Config::get()->NEWS_RSS_EXPORT_ENABLE && $this->institute_id){ if (Config::get()->NEWS_RSS_EXPORT_ENABLE && $this->institute_id){
......
...@@ -22,21 +22,26 @@ ...@@ -22,21 +22,26 @@
<?= tooltipicon($infotext) ?> <?= tooltipicon($infotext) ?>
<? endif ?> <? endif ?>
</td> </td>
<td style="text-align: left"> <td style="text-align: left; white-space: nowrap;">
<? if (!empty($group['navigation'])) : ?> <? if (!empty($group['navigation'])) : ?>
<ul class="my-courses-navigation" style="flex-wrap: nowrap">
<? foreach (MyRealmModel::array_rtrim($group['navigation']) as $key => $nav) : ?> <? foreach (MyRealmModel::array_rtrim($group['navigation']) as $key => $nav) : ?>
<? if (isset($nav) && $nav->isVisible(true)) : ?> <? if (isset($nav) && $nav->isVisible(true)) : ?>
<a href="<?= <li class="my-courses-navigation-item <? if ($nav->getImage()->signalsAttention()) echo 'my-courses-navigation-important'; ?>">
URLHelper::getLink('seminar_main.php', <a href="<?=
['auswahl' => $group['seminar_id'], URLHelper::getLink('seminar_main.php',
'redirect_to' => strtr($nav->getURL(), '?', '&')]) ?>" <?= $nav->hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '' ?>> ['auswahl' => $group['seminar_id'],
<?= $nav->getImage()->asImg(20, $nav->getLinkAttributes()) ?> 'redirect_to' => $nav->getURL()]) ?>" <?= $nav->hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '' ?>>
</a> <?= $nav->getImage()->asImg(20, $nav->getLinkAttributes()) ?>
</a>
</li>
<? elseif (is_string($key)) : ?> <? elseif (is_string($key)) : ?>
<?= Assets::img('blank.gif', ['width' => 20, 'height' => 20]); ?> <li class="my-courses-navigation-item">
<span class="empty-slot" style="width: 20px"></span>
</li>
<? endif ?> <? endif ?>
<? echo ' ' ?>
<? endforeach ?> <? endforeach ?>
</ul>
<? endif ?> <? endif ?>
</td> </td>
<td style="text-align: right"> <td style="text-align: right">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment