MINOR Added comments to DataObject->can()

This commit is contained in:
Ingo Schommer 2011-03-23 12:05:44 +13:00
parent 764c5a842b
commit 7e5da27443

View File

@ -2371,6 +2371,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
$groupList = implode(', ', $groups->column("ID")); $groupList = implode(', ', $groups->column("ID"));
// TODO Fix relation table hardcoding
$query = new SQLQuery( $query = new SQLQuery(
"\"Page_Can$perm\".PageID", "\"Page_Can$perm\".PageID",
array("\"Page_Can$perm\""), array("\"Page_Can$perm\""),
@ -2379,6 +2380,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
$permissionCache[$memberID][$perm] = $query->execute()->column(); $permissionCache[$memberID][$perm] = $query->execute()->column();
if($perm == "View") { if($perm == "View") {
// TODO Fix relation table hardcoding
$query = new SQLQuery("\"SiteTree\".\"ID\"", array( $query = new SQLQuery("\"SiteTree\".\"ID\"", array(
"\"SiteTree\"", "\"SiteTree\"",
"LEFT JOIN \"Page_CanView\" ON \"Page_CanView\".\"PageID\" = \"SiteTree\".\"ID\"" "LEFT JOIN \"Page_CanView\" ON \"Page_CanView\".\"PageID\" = \"SiteTree\".\"ID\""