Ejemplo n.º 1
0
 /**
  * Delete comment.
  */
 function deleteComment($args, $request)
 {
     $paperId = (int) array_shift($args);
     $commentId = (int) array_shift($args);
     $this->addCheck(new HandlerValidatorSubmissionComment($this, $commentId));
     $this->validate($request);
     $comment =& $this->comment;
     $submissionEditHandler = new SubmissionEditHandler();
     $submissionEditHandler->validate($request, $paperId);
     $paperDao = DAORegistry::getDAO('PaperDAO');
     $submission =& $paperDao->getPaper($paperId);
     TrackDirectorAction::deleteComment($commentId);
     // Redirect back to initial comments page
     if ($comment->getCommentType() == COMMENT_TYPE_PEER_REVIEW) {
         $request->redirect(null, null, null, 'viewPeerReviewComments', array($paperId, $comment->getAssocId()));
     } else {
         if ($comment->getCommentType() == COMMENT_TYPE_DIRECTOR_DECISION) {
             $request->redirect(null, null, null, 'viewDirectorDecisionComments', $paperId);
         }
     }
 }