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


PHP ArticleFileManager::copyToCopyeditFile方法代码示例

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


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

示例1: setCopyeditFile

 /**
  * Set the file to use as the default copyedit file.
  * @param $sectionEditorSubmission object
  * @param $fileId int
  * @param $revision int
  * TODO: SECURITY!
  */
 function setCopyeditFile($sectionEditorSubmission, $fileId, $revision, $request)
 {
     import('classes.file.ArticleFileManager');
     $articleFileManager = new ArticleFileManager($sectionEditorSubmission->getId());
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $articleFileDao =& DAORegistry::getDAO('ArticleFileDAO');
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $user =& $request->getUser();
     if (!HookRegistry::call('SectionEditorAction::setCopyeditFile', array(&$sectionEditorSubmission, &$fileId, &$revision))) {
         // Copy the file from the editor decision file folder to the copyedit file folder
         $newFileId = $articleFileManager->copyToCopyeditFile($fileId, $revision);
         $copyeditSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $sectionEditorSubmission->getId());
         $copyeditSignoff->setFileId($newFileId);
         $copyeditSignoff->setFileRevision(1);
         $signoffDao->updateObject($copyeditSignoff);
         // Add log
         import('classes.article.log.ArticleLog');
         import('classes.article.log.ArticleEventLogEntry');
         ArticleLog::logEvent($request, $sectionEditorSubmission, ARTICLE_LOG_COPYEDIT_SET_FILE, 'log.copyedit.copyeditFileSet');
     }
 }
开发者ID:yuricampos,项目名称:ojs,代码行数:28,代码来源:SectionEditorAction.inc.php

示例2: setCopyeditFile

 /**
  * Set the file to use as the default copyedit file.
  * @param $sectionEditorSubmission object
  * @param $fileId int
  * TODO: SECURITY!
  */
 function setCopyeditFile($sectionEditorSubmission, $fileId)
 {
     import('classes.file.ArticleFileManager');
     $articleFileManager = new ArticleFileManager($sectionEditorSubmission->getArticleId());
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $articleFileDao =& DAORegistry::getDAO('ArticleFileDAO');
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $user =& Request::getUser();
     if (!HookRegistry::call('SectionEditorAction::setCopyeditFile', array(&$sectionEditorSubmission, &$fileId))) {
         // Copy the file from the editor decision file folder to the copyedit file folder
         $newFileId = $articleFileManager->copyToCopyeditFile($fileId);
         $copyeditSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $sectionEditorSubmission->getArticleId());
         $copyeditSignoff->setFileId($newFileId);
         // No revision anymore
         //$copyeditSignoff->setFileRevision(1);
         $signoffDao->updateObject($copyeditSignoff);
         // Add log
         import('classes.article.log.ArticleLog');
         import('classes.article.log.ArticleEventLogEntry');
         Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON));
         ArticleLog::logEvent($sectionEditorSubmission->getArticleId(), ARTICLE_LOG_COPYEDIT_SET_FILE, ARTICLE_LOG_TYPE_COPYEDIT, $sectionEditorSubmission->getFileBySignoffType('SIGNOFF_COPYEDITING_INITIAL', true), 'log.copyedit.copyeditFileSet');
     }
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:29,代码来源:SectionEditorAction.inc.php


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