mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: can_edit_multiple() should return false, not 0, for permission failure. (from r92192) (from r96744)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102370 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2ac34ccff0
commit
a7d39ef9c1
@ -989,8 +989,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
foreach(array('Stage', 'Live') as $stage) {
|
foreach(array('Stage', 'Live') as $stage) {
|
||||||
// Start by filling the array with the pages that actually exist
|
// Start by filling the array with the pages that actually exist
|
||||||
$table = ($stage=='Stage') ? "SiteTree" : "SiteTree_$stage";
|
$table = ($stage=='Stage') ? "SiteTree" : "SiteTree_$stage";
|
||||||
$result = DB::query("SELECT \"ID\",0 FROM \"$table\"
|
$result = array_fill_keys(DB::query("SELECT \"ID\" FROM \"$table\"
|
||||||
WHERE \"ID\" IN (".implode(", ", $ids).")")->map();
|
WHERE \"ID\" IN (".implode(", ", $ids).")")->column(), false);
|
||||||
|
|
||||||
// Get the uninherited permissions
|
// Get the uninherited permissions
|
||||||
$uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage, "(\"CanEditType\" = 'LoggedInUsers' OR
|
$uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage, "(\"CanEditType\" = 'LoggedInUsers' OR
|
||||||
|
Loading…
Reference in New Issue
Block a user