Beispiel #1
0
 /**
  * Save Mission Leg's Comment
  * CODE:
  */
 public function executeSaveComment()
 {
     if ($this->getRequest()->getMethod() == sfRequest::POST) {
         $this->pilot_req = PilotRequestPeer::retrieveByPk($this->getRequestParameter('id'));
         if (isset($this->pilot_req) && $this->pilot_req instanceof PilotRequest) {
             if (trim($this->getRequestParameter('value'))) {
                 $this->pilot_req->setComment($this->getRequestParameter('value'));
                 $this->pilot_req->save();
                 /*$str = <<<XYZ
                         <script type="text/javascript">
                         window.location.reload();
                         </script>
                 XYZ;*/
                 return $this->renderText($this->getRequestParameter('value'));
             }
         }
     }
 }