MDL-40406 libraries: Deprecate cleanup_contexts()

This commit is contained in:
Frederic Massart 2013-07-04 13:51:39 +08:00
parent 9fdbf620a4
commit 84378a57b9
4 changed files with 15 additions and 11 deletions

View file

@ -5000,3 +5000,16 @@ function create_contexts($contextlevel = null, $buildpaths = true) {
debugging('create_contexts() is deprecated, please use context_helper::create_instances() instead.', DEBUG_DEVELOPER);
context_helper::create_instances($contextlevel, $buildpaths);
}
/**
* Remove stale context records.
*
* @see context_helper::cleanup_instances()
* @deprecated since 2.2
* @return bool
*/
function cleanup_contexts() {
debugging('cleanup_contexts() is deprecated, please use context_helper::cleanup_instances() instead.', DEBUG_DEVELOPER);
context_helper::cleanup_instances();
return true;
}