From a7d39ef9c1a7b72586a0ed243daf612068856695 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 12 Apr 2010 02:35:28 +0000 Subject: [PATCH] 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 --- core/model/SiteTree.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 8a26c42ac..7fda20437 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -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