/** * @see Form::submit() */ public function submit() { // call submit event EventHandler::fireAction($this, 'submit'); $this->readFormParameters(); try { // attachment handling if ($this->showAttachments) { $this->attachmentListEditor->handleRequest(); } // preview if ($this->preview) { require_once WCF_DIR . 'lib/data/message/bbcode/AttachmentBBCode.class.php'; AttachmentBBCode::setAttachments($this->attachmentListEditor->getSortedAttachments()); WCF::getTPL()->assign('preview', ContestSolutionEditor::createPreview($this->subject, $this->text, $this->enableSmilies, $this->enableHtml, $this->enableBBCodes)); } // send message or save as draft if ($this->send) { $this->validate(); // no errors $this->save(); } } catch (UserInputException $e) { $this->errorField = $e->getField(); $this->errorType = $e->getType(); } }
/** * @see Form::submit() */ public function submit() { // call submit event EventHandler::fireAction($this, 'submit'); $this->readFormParameters(); try { // attachment handling if ($this->showAttachments) { $this->attachmentListEditor->handleRequest(); } $this->validate(); // no errors $this->save(); } catch (UserInputException $e) { $this->errorField = $e->getField(); $this->errorType = $e->getType(); } }