Example #1
0
 /**
  * @param string $get_array
  * @return string
  * @throws ProjectSetNextStatusException
  * @throws ProjectSecurityAccessDeniedException
  * @throws ProjectIDMissingException
  */
 public static function proceed_project($get_array, $comment)
 {
     global $project_security;
     if ($get_array) {
         $_GET = unserialize($get_array);
     }
     if ($_GET['project_id']) {
         $project = new Project($_GET['project_id']);
         if ($project_security->is_access(3, false) == true) {
             if ($comment and $comment != "undefined") {
                 $project_log = new ProjectLog(null);
                 if ($project_log->create($_GET['project_id'], $comment) == null) {
                     throw new ProjectSetNextStatusException();
                 }
             }
             $project->set_next_status();
         } else {
             throw new ProjectSecurityAccessDeniedException();
         }
     } else {
         throw new ProjectIDMissingException();
     }
 }