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.
This commit is contained in:
Jeremy Thomerson 2012-01-23 15:23:42 -05:00
parent a5c6bc6ee1
commit 82bb4ca2f5

View File

@ -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.