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:
Sam Minnee 2009-08-03 03:13:17 +00:00
parent 27a5961cba
commit 3c5f477b6e

View File

@ -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