Skip to content

Commit

Permalink
mnet: $CFG->mnet_dispatcher_mode - ensure we set it on install and up…
Browse files Browse the repository at this point in the history
…grade, silence warnings - MDL-8284
  • Loading branch information
martinlanghoff committed Jan 24, 2007
1 parent 3efde7e commit 36e6379
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
3 changes: 2 additions & 1 deletion login/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@
}

// 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");
}
Expand Down
4 changes: 4 additions & 0 deletions mnet/environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ function 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) ) {

Expand Down

0 comments on commit 36e6379

Please sign in to comment.