/** * Delete comment. */ function deleteComment($args) { $articleId = $args[0]; $commentId = $args[1]; $this->addCheck(new HandlerValidatorSubmissionComment($this, $commentId)); $this->validate(); $comment =& $this->comment; $this->setupTemplate(true); $submissionLayoutHandler = new SubmissionLayoutHandler(); $submissionLayoutHandler->validate($articleId); $submission =& $submissionLayoutHandler->submission; LayoutEditorAction::deleteComment($commentId); // Redirect back to initial comments page if ($comment->getCommentType() == COMMENT_TYPE_LAYOUT) { Request::redirect(null, null, 'viewLayoutComments', $articleId); } else { if ($comment->getCommentType() == COMMENT_TYPE_PROOFREAD) { Request::redirect(null, null, 'viewProofreadComments', $articleId); } } }
/** * Delete comment. * @param $args array * @param $request object */ function deleteComment($args, &$request) { $articleId = (int) array_shift($args); $commentId = (int) array_shift($args); $this->addCheck(new HandlerValidatorSubmissionComment($this, $commentId)); $this->validate($request, $articleId); $this->setupTemplate(true); LayoutEditorAction::deleteComment($commentId); // Redirect back to initial comments page if ($this->comment->getCommentType() == COMMENT_TYPE_LAYOUT) { $request->redirect(null, null, 'viewLayoutComments', $articleId); } else { if ($this->comment->getCommentType() == COMMENT_TYPE_PROOFREAD) { $request->redirect(null, null, 'viewProofreadComments', $articleId); } } }
/** * Delete comment. */ function deleteComment($args) { LayoutEditorHandler::validate(); LayoutEditorHandler::setupTemplate(true); $articleId = $args[0]; $commentId = $args[1]; list($journal, $submission) = SubmissionLayoutHandler::validate($articleId); list($comment) = SubmissionCommentsHandler::validate($commentId); LayoutEditorAction::deleteComment($commentId); // Redirect back to initial comments page if ($comment->getCommentType() == COMMENT_TYPE_LAYOUT) { Request::redirect(null, null, 'viewLayoutComments', $articleId); } else { if ($comment->getCommentType() == COMMENT_TYPE_PROOFREAD) { Request::redirect(null, null, 'viewProofreadComments', $articleId); } } }