function editorReview()
 {
     $articleId = Request::getUserVar('articleId');
     list($journal, $submission) = SubmissionEditHandler::validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
     $redirectTarget = 'submissionReview';
     // If the Upload button was pressed.
     $submit = Request::getUserVar('submit');
     if ($submit != null) {
         SectionEditorAction::uploadEditorVersion($submission);
     }
     if (Request::getUserVar('setCopyeditFile')) {
         // If the Send To Copyedit button was pressed
         $file = explode(',', Request::getUserVar('editorDecisionFile'));
         if (isset($file[0]) && isset($file[1])) {
             $round = $submission->getCurrentRound();
             if ($submission->getMostRecentEditorDecisionComment()) {
                 // The conditions are met for being able
                 // to send a file to copyediting.
                 SectionEditorAction::setCopyeditFile($submission, $file[0], $file[1]);
             }
             $redirectTarget = 'submissionEditing';
         }
     } else {
         if (Request::getUserVar('resubmit')) {
             // If the Resubmit button was pressed
             $file = explode(',', Request::getUserVar('editorDecisionFile'));
             if (isset($file[0]) && isset($file[1])) {
                 SectionEditorAction::resubmitFile($submission, $file[0], $file[1]);
             }
         }
     }
     Request::redirect(null, null, $redirectTarget, $articleId);
 }
 function editorReview()
 {
     $articleId = Request::getUserVar('articleId');
     $this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
     $submission =& $this->submission;
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $redirectTarget = 'submissionReview';
     // If the Upload button was pressed.
     $submit = Request::getUserVar('submit');
     if ($submit != null) {
         SectionEditorAction::uploadEditorVersion($submission);
     }
     if (Request::getUserVar('setCopyeditFile')) {
         // If the Send To Copyedit button was pressed
         $file = explode(',', Request::getUserVar('editorDecisionFile'));
         if (isset($file[0]) && isset($file[1])) {
             $round = $submission->getCurrentRound();
             if ($submission->getMostRecentEditorDecisionComment()) {
                 // The conditions are met for being able
                 // to send a file to copyediting.
                 SectionEditorAction::setCopyeditFile($submission, $file[0], $file[1]);
             }
             $redirectTarget = 'submissionEditing';
         }
     } else {
         if (Request::getUserVar('resubmit')) {
             // If the Resubmit button was pressed
             $file = explode(',', Request::getUserVar('editorDecisionFile'));
             if (isset($file[0]) && isset($file[1])) {
                 SectionEditorAction::resubmitFile($submission, $file[0], $file[1]);
                 $signoff = $signoffDao->build('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $submission->getId());
                 $signoff->setFileId($file[0]);
                 $signoff->setFileRevision($file[1]);
                 $signoffDao->updateObject($signoff);
             }
         }
     }
     Request::redirect(null, null, $redirectTarget, $articleId);
 }