/**
  * @see Form::save()
  */
 public function save()
 {
     CaptchaForm::save();
     // save solution
     $this->entry->update($this->solution);
     $this->saved();
     // forward
     HeaderUtil::redirect('index.php?page=Contest&contestID=' . $this->entry->contestID . '&solutionID=' . $this->entry->solutionID . SID_ARG_2ND_NOT_ENCODED . '#solution' . $this->entry->solutionID);
     exit;
 }
 /**
  * @see Action::execute()
  */
 public function execute()
 {
     parent::execute();
     // delete comment
     $this->comment->delete();
     $this->executed();
     // forward
     HeaderUtil::redirect('index.php?page=ContestComment&contestID=' . $this->comment->contestID . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     // save comment
     $comment = ContestCommentEditor::create($this->contest->contestID, $this->comment, WCF::getUser()->userID, $this->username);
     $this->saved();
     // forward
     HeaderUtil::redirect('index.php?page=Contest&contestID=' . $this->contest->contestID . '&commentID=' . $comment->commentID . SID_ARG_2ND_NOT_ENCODED . '#comment' . $comment->commentID);
     exit;
 }
Пример #4
0
 public function testReflectionAPI()
 {
     require_once WCF_DIR . 'lib/data/contest/comment/ContestCommentEditor.class.php';
     $this->deleteArray[] = $comment = ContestCommentEditor::create($contestID = 0, $comment = __METHOD__ . ' comment', $userID = 0, $username = __METHOD__ . ' username');
     $this->callAllMethodsWithoutRequiredParameters($comment);
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     $state = 'private';
     // save entry
     $entry = ContestEditor::create($this->userID, $this->groupID, $this->subject, $this->text, $this->getOptions(), $state, $this->classIDArray, $this->participants, $this->jurys, $this->prices, $this->sponsors, $this->attachmentListEditor);
     $this->saved();
     $contestID = $entry->contestID;
     if ($this->sponsortalk_trigger) {
         require_once WCF_DIR . 'lib/data/contest/sponsortalk/ContestSponsortalkEditor.class.php';
         $sponsortalk = ContestSponsortalkEditor::create($contestID, $this->sponsortalk_message, WCF::getUser()->userID, WCF::getUser()->username);
     }
     if ($this->jurytalk_trigger) {
         require_once WCF_DIR . 'lib/data/contest/jurytalk/ContestJurytalkEditor.class.php';
         $jurytalk = ContestJurytalkEditor::create($contestID, $this->jurytalk_message, WCF::getUser()->userID, WCF::getUser()->username);
     }
     if ($this->comment_trigger) {
         require_once WCF_DIR . 'lib/data/contest/comment/ContestCommentEditor.class.php';
         $comment = ContestCommentEditor::create($contestID, $this->comment_message, WCF::getUser()->userID, WCF::getUser()->username);
     }
     // save tags
     if (MODULE_TAGGING) {
         $tagArray = TaggingUtil::splitString($this->tags);
         if (count($tagArray)) {
             $entry->updateTags($tagArray);
         }
     }
     // forward
     HeaderUtil::redirect('index.php?page=Contest&contestID=' . $entry->contestID . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }