mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Dealt with some undefined vairable bugs in SiteTree::can_edit_multiple
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83494 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
27a5961cba
commit
3c5f477b6e
@ -857,6 +857,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
// Default result: nothing editable
|
// Default result: nothing editable
|
||||||
$result = array_fill_keys($ids, false);
|
$result = array_fill_keys($ids, false);
|
||||||
|
if($ids) {
|
||||||
|
|
||||||
// Look in the cache for values
|
// Look in the cache for values
|
||||||
if($useCached && isset(self::$cache_permissions['edit'])) {
|
if($useCached && isset(self::$cache_permissions['edit'])) {
|
||||||
@ -923,6 +924,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
@ -1001,6 +1003,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
} else {
|
} else {
|
||||||
$deletable = $editableIDs;
|
$deletable = $editableIDs;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$deletable = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert the array of deletable IDs into a map of the original IDs with true/false as the
|
// Convert the array of deletable IDs into a map of the original IDs with true/false as the
|
||||||
|
Loading…
Reference in New Issue
Block a user