/**
  * 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);
     }
 }
 /**
  * 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();
     }
 }
Esempio n. 3
0
 /**
  * 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)
 {
     $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();
     }
 }
 /**
  * Save a supplementary file.
  * @param $args array ($suppFileId)
  * @param $request Request
  */
 function saveSuppFile($args, $request)
 {
     $articleId = $request->getUserVar('articleId');
     $this->validate($articleId);
     $this->setupTemplate(true, $articleId, 'summary');
     $submission =& $this->submission;
     $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('classes.notification.NotificationManager');
         $notificationManager = new NotificationManager();
         $articleDao =& DAORegistry::getDAO('ArticleDAO');
         $article =& $articleDao->getArticle($articleId);
         $notificationUsers = $article->getAssociatedUserIds(true, false);
         foreach ($notificationUsers as $userRole) {
             $notificationManager->createNotification($request, $userRole['id'], NOTIFICATION_TYPE_SUPP_FILE_MODIFIED, $article->getJournalId(), ASSOC_TYPE_ARTICLE, $article->getId());
         }
         $request->redirect(null, null, $this->_getFrom(), $articleId);
     } else {
         $submitForm->display();
     }
 }
 /**
  * Submit other supplementary research output
  * @param $args array ($articleId)
  *
  * Added by: AIM
  * Last Updated: July 18, 2011
  */
 function addOtherSuppResearchOutput($args, $request)
 {
     $articleId = (int) array_shift($args);
     $journal =& $request->getJournal();
     $this->validate($articleId);
     $authorSubmission =& $this->submission;
     $this->setupTemplate(true, $articleId, 'summary');
     import('classes.submission.form.SuppFileForm');
     $submitForm = new SuppFileForm($authorSubmission, $journal);
     //Added by AIM, June 22 2011
     $submitForm->setData('type', 'Other Supplementary Research Output');
     if ($submitForm->isLocaleResubmit()) {
         $submitForm->readInputData();
     } else {
         $submitForm->initData();
     }
     $submitForm->display();
 }
 /**
  * Save a supplementary file.
  * @param $args array ($suppFileId)
  */
 function saveSuppFile($args)
 {
     $articleId = Request::getUserVar('articleId');
     $this->validate($articleId);
     $this->setupTemplate(true, $articleId, 'summary');
     $submission =& $this->submission;
     $suppFileId = isset($args[0]) ? (int) $args[0] : 0;
     import('submission.form.SuppFileForm');
     $submitForm = new SuppFileForm($submission, $suppFileId);
     $submitForm->readInputData();
     if ($submitForm->validate()) {
         $submitForm->execute();
         // Send a notification to associated users
         import('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, $this->getFrom(), $articleId);
     } else {
         $submitForm->display();
     }
 }
Esempio n. 8
0
 /**
  * Save a supplementary file.
  * @param $args array ($suppFileId)
  */
 function saveSuppFile($args, $request)
 {
     $paperId = $request->getUserVar('paperId');
     $suppFileId = (int) array_shift($args);
     $this->validate($request, $paperId);
     $this->setupTemplate($request, true, $paperId, 'summary');
     $submission =& $this->submission;
     import('classes.submission.form.SuppFileForm');
     $submitForm = new SuppFileForm($submission, $suppFileId);
     $submitForm->readInputData();
     if ($submitForm->validate()) {
         $submitForm->execute();
         // Send a notification to associated users
         import('classes.notification.NotificationManager');
         $notificationManager = new NotificationManager();
         $paperDao = DAORegistry::getDAO('PaperDAO');
         $paper =& $paperDao->getPaper($paperId);
         $conference =& $request->getConference();
         $notificationUsers = $paper->getAssociatedUserIds(true, false);
         foreach ($notificationUsers as $userRole) {
             $notificationManager->createNotification($request, $userRole['id'], NOTIFICATION_TYPE_SUPP_FILE_MODIFIED, $conference->getId(), ASSOC_TYPE_PAPER, $paper->getId());
         }
         $request->redirect(null, null, null, 'submissionReview', $paperId);
     } else {
         $submitForm->display();
     }
 }