Example #1
0
 public function verifyActionData()
 {
     $returnValue = true;
     if ($this->action_id != NULL && !TasksappValidator::checkInteger($this->action_id)) {
         $this->errorArray['action_id'] = true;
     }
     if (!TasksappValidator::checkString($this->action)) {
         $this->errorArray['action'] = true;
     }
     if (!TasksappValidator::checkList($this->importance, array("0", "1", "2", "3", "4", "wf"))) {
         $this->errorArray['importance'] = true;
     }
     if (!TasksappValidator::checkDate($this->dateDue)) {
         $this->errorArray['dateDue'] = true;
     }
     if (!TasksappValidator::checkList($this->context, Command::getContexts())) {
         $this->errorArray['context'] = true;
     }
     if (!TasksappValidator::checkInteger($this->project_id)) {
         $this->errorArray['project_id'] = true;
     }
     if (count($this->errorArray) != 0) {
         $returnValue = false;
     }
     return $returnValue;
 }