mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge pull request #51 from jthomerson/fix_prepopulate_function_name
Fix typo in function name
This commit is contained in:
commit
345af6c9a9
@ -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.
|
||||
@ -1009,7 +1016,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
* @param $batchCallBack The function/static method to call to calculate permissions. Defaults
|
||||
* to 'SiteTree::can_(permission)_multiple'
|
||||
*/
|
||||
static function prepopuplate_permission_cache($permission = 'CanEditType', $ids, $batchCallback = null) {
|
||||
static function prepopulate_permission_cache($permission = 'CanEditType', $ids, $batchCallback = null) {
|
||||
if(!$batchCallback) $batchCallback = "SiteTree::can_{$permission}_multiple";
|
||||
|
||||
//PHP 5.1 requires an array rather than a string for the call_user_func function
|
||||
@ -1018,7 +1025,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
if(is_callable($batchCallback)) {
|
||||
call_user_func($batchCallback, $ids, Member::currentUserID(), false);
|
||||
} else {
|
||||
user_error("SiteTree::prepopuplate_permission_cache can't calculate '$permission' "
|
||||
user_error("SiteTree::prepopulate_permission_cache can't calculate '$permission' "
|
||||
. "with callback '$batchCallback'", E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user