From: moodler Date: Sun, 24 Sep 2006 11:32:11 +0000 (+0000) Subject: Handle site-level block names in capability settings too X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f365252121f6c54a62d3f30a556c6594664b41ef;p=moodle.git Handle site-level block names in capability settings too --- 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 +?>