diff --git a/lib/accesslib.php b/lib/accesslib.php index 5d79e42d118..f8efe07fc41 100644 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -7225,19 +7225,6 @@ class context_block extends context { // before removing devs will be warned with a debugging message first, // then we will add error message and only after that we can remove the functions // completely. - - -/** - * Returns system context or null if can not be created yet. - * - * @deprecated since 2.2, use context_system::instance() - * @param bool $cache use caching - * @return context system context (null if context table not created yet) - */ -function get_system_context($cache = true) { - return context_system::instance(0, IGNORE_MISSING, $cache); -} - /** * Recursive function which, given a context, find all parent context ids, * and return the array in reverse order, i.e. parent first, then grand diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 613f2ee9761..9295db96ca5 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -4915,3 +4915,16 @@ function load_temp_role($context, $roleid, array $accessdata) { function remove_temp_roles($context, array $accessdata) { throw new coding_exception('remove_temp_roles() can not be used any more, please use remove_temp_course_roles()'); } + +/** + * Returns system context or null if can not be created yet. + * + * @see context_system::instance() + * @deprecated since 2.2, use context_system::instance() + * @param bool $cache use caching + * @return context system context (null if context table not created yet) + */ +function get_system_context($cache = true) { + debugging('get_system_context() is deprecated, please use context_system::instance() instead.', DEBUG_DEVELOPER); + return context_system::instance(0, IGNORE_MISSING, $cache); +} diff --git a/lib/upgrade.txt b/lib/upgrade.txt index 50b60ddfe11..919cb45caa5 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -7,6 +7,7 @@ information provided here is intended especially for developers. * get_context_instance() is deprecated, please use use context_xxxx::instance(). * get_context_instance_by_id() is deprecated, please use context::instance_by_id($id). * load_temp_role() and remove_temp_roles() can not be used any more. +* get_system_context() is deprecated, please use context_system::instance(). === 2.5.1 ===