Example #1
0
 /**
  * Add the single most recent editorial file to the deposit package.
  * @return boolean true iff a file was successfully added to the package
  */
 function addEditorial()
 {
     // Move through signoffs in reverse order and try to use them.
     foreach (array('SIGNOFF_LAYOUT', 'SIGNOFF_COPYEDITING_FINAL', 'SIGNOFF_COPYEDITING_AUTHOR', 'SIGNOFF_COPYEDITING_INITIAL') as $signoffName) {
         assert(false);
         // Signoff implementation has changed; needs fixing.
         $file = $this->article->getFileBySignoffType($signoffName);
         if ($file) {
             $this->_addFile($file);
             return true;
         }
         unset($file);
     }
     // If that didn't work, try the Editor Version.
     $sectionEditorSubmissionDao = DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $sectionEditorSubmission = $sectionEditorSubmissionDao->getSectionEditorSubmission($this->article->getId());
     $file = $sectionEditorSubmission->getEditorFile();
     if ($file) {
         $this->_addFile($file);
         return true;
     }
     unset($file);
     // Try the Review Version.
     /* FIXME for OJS 3.0
     		$file = $sectionEditorSubmission->getReviewFile();
     		if ($file) {
     			$this->_addFile($file);
     			return true;
     		}
     		unset($file); */
     // Otherwise, don't add anything (best not to go back to the
     // author version, as it may not be vetted)
     return false;
 }