EditorDecisionWithEmailForm::_updateReviewRoundStatus PHP Method

_updateReviewRoundStatus() public method

Retrieve the last review round and update it with the new status.
public _updateReviewRoundStatus ( $submission, $status, $reviewRound = null )
$submission Submission
$status integer One of the REVIEW_ROUND_STATUS_* constants.
    function _updateReviewRoundStatus($submission, $status, $reviewRound = null)
    {
        $reviewRoundDao = DAORegistry::getDAO('ReviewRoundDAO');
        /* @var $reviewRoundDao ReviewRoundDAO */
        if (!$reviewRound) {
            $reviewRound = $reviewRoundDao->getLastReviewRoundBySubmissionId($submission->getId());
        }
        // If we don't have a review round, it's because the submission is being
        // accepted without starting any of the review stages. In that case we
        // do nothing.
        if (is_a($reviewRound, 'ReviewRound')) {
            $reviewRoundDao->updateStatus($reviewRound, null, $status);
        }
    }