当前位置: 首页>>代码示例>>PHP>>正文


PHP SectionEditorAction::setCopyeditFile方法代码示例

本文整理汇总了PHP中SectionEditorAction::setCopyeditFile方法的典型用法代码示例。如果您正苦于以下问题:PHP SectionEditorAction::setCopyeditFile方法的具体用法?PHP SectionEditorAction::setCopyeditFile怎么用?PHP SectionEditorAction::setCopyeditFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SectionEditorAction的用法示例。


在下文中一共展示了SectionEditorAction::setCopyeditFile方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: editorReview

 function editorReview()
 {
     $articleId = Request::getUserVar('articleId');
     list($journal, $submission) = SubmissionEditHandler::validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
     $redirectTarget = 'submissionReview';
     // If the Upload button was pressed.
     $submit = Request::getUserVar('submit');
     if ($submit != null) {
         SectionEditorAction::uploadEditorVersion($submission);
     }
     if (Request::getUserVar('setCopyeditFile')) {
         // If the Send To Copyedit button was pressed
         $file = explode(',', Request::getUserVar('editorDecisionFile'));
         if (isset($file[0]) && isset($file[1])) {
             $round = $submission->getCurrentRound();
             if ($submission->getMostRecentEditorDecisionComment()) {
                 // The conditions are met for being able
                 // to send a file to copyediting.
                 SectionEditorAction::setCopyeditFile($submission, $file[0], $file[1]);
             }
             $redirectTarget = 'submissionEditing';
         }
     } else {
         if (Request::getUserVar('resubmit')) {
             // If the Resubmit button was pressed
             $file = explode(',', Request::getUserVar('editorDecisionFile'));
             if (isset($file[0]) && isset($file[1])) {
                 SectionEditorAction::resubmitFile($submission, $file[0], $file[1]);
             }
         }
     }
     Request::redirect(null, null, $redirectTarget, $articleId);
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:33,代码来源:SubmissionEditHandler.inc.php

示例2: editorReview

 function editorReview()
 {
     $articleId = Request::getUserVar('articleId');
     $this->validate($articleId, SECTION_EDITOR_ACCESS_REVIEW);
     $submission =& $this->submission;
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $redirectTarget = 'submissionReview';
     // If the Upload button was pressed.
     $submit = Request::getUserVar('submit');
     if ($submit != null) {
         SectionEditorAction::uploadEditorVersion($submission);
     }
     if (Request::getUserVar('setCopyeditFile')) {
         // If the Send To Copyedit button was pressed
         $file = explode(',', Request::getUserVar('editorDecisionFile'));
         if (isset($file[0]) && isset($file[1])) {
             $round = $submission->getCurrentRound();
             if ($submission->getMostRecentEditorDecisionComment()) {
                 // The conditions are met for being able
                 // to send a file to copyediting.
                 SectionEditorAction::setCopyeditFile($submission, $file[0], $file[1]);
             }
             $redirectTarget = 'submissionEditing';
         }
     } else {
         if (Request::getUserVar('resubmit')) {
             // If the Resubmit button was pressed
             $file = explode(',', Request::getUserVar('editorDecisionFile'));
             if (isset($file[0]) && isset($file[1])) {
                 SectionEditorAction::resubmitFile($submission, $file[0], $file[1]);
                 $signoff = $signoffDao->build('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $submission->getId());
                 $signoff->setFileId($file[0]);
                 $signoff->setFileRevision($file[1]);
                 $signoffDao->updateObject($signoff);
             }
         }
     }
     Request::redirect(null, null, $redirectTarget, $articleId);
 }
开发者ID:master3395,项目名称:CBPPlatform,代码行数:39,代码来源:SubmissionEditHandler.inc.php

示例3: expediteSubmission

 /**
  * Rush a new submission into the end of the editing queue.
  * @param $article object
  */
 function expediteSubmission($article)
 {
     $user =& Request::getUser();
     import('submission.editor.EditorAction');
     import('submission.sectionEditor.SectionEditorAction');
     import('submission.proofreader.ProofreaderAction');
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getArticleId());
     $submissionFile = $sectionEditorSubmission->getSubmissionFile();
     // Add a long entry before doing anything.
     import('article.log.ArticleLog');
     import('article.log.ArticleEventLogEntry');
     ArticleLog::logEvent($article->getArticleId(), ARTICLE_LOG_EDITOR_EXPEDITE, ARTICLE_LOG_TYPE_EDITOR, $user->getUserId(), 'log.editor.submissionExpedited', array('editorName' => $user->getFullName(), 'articleId' => $article->getArticleId()));
     // 1. Ensure that an editor is assigned.
     $editAssignments =& $sectionEditorSubmission->getEditAssignments();
     if (empty($editAssignments)) {
         // No editors are currently assigned; assign self.
         EditorAction::assignEditor($article->getArticleId(), $user->getUserId(), true);
     }
     // 2. Accept the submission and send to copyediting.
     $sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getArticleId());
     if (!$sectionEditorSubmission->getCopyeditFile()) {
         SectionEditorAction::recordDecision($sectionEditorSubmission, SUBMISSION_EDITOR_DECISION_ACCEPT);
         $reviewFile = $sectionEditorSubmission->getReviewFile();
         SectionEditorAction::setCopyeditFile($sectionEditorSubmission, $reviewFile->getFileId(), $reviewFile->getRevision());
     }
     // 3. Add a galley.
     $sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getArticleId());
     $galleys =& $sectionEditorSubmission->getGalleys();
     if (empty($galleys)) {
         // No galley present -- use copyediting file.
         import('file.ArticleFileManager');
         $copyeditFile =& $sectionEditorSubmission->getCopyeditFile();
         $fileType = $copyeditFile->getFileType();
         $articleFileManager =& new ArticleFileManager($article->getArticleId());
         $fileId = $articleFileManager->copyPublicFile($copyeditFile->getFilePath(), $fileType);
         if (strstr($fileType, 'html')) {
             $galley =& new ArticleHTMLGalley();
         } else {
             $galley =& new ArticleGalley();
         }
         $galley->setArticleId($article->getArticleId());
         $galley->setFileId($fileId);
         $galley->setLocale(Locale::getLocale());
         if ($galley->isHTMLGalley()) {
             $galley->setLabel('HTML');
         } else {
             if (strstr($fileType, 'pdf')) {
                 $galley->setLabel('PDF');
             } else {
                 if (strstr($fileType, 'postscript')) {
                     $galley->setLabel('Postscript');
                 } else {
                     if (strstr($fileType, 'xml')) {
                         $galley->setLabel('XML');
                     } else {
                         $galley->setLabel(Locale::translate('common.untitled'));
                     }
                 }
             }
         }
         $galleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
         $galleyDao->insertGalley($galley);
     }
     $sectionEditorSubmission->setStatus(STATUS_QUEUED);
     $sectionEditorSubmissionDao->updateSectionEditorSubmission($sectionEditorSubmission);
 }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:71,代码来源:EditorAction.inc.php

示例4: expediteSubmission

 /**
  * Rush a new submission into the end of the editing queue.
  * @param $article object
  */
 function expediteSubmission($article, $request)
 {
     $user =& $request->getUser();
     import('classes.submission.editor.EditorAction');
     import('classes.submission.sectionEditor.SectionEditorAction');
     import('classes.submission.proofreader.ProofreaderAction');
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getId());
     $submissionFile = $sectionEditorSubmission->getSubmissionFile();
     // Add a log entry before doing anything.
     import('classes.article.log.ArticleLog');
     import('classes.article.log.ArticleEventLogEntry');
     ArticleLog::logEvent($request, $article, ARTICLE_LOG_EDITOR_EXPEDITE, 'log.editor.submissionExpedited', array('editorName' => $user->getFullName()));
     // 1. Ensure that an editor is assigned.
     $editAssignments =& $sectionEditorSubmission->getEditAssignments();
     if (empty($editAssignments)) {
         // No editors are currently assigned; assign self.
         EditorAction::assignEditor($article->getId(), $user->getId(), true, false, $request);
     }
     // 2. Accept the submission and send to copyediting.
     $sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getId());
     if (!$sectionEditorSubmission->getFileBySignoffType('SIGNOFF_COPYEDITING_INITIAL', true)) {
         SectionEditorAction::recordDecision($sectionEditorSubmission, SUBMISSION_EDITOR_DECISION_ACCEPT, $request);
         $reviewFile = $sectionEditorSubmission->getReviewFile();
         SectionEditorAction::setCopyeditFile($sectionEditorSubmission, $reviewFile->getFileId(), $reviewFile->getRevision(), $request);
     }
     // 3. Add a galley.
     $sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($article->getId());
     $galleys =& $sectionEditorSubmission->getGalleys();
     if (empty($galleys)) {
         // No galley present -- use copyediting file.
         import('classes.file.ArticleFileManager');
         $copyeditFile =& $sectionEditorSubmission->getFileBySignoffType('SIGNOFF_COPYEDITING_INITIAL');
         $fileType = $copyeditFile->getFileType();
         $articleFileManager = new ArticleFileManager($article->getId());
         $fileId = $articleFileManager->copyPublicFile($copyeditFile->getFilePath(), $fileType);
         if (strstr($fileType, 'html')) {
             $galley = new ArticleHTMLGalley();
         } else {
             $galley = new ArticleGalley();
         }
         $galley->setArticleId($article->getId());
         $galley->setFileId($fileId);
         $galley->setLocale(AppLocale::getLocale());
         if ($galley->isHTMLGalley()) {
             $galley->setLabel('HTML');
         } else {
             if (strstr($fileType, 'pdf')) {
                 $galley->setLabel('PDF');
             } else {
                 if (strstr($fileType, 'postscript')) {
                     $galley->setLabel('Postscript');
                 } else {
                     if (strstr($fileType, 'xml')) {
                         $galley->setLabel('XML');
                     } else {
                         $galley->setLabel(__('common.untitled'));
                     }
                 }
             }
         }
         $galleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
         $galleyDao->insertGalley($galley);
         // Update file search index
         import('classes.search.ArticleSearchIndex');
         ArticleSearchIndex::updateFileIndex($article->getId(), ARTICLE_SEARCH_GALLEY_FILE, $fileId);
     }
     $sectionEditorSubmission->setStatus(STATUS_QUEUED);
     $sectionEditorSubmissionDao->updateSectionEditorSubmission($sectionEditorSubmission);
 }
开发者ID:reconciler,项目名称:ojs,代码行数:74,代码来源:EditorAction.inc.php


注:本文中的SectionEditorAction::setCopyeditFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。