Ejemplo n.º 1
0
 private function newReview($projectID, $userID, $content)
 {
     if (!empty($projectID) && !empty($userID) && !empty($content)) {
         $comObj = new Application_Model_DbTable_Reviews();
         $exData = array("Browser" => $_SERVER['HTTP_USER_AGENT'], "IP" => $_SERVER['REMOTE_ADDR']);
         $exDataJSON = json_encode($exData);
         $revData = array("project_ID" => $projectID, "user_ID" => $userID, "reviewContent" => $content, "extraData" => $exDataJSON, "dateCreated" => date('Y-m-d H:i:s'));
         $comObj->addNew($revData);
         return 1;
     } else {
         return 0;
     }
 }