Skip to content
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 ea75a57 commit 9c867cfef845c33175305102e21a3c74d7f8ccc6 @iarenaza iarenaza committed with rajeshtaneja Oct 27, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/pluginlib.php
View
4 lib/pluginlib.php
@@ -1462,7 +1462,7 @@ public function is_enabled() {
}
if (is_null($enabled)) {
- $enabled = explode(',', $CFG->auth);
+ $enabled = array_flip(explode(',', $CFG->auth));
}
return isset($enabled[$this->name]);
@@ -1499,7 +1499,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 9c867cf

Please sign in to comment.
Something went wrong with that request. Please try again.