From f365252121f6c54a62d3f30a556c6594664b41ef Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 24 Sep 2006 11:32:11 +0000 Subject: [PATCH] Handle site-level block names in capability settings too --- lib/accesslib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index c11b85bb67..c5e9b6188a 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -2266,6 +2266,9 @@ function get_component_string($component, $contextlevel) { if (preg_match('|^enrol/|', $component)) { $langname = str_replace('/', '_', $component); $string = get_string('enrolname', $langname); + } else if (preg_match('|^block/|', $component)) { + $langname = str_replace('/', '_', $component); + $string = get_string('blockname', $langname); } else { $string = get_string('coresystem'); } @@ -2806,4 +2809,4 @@ function get_users_from_role_on_context($role, $context) { AND roleid = $role->id"); } -?> \ No newline at end of file +?> -- 2.39.5