예제 #1
0
 /**
  * Download a file.
  * @param $args array ($paperId, $fileId, [$revision])
  */
 function downloadFile($args)
 {
     $paperId = isset($args[0]) ? $args[0] : 0;
     $fileId = isset($args[1]) ? $args[1] : 0;
     $revision = isset($args[2]) ? $args[2] : null;
     $this->validate($paperId);
     $submission =& $this->submission;
     if (!AuthorAction::downloadAuthorFile($submission, $fileId, $revision)) {
         Request::redirect(null, null, null, 'submission', $paperId);
     }
 }
예제 #2
0
 /**
  * Download a file.
  * @param $args array ($articleId, $fileId)
  */
 function downloadFile($args)
 {
     $articleId = isset($args[0]) ? $args[0] : 0;
     $fileId = isset($args[1]) ? $args[1] : 0;
     $this->validate($articleId);
     $submission =& $this->submission;
     if (!AuthorAction::downloadAuthorFile($submission, $fileId)) {
         Request::redirect(null, null, 'submission', $articleId);
     }
 }
 /**
  * Download a file.
  * @param $args array ($paperId, $fileId, [$revision])
  */
 function downloadFile($args, $request)
 {
     $paperId = (int) array_shift($args);
     $fileId = (int) array_shift($args);
     $revision = (int) array_shift($args);
     if (!$revision) {
         $revision = null;
     }
     $this->validate($request, $paperId);
     $submission =& $this->submission;
     if (!AuthorAction::downloadAuthorFile($submission, $fileId, $revision)) {
         $request->redirect(null, null, null, 'submission', $paperId);
     }
 }
 /**
  * Download a file.
  * @param $args array ($articleId, $fileId, [$revision])
  */
 function downloadFile($args)
 {
     $articleId = isset($args[0]) ? $args[0] : 0;
     $fileId = isset($args[1]) ? $args[1] : 0;
     $revision = isset($args[2]) ? $args[2] : null;
     list($journal, $submission) = TrackSubmissionHandler::validate($articleId);
     if (!AuthorAction::downloadAuthorFile($submission, $fileId, $revision)) {
         Request::redirect(null, null, 'submission', $articleId);
     }
 }