/**
  * Save a supplementary file.
  * @param $args array ($suppFileId)
  */
 function saveSuppFile($args)
 {
     $paperId = Request::getUserVar('paperId');
     $this->validate($paperId, true);
     $authorSubmission =& $this->submission;
     parent::setupTemplate(true, $paperId, 'summary');
     $suppFileId = isset($args[0]) ? (int) $args[0] : 0;
     import('submission.form.SuppFileForm');
     $submitForm = new SuppFileForm($authorSubmission, $suppFileId);
     $submitForm->readInputData();
     if ($submitForm->validate()) {
         $submitForm->execute();
         Request::redirect(null, null, null, 'submission', $paperId);
     } else {
         $submitForm->display();
     }
 }
 /**
  * Save a supplementary file.
  * @param $args array ($suppFileId)
  */
 function saveSuppFile($args, &$request)
 {
     $articleId = Request::getUserVar('articleId');
     $this->validate($articleId);
     $authorSubmission =& $this->submission;
     $this->setupTemplate(true, $articleId, 'summary');
     if ($authorSubmission->getStatus() != STATUS_PUBLISHED && $authorSubmission->getStatus() != STATUS_ARCHIVED) {
         $suppFileId = isset($args[0]) ? (int) $args[0] : 0;
         import('classes.submission.form.SuppFileForm');
         $journal =& $request->getJournal();
         $submitForm = new SuppFileForm($authorSubmission, $journal, $suppFileId);
         $submitForm->readInputData();
         if ($submitForm->validate()) {
             $submitForm->execute();
             Request::redirect(null, null, 'submission', $articleId);
         } else {
             $submitForm->display();
         }
     } else {
         Request::redirect(null, null, 'submission', $articleId);
     }
 }
 /**
  * Upload a new supplementary file.
  * @param $fileName string
  * @param $round int
  */
 function _uploadSuppFile($request, $fileName = null, $round = null)
 {
     $paperId = (int) $request->getUserVar('paperId');
     $this->validate($request, $paperId);
     $conference =& $request->getConference();
     $schedConf =& $request->getSchedConf();
     $submission =& $this->submission;
     import('classes.submission.form.SuppFileForm');
     $suppFileForm = new SuppFileForm($submission);
     $suppFileForm->setData('title', array($submission->getLocale() => Locale::translate('common.untitled')));
     $suppFileId = $suppFileForm->execute($fileName);
     $request->redirect(null, null, null, 'editSuppFile', array($paperId, $suppFileId));
 }
 /**
  * Save a supplementary file.
  * @param $args array ($suppFileId)
  */
 function saveSuppFile($args, $request)
 {
     $articleId = $request->getUserVar('articleId');
     $submissionLayoutHandler = new SubmissionLayoutHandler();
     $submissionLayoutHandler->validate($articleId);
     $submission =& $submissionLayoutHandler->submission;
     $this->setupTemplate(true, $articleId, 'editing');
     $suppFileId = (int) array_shift($args);
     $journal =& $request->getJournal();
     import('classes.submission.form.SuppFileForm');
     $submitForm = new SuppFileForm($submission, $journal, $suppFileId);
     $submitForm->readInputData();
     if ($submitForm->validate()) {
         $submitForm->execute();
         // Send a notification to associated users
         import('lib.pkp.classes.notification.NotificationManager');
         $notificationManager = new NotificationManager();
         $articleDao =& DAORegistry::getDAO('ArticleDAO');
         $article =& $articleDao->getArticle($articleId);
         $notificationUsers = $article->getAssociatedUserIds(true, false);
         foreach ($notificationUsers as $userRole) {
             $url = $request->url(null, $userRole['role'], 'submissionEditing', $article->getId(), null, 'layout');
             $notificationManager->createNotification($userRole['id'], 'notification.type.suppFileModified', $article->getLocalizedTitle(), $url, 1, NOTIFICATION_TYPE_SUPP_FILE_MODIFIED);
         }
         $request->redirect(null, null, 'submission', $articleId);
     } else {
         $submitForm->display();
     }
 }
 /**
  * Upload a new supplementary file.
  */
 function uploadSuppFile($fileName = null, $request)
 {
     $articleId = $request->getUserVar('articleId');
     $this->validate($articleId);
     $submission =& $this->submission;
     $journal =& $request->getJournal();
     import('classes.submission.form.SuppFileForm');
     $suppFileForm = new SuppFileForm($submission, $journal);
     $suppFileForm->setData('title', array($submission->getLocale() => Locale::translate('common.untitled')));
     $suppFileId = $suppFileForm->execute($fileName);
     $request->redirect(null, null, 'editSuppFile', array($articleId, $suppFileId));
 }
 /**
  * Save a supplementary file.
  * @param $args array ($suppFileId)
  */
 function saveSuppFile($args, $request)
 {
     $paperId = $request->getUserVar('paperId');
     $this->validate($request, $paperId, true);
     $authorSubmission =& $this->submission;
     parent::setupTemplate($request, true, $paperId, 'summary');
     $suppFileId = (int) array_shift($args);
     import('classes.submission.form.SuppFileForm');
     $submitForm = new SuppFileForm($authorSubmission, $suppFileId);
     $submitForm->readInputData();
     if ($submitForm->validate()) {
         $submitForm->execute();
         $request->redirect(null, null, null, 'submission', $paperId);
     } else {
         $submitForm->display();
     }
 }
 /**
  * Upload a new supplementary file.
  */
 function uploadSuppFile($fileName = null)
 {
     $articleId = Request::getUserVar('articleId');
     $this->validate($articleId);
     $submission =& $this->submission;
     import('submission.form.SuppFileForm');
     $suppFileForm = new SuppFileForm($submission);
     $suppFileForm->setData('title', Locale::translate('common.untitled'));
     $suppFileId = $suppFileForm->execute($fileName);
     Request::redirect(null, null, 'editSuppFile', array($articleId, $suppFileId));
 }
 /**
  * Upload a new supplementary file.
  * @param $fileName string
  * @param $stage int
  */
 function uploadSuppFile($fileName = null, $stage = null)
 {
     $paperId = Request::getUserVar('paperId');
     list($conference, $schedConf, $submission) = $this->validate($paperId);
     import('submission.form.SuppFileForm');
     $suppFileForm = new SuppFileForm($submission);
     $suppFileForm->setData('title', Locale::translate('common.untitled'));
     $suppFileId = $suppFileForm->execute($fileName);
     Request::redirect(null, null, null, 'editSuppFile', array($paperId, $suppFileId));
 }
 /**
  * Upload a new supplementary file.
  * @param $fileName string
  * @param $stage int
  */
 function uploadSuppFile($fileName = null, $stage = null)
 {
     $paperId = Request::getUserVar('paperId');
     $this->validate($paperId);
     $conference =& Request::getConference();
     $schedConf =& Request::getSchedConf();
     $submission =& $this->submission;
     import('submission.form.SuppFileForm');
     $suppFileForm = new SuppFileForm($submission);
     $suppFileForm->setData('title', array(AppLocale::getLocale() => __('common.untitled')));
     $suppFileId = $suppFileForm->execute($fileName);
     Request::redirect(null, null, null, 'editSuppFile', array($paperId, $suppFileId));
 }