MDL-29667 Plugins overview shows incorrect availability for auth & enrol plugins

We store the enabled plugins as array values but later look them up as array
keys. Just flip the array when we build it.
This commit is contained in:
Iñaki Arenaza
2012-02-14 15:47:39 +08:00
committed by Rajesh Taneja
parent 5fc420e2ed
commit d5d181f5e9
+2 -2
View File
@@ -1461,7 +1461,7 @@ class plugintype_auth extends plugintype_base implements plugin_information {
}
if (is_null($enabled)) {
$enabled = explode(',', $CFG->auth);
$enabled = array_flip(explode(',', $CFG->auth));
}
return isset($enabled[$this->name]);
@@ -1498,7 +1498,7 @@ class plugintype_enrol extends plugintype_base implements plugin_information {
static $enabled = null;
if (is_null($enabled)) {
$enabled = explode(',', $CFG->enrol_plugins_enabled);
$enabled = array_flip(explode(',', $CFG->enrol_plugins_enabled));
}
return isset($enabled[$this->name]);