From 82bb4ca2f587b806b71fb0f43027985c0d17a324 Mon Sep 17 00:00:00 2001 From: Jeremy Thomerson Date: Mon, 23 Jan 2012 15:23:42 -0500 Subject: [PATCH] Add a deprecation-friendly version of the prepopulate_permission_cache function Add a function with the old function name that adds a deprecation warning for users but forwards the call to the renamed function for backwards-compatibility. --- code/model/SiteTree.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php index d5da65a9..775fe36a 100644 --- a/code/model/SiteTree.php +++ b/code/model/SiteTree.php @@ -999,6 +999,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid } } + /** + * @deprecated 3.0 Use prepopulate_permission_cache() instead + */ + static function prepopuplate_permission_cache($permission = 'CanEditType', $ids, $batchCallback = null) { + Deprecation::notice("3.0", "Use prepopulate_permission_cache instead."); + self::prepopulate_permission_cache($permission, $ids, $batchCallback); + } /** * Pre-populate the cache of canEdit, canView, canDelete, canPublish permissions.