Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mnet: $CFG->mnet_dispatcher_mode - ensure we set it on install and up…

…grade, silence warnings - MDL-8284
  • Loading branch information...
commit 36e6379ef84e28f0a4d9cc527404637f5a04d7b6 1 parent 3efde7e
martinlanghoff authored
Showing with 7 additions and 2 deletions.
  1. +1 −1  course/lib.php
  2. +2 −1  login/index.php
  3. +4 −0 mnet/environment.php
View
2  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();
}
View
3  login/index.php
@@ -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");
}
View
4 mnet/environment.php
@@ -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) ) {
Please sign in to comment.
Something went wrong with that request. Please try again.