Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit f32c32b81f25231b074d937b98359502ce34493f 1 parent 52e6baa
@iarenaza iarenaza authored rajeshtaneja committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/pluginlib.php
View
4 lib/pluginlib.php
@@ -1283,7 +1283,7 @@ public function is_enabled() {
}
if (is_null($enabled)) {
- $enabled = explode(',', $CFG->auth);
+ $enabled = array_flip(explode(',', $CFG->auth));
}
return isset($enabled[$this->name]);
@@ -1321,7 +1321,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]);
Please sign in to comment.
Something went wrong with that request. Please try again.