Permalink
Browse files

MDL-29667 Plugins overview shows incorrect availability for auth & en…

…rol 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.
  • Loading branch information...
1 parent 5fc420e commit d5d181f5e937ddbaf3fd456ddfcf8310a4246d9f @iarenaza iarenaza committed with Rajesh Taneja Oct 27, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/pluginlib.php
View
@@ -1461,7 +1461,7 @@ public function is_enabled() {
}
if (is_null($enabled)) {
- $enabled = explode(',', $CFG->auth);
+ $enabled = array_flip(explode(',', $CFG->auth));
}
return isset($enabled[$this->name]);
@@ -1498,7 +1498,7 @@ public function is_enabled() {
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]);

0 comments on commit d5d181f

Please sign in to comment.