From d5d181f5e937ddbaf3fd456ddfcf8310a4246d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Arenaza?= Date: Thu, 27 Oct 2011 12:09:23 +0200 Subject: [PATCH] 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. --- lib/pluginlib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pluginlib.php b/lib/pluginlib.php index 5347b1615ca..9d788a765ed 100644 --- a/lib/pluginlib.php +++ b/lib/pluginlib.php @@ -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]);