From: martinlanghoff Date: Wed, 24 Jan 2007 22:17:42 +0000 (+0000) Subject: mnet: $CFG->mnet_dispatcher_mode - ensure we set it on install and upgrade, silence... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=36e6379ef84e28f0a4d9cc527404637f5a04d7b6;p=moodle.git mnet: $CFG->mnet_dispatcher_mode - ensure we set it on install and upgrade, silence warnings - MDL-8284 --- diff --git a/course/lib.php b/course/lib.php index b796f34761..2af332fd02 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1836,7 +1836,7 @@ function print_my_moodle() { $courses = get_my_courses($USER->id); $rhosts = array(); $rcourses = array(); - if ($CFG->mnet_dispatcher_mode === 'strict') { + if (!empty($CFG->mnet_dispatcher_mode) && $CFG->mnet_dispatcher_mode==='strict') { $rcourses = get_my_remotecourses($USER->id); $rhosts = get_my_remotehosts(); } diff --git a/login/index.php b/login/index.php index 7399e8e716..936ded2c18 100644 --- a/login/index.php +++ b/login/index.php @@ -226,7 +226,8 @@ if ($authsequence[0] == 'cas' and !empty($CFG->cas_enabled)) { } // TODO: if the user failed to authenticate, check if the username corresponds to a remote mnet user - if ( $CFG->mnet_dispatcher_mode === 'strict' + if ( !empty($CFG->mnet_dispatcher_mode) + && $CFG->mnet_dispatcher_mode === 'strict' && is_enabled_auth('mnet')) { $errormsg .= get_string('loginlinkmnetuser', 'mnet', "mnet_email.php?u=$frm->username"); } diff --git a/mnet/environment.php b/mnet/environment.php index 5b8e523e4e..1fd7dda4c3 100644 --- a/mnet/environment.php +++ b/mnet/environment.php @@ -24,6 +24,10 @@ class mnet_environment { function init() { global $CFG; + if (empty($CFG->mnet_dispatcher_mode)) { + set_config('mnet_dispatcher_mode', 'off'); + } + // Bootstrap the object data on first load. if (empty($CFG->mnet_localhost_id) ) {