Skip to content
Snippets Groups Projects
Commit 58e6f4d3 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #3241

Closes #3241

Merge request studip/studip!2200
parent 3f214ebf
No related branches found
No related tags found
No related merge requests found
......@@ -69,8 +69,9 @@ class MVV implements Loggable {
*/
public static function isVisibleSearch()
{
return ($GLOBALS['perm']->have_perm('autor') || Config::get()->COURSE_SEARCH_IS_VISIBLE_NOBODY)
&& Modul::publicModulesAvailable();
return isset($GLOBALS['perm'])
&& ($GLOBALS['perm']->have_perm('autor') || Config::get()->COURSE_SEARCH_IS_VISIBLE_NOBODY)
&& Modul::publicModulesAvailable();
}
/**
......
......@@ -64,16 +64,20 @@ class StudipNavigation extends Navigation
}
// contents pages
if ($user->id !== 'nobody') {
if (isset($user) && $user->id !== 'nobody') {
$this->addSubNavigation('contents', new ContentsNavigation());
}
// contents pages
if (Config::get()->OERCAMPUS_ENABLED && $perm && $perm->have_perm(Config::get()->OER_PUBLIC_STATUS)) {
if (
Config::get()->OERCAMPUS_ENABLED
&& isset($perm)
&& $perm->have_perm(Config::get()->OER_PUBLIC_STATUS)
) {
$this->addSubNavigation('oer', new OERNavigation());
}
if ($user->id !== 'nobody') {
if (isset($user) && $user->id !== 'nobody') {
// internal message system
$this->addSubNavigation('messaging', new MessagingNavigation());
......@@ -140,7 +144,7 @@ class StudipNavigation extends Navigation
$links = new Navigation('Links');
// login / logout
if ($user->id === 'nobody') {
if (!isset($user) || $user->id === 'nobody') {
if (in_array('CAS', $GLOBALS['STUDIP_AUTH_PLUGIN'])) {
$links->addSubNavigation('login_cas', new Navigation(_('Login CAS'), Request::url(), ['again' => 'yes', 'sso' => 'cas']));
}
......
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