From 9fcbc4640d9beb67362578badd30cb1ec5688787 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 8 Jan 2012 15:39:03 +0100 Subject: [PATCH] MDL-31005 fix strict coding style warning in context_helper PHP54 compatibility --- lib/accesslib.php | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index b7c0c941970..18eddedc9b5 100644 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -4978,17 +4978,6 @@ abstract class context extends stdClass { return $record; } - /** - * Returns human readable context level name. - * - * @static - * @return string the human readable context level name. - */ - protected static function get_level_name() { - // must be implemented in all context levels - throw new coding_exception('can not get level name of abstract context'); - } - /** * Returns human readable context identifier. * @@ -5476,7 +5465,7 @@ class context_system extends context { * @static * @return string the human readable context level name. */ - protected static function get_level_name() { + public static function get_level_name() { return get_string('coresystem'); } @@ -5714,7 +5703,7 @@ class context_user extends context { * @static * @return string the human readable context level name. */ - protected static function get_level_name() { + public static function get_level_name() { return get_string('user'); } @@ -5882,7 +5871,7 @@ class context_coursecat extends context { * @static * @return string the human readable context level name. */ - protected static function get_level_name() { + public static function get_level_name() { return get_string('category'); } @@ -6102,7 +6091,7 @@ class context_course extends context { * @static * @return string the human readable context level name. */ - protected static function get_level_name() { + public static function get_level_name() { return get_string('course'); } @@ -6317,7 +6306,7 @@ class context_module extends context { * @static * @return string the human readable context level name. */ - protected static function get_level_name() { + public static function get_level_name() { return get_string('activitymodule'); } @@ -6553,7 +6542,7 @@ class context_block extends context { * @static * @return string the human readable context level name. */ - protected static function get_level_name() { + public static function get_level_name() { return get_string('block'); }