Skip to content
Permalink
Browse files

MDL-40402 libraries: Deprecate get_system_context()

  • Loading branch information...
ankitagarwal committed Jul 3, 2013
1 parent 1d36484 commit 492ba9deb351be69f7b3c857b742b6a4a1f7fd40
Showing with 14 additions and 13 deletions.
  1. +0 −13 lib/accesslib.php
  2. +13 −0 lib/deprecatedlib.php
  3. +1 −0 lib/upgrade.txt
@@ -7225,19 +7225,6 @@ protected static function build_paths($force) {
// 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
@@ -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);
}
@@ -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 ===

0 comments on commit 492ba9d

Please sign in to comment.
You can’t perform that action at this time.