From 1209cb5c88fad401ba5ab59a3013d3d487bc1108 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 24 Mar 2010 13:10:10 +0000 Subject: [PATCH] fixed regression in recent commit - context path --- lib/accesslib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index 567395d6303..f8cd300ef39 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -857,9 +857,9 @@ function has_capability_in_accessdata($capability, $context, array $accessdata, if (!empty($accessdata['rsw'])) { // From the bottom up... foreach ($paths as $path) { - if (isset($accessdata['rsw'][$ctxp])) { + if (isset($accessdata['rsw'][$path])) { // Found a switchrole assignment - check for that role _plus_ the default user role - $roles = array($accessdata['rsw'][$ctxp]=>null, $CFG->defaultuserroleid=>null); + $roles = array($accessdata['rsw'][$path]=>null, $CFG->defaultuserroleid=>null); $switchedrole = true; break; } -- 2.43.0