Esempio n. 1
0
 private function onEdit()
 {
     $form = $this->getForm();
     if (false !== ($errors = $form->validate($this->module))) {
         return $errors . $this->templateEdit();
     }
     $data = array('pm_title' => $form->getVar('title'), 'pm_message' => $form->getVar('message'));
     if (false === $this->pm->saveVars($data)) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     if (false !== ($pm2 = $this->pm->getOtherPM())) {
         if (false === $pm2->saveVars($data)) {
             return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
         }
     }
     return $this->module->message('msg_edited') . $this->module->requestMethodB('Overview');
 }