/**
  * @see PKPHandler::initialize()
  */
 function initialize(&$request, $args)
 {
     parent::initialize($request, $args);
     // Set the uploader roles (if given).
     $uploaderRoles = $request->getUserVar('uploaderRoles');
     if (!is_null($uploaderRoles)) {
         $this->_uploaderRoles = array();
         $uploaderRoles = explode('-', $uploaderRoles);
         foreach ($uploaderRoles as $uploaderRole) {
             if (!is_numeric($uploaderRole)) {
                 fatalError('Invalid uploader role!');
             }
             $this->_uploaderRoles[] = (int) $uploaderRole;
         }
     }
     // Do we allow revisions only?
     $this->_revisionOnly = (bool) $request->getUserVar('revisionOnly');
     $this->_reviewType = $request->getUserVar('reviewType') ? (int) $request->getUserVar('reviewType') : null;
     $this->_round = $request->getUserVar('round') ? (int) $request->getUserVar('round') : null;
     // The revised file will be non-null if we revise a single existing file.
     if ($this->getRevisionOnly() && $request->getUserVar('revisedFileId')) {
         $this->_revisedFileId = (int) $request->getUserVar('revisedFileId');
     }
     // Load translations.
     Locale::requireComponents(array(LOCALE_COMPONENT_OMP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_APPLICATION_COMMON));
 }
Пример #2
0
 /**
  * @see PKPHandler::initialize()
  */
 function initialize($request, $args)
 {
     parent::initialize($request, $args);
     // Already validated in authorize, if present.
     $this->_signoffId = $request->getUserVar('signoffId') ? (int) $request->getUserVar('signoffId') : null;
     $this->_symbolic = $request->getUserVar('symbolic') ? $request->getUserVar('symbolic') : null;
     // Load translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_PKP_GRID);
 }
 /**
  * @copydoc PKPHandler::initialize()
  */
 function initialize($request, $args)
 {
     parent::initialize($request, $args);
     // Configure the wizard with the authorized submission and file stage.
     // Validated in authorize.
     $this->_fileStage = (int) $request->getUserVar('fileStage');
     // Set the uploader roles (if given).
     $uploaderRoles = $request->getUserVar('uploaderRoles');
     if (!empty($uploaderRoles)) {
         $this->_uploaderRoles = array();
         $uploaderRoles = explode('-', $uploaderRoles);
         foreach ($uploaderRoles as $uploaderRole) {
             if (!is_numeric($uploaderRole)) {
                 fatalError('Invalid uploader role!');
             }
             $this->_uploaderRoles[] = (int) $uploaderRole;
         }
     }
     // Set the uploader group IDs (if given).
     $uploaderGroupIds = $request->getUserVar('uploaderGroupIds');
     if (!empty($uploaderGroupIds)) {
         $this->_uploaderGroupIds = array();
         $uploaderGroupIds = explode('-', $uploaderGroupIds);
         foreach ($uploaderGroupIds as $uploaderGroupId) {
             if (!is_numeric($uploaderGroupId)) {
                 fatalError('Invalid uploader group ID!');
             }
             $this->_uploaderGroupIds[] = (int) $uploaderGroupId;
         }
     }
     // Do we allow revisions only?
     $this->_revisionOnly = (bool) $request->getUserVar('revisionOnly');
     $reviewRound = $this->getReviewRound();
     $this->_assocType = $request->getUserVar('assocType') ? (int) $request->getUserVar('assocType') : null;
     $this->_assocId = $request->getUserVar('assocId') ? (int) $request->getUserVar('assocId') : null;
     // The revised file will be non-null if we revise a single existing file.
     if ($this->getRevisionOnly() && $request->getUserVar('revisedFileId')) {
         // Validated in authorize.
         $this->_revisedFileId = (int) $request->getUserVar('revisedFileId');
     }
     // Load translations.
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_SUBMISSION, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_COMMON, LOCALE_COMPONENT_APP_COMMON);
 }