MDL-59595 admin: Make sure $ADMIN is properly unset when changing users

This commit is contained in:
Jake Dallimore
2018-07-24 08:33:04 +08:00
parent 3bbb669729
commit ab53088e8d
2 changed files with 5 additions and 3 deletions
+1 -3
View File
@@ -7970,9 +7970,7 @@ function admin_externalpage_setup($section, $extrabutton = '', array $extraurlpa
* @return object admin_root object
*/
function admin_get_root($reload=false, $requirefulltree=true) {
global $CFG, $DB, $OUTPUT;
static $ADMIN = NULL;
global $CFG, $DB, $OUTPUT, $ADMIN;
if (is_null($ADMIN)) {
// create the admin tree!