mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
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:
parent
ea75a579d1
commit
9c867cfef8
1 changed files with 2 additions and 2 deletions
|
@ -1462,7 +1462,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]);
|
||||
|
@ -1499,7 +1499,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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue