當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。