From 641a5fe43ed70afc2e77b4f35703c59ff7683ce0 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Fri, 6 Jul 2012 02:13:15 +0200 Subject: [PATCH] Remove ownership checks - this belongs in application code, not in a framework. --- class.databaserecord.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/class.databaserecord.php b/class.databaserecord.php index 3bfa521..bd1ebd1 100644 --- a/class.databaserecord.php +++ b/class.databaserecord.php @@ -40,7 +40,7 @@ abstract class CPHPDatabaseRecordClass extends CPHPBaseClass $this->ConstructDataset($this->sId); } - public function ConstructDataset($uDataSource, $uCommunityId = 0) + public function ConstructDataset($uDataSource) { $bind_datasets = true; @@ -116,17 +116,6 @@ abstract class CPHPDatabaseRecordClass extends CPHPBaseClass { $this->sFound = false; } - - if(!empty($uCommunityId) && !empty($this->sCommunityId)) - { - $sCommunityId = (is_numeric($uCommunityId)) ? $uCommunityId : 0; - - if($sCommunityId != $this->sCommunity->sId) - { - $classname = get_class($this); - throw new OwnershipException("{$classname} {$this->sId} does not belong to Community {$sCommunityId}."); - } - } } public function BindDataset($type, $dataset)