public static final function _GetDataObject(DBConnect &$db, $dataObjectID){ logger_FuncCall(__FILE__, __LINE__, __FUNCTION__); if (!is_numeric($userID)){ throw new FCoreException("Invalid Param"); } $result = $db->SelectAllOfOneRecord( DATATYPEBASE, DATATYPEBASE_DATATYPEID."=$dataObjectID"); if (!$results){ throw new DBConnectErrorException("Data Object Doesn't Exist"); } $content = $db->SelectOneOfOneField( $result[DATATYPEBASE_DATATYPE], DT_CONTENT, DT_DTID."=$dataObjectID"); if (!$content){ throw new DBConnectErrorException("Data Object's Content Missing: DB May Require Cleaning"); } $returning = new DB_DATAOBJECT(); $returning->dbRef = $db; $returning->dataTypeID = $result[DATATYPEBASE_DATATYPEID]; $returning->dataType = $result[DATATYPEBASE_DATATYPE]; $returning->title = $result[DATATYPEBASE_TITLE]; $returning->timeMade = $result[DATATYPEBASE_TIMEMADE]; $returning->header = $result[DATATYPEBASE_HEADER]; $returning->content = $content; return $returning; }
protected function AllowedToManipulatePage(DBConnect &$db, $pageID){ $userID = $db->SelectOneOfOneField(PAGES, PAGES_USERID, PAGES_PAGEID."=$pageID"); if (!$userID){ return false; } return ($userID != _SESSION::GetUserID()); }