/** * 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); $trackSubmissionHandler = new TrackSubmissionHandler(); $trackSubmissionHandler->validate($articleId); $authorSubmission =& $trackSubmissionHandler->submission; AuthorAction::deleteComment($commentId); // Redirect back to initial comments page if ($comment->getCommentType() == COMMENT_TYPE_SECTION_DECISION) { Request::redirect(null, null, 'viewEditorDecisionComments', $articleId); } else { if ($comment->getCommentType() == COMMENT_TYPE_COPYEDIT) { Request::redirect(null, null, 'viewCopyeditComments', $articleId); } else { 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. */ function deleteComment($args) { $paperId = $args[0]; $commentId = $args[1]; $this->addCheck(new HandlerValidatorSubmissionComment($this, $commentId)); $this->validate(); $comment =& $this->comment; $this->setupTemplate(true); $trackSubmissionHandler = new TrackSubmissionHandler(); $trackSubmissionHandler->validate($paperId); $authorSubmission =& $trackSubmissionHandler->submission; AuthorAction::deleteComment($commentId); // Redirect back to initial comments page if ($comment->getCommentType() == COMMENT_TYPE_DIRECTOR_DECISION) { Request::redirect(null, null, null, 'viewDirectorDecisionComments', $paperId); } }
/** * Delete comment. */ function deleteComment($args) { AuthorHandler::validate(); AuthorHandler::setupTemplate(true); $articleId = $args[0]; $commentId = $args[1]; $articleCommentDao =& DAORegistry::getDAO('ArticleCommentDAO'); $comment =& $articleCommentDao->getArticleCommentById($commentId); list($journal, $authorSubmission) = TrackSubmissionHandler::validate($articleId); list($comment) = SubmissionCommentsHandler::validate($commentId); AuthorAction::deleteComment($commentId); // Redirect back to initial comments page if ($comment->getCommentType() == COMMENT_TYPE_EDITOR_DECISION) { Request::redirect(null, null, 'viewEditorDecisionComments', $articleId); } else { if ($comment->getCommentType() == COMMENT_TYPE_COPYEDIT) { Request::redirect(null, null, 'viewCopyeditComments', $articleId); } else { 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); } } } } }
/** * Display a form to pay for Publishing an article * @param $args array ($articleId) */ function payPublicationFee($args) { $articleId = isset($args[0]) ? $args[0] : 0; list($journal, $submission) = TrackSubmissionHandler::validate($articleId); parent::setupTemplate(true, $articleId); import('payment.ojs.OJSPaymentManager'); $paymentManager =& OJSPaymentManager::getManager(); $user =& Request::getUser(); $queuedPayment =& $paymentManager->createQueuedPayment($journal->getJournalId(), PAYMENT_TYPE_PUBLICATION, $user->getUserId(), $articleId, $journal->getSetting('publicationFee')); $queuedPaymentId = $paymentManager->queuePayment($queuedPayment); $paymentManager->displayPaymentForm($queuedPaymentId, $queuedPayment); }