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:
Ingo Schommer 2010-04-12 02:35:28 +00:00
parent 2ac34ccff0
commit a7d39ef9c1

View File

@ -989,8 +989,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
foreach(array('Stage', 'Live') as $stage) {
// Start by filling the array with the pages that actually exist
$table = ($stage=='Stage') ? "SiteTree" : "SiteTree_$stage";
$result = DB::query("SELECT \"ID\",0 FROM \"$table\"
WHERE \"ID\" IN (".implode(", ", $ids).")")->map();
$result = array_fill_keys(DB::query("SELECT \"ID\" FROM \"$table\"
WHERE \"ID\" IN (".implode(", ", $ids).")")->column(), false);
// Get the uninherited permissions
$uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage, "(\"CanEditType\" = 'LoggedInUsers' OR