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


PHP ArticleSearchIndex::articleDeleted方法代码示例

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


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

示例1: deleteSubmission

 /**
  * Delete a submission.
  * @param $args array
  * @param $request PKPRequest
  */
 function deleteSubmission($args, $request)
 {
     $articleId = (int) array_shift($args);
     $this->validate($request, $articleId);
     $authorSubmission =& $this->submission;
     $this->setupTemplate($request, true);
     // If the submission is incomplete, allow the author to delete it.
     if ($authorSubmission->getSubmissionProgress() != 0) {
         import('classes.file.ArticleFileManager');
         $articleFileManager = new ArticleFileManager($articleId);
         $articleFileManager->deleteArticleTree();
         $articleDao =& DAORegistry::getDAO('ArticleDAO');
         $articleDao->deleteArticleById($articleId);
         import('classes.search.ArticleSearchIndex');
         $articleSearchIndex = new ArticleSearchIndex();
         $articleSearchIndex->articleDeleted($articleId);
         $articleSearchIndex->articleChangesFinished();
     }
     $request->redirect(null, null, 'index');
 }
开发者ID:yuricampos,项目名称:ojs,代码行数:25,代码来源:TrackSubmissionHandler.inc.php

示例2: deleteById

 /**
  * @copydoc Submission::deleteById
  */
 function deleteById($submissionId)
 {
     parent::deleteById($submissionId);
     $publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticleDao->deletePublishedArticleByArticleId($submissionId);
     $articleGalleyDao = DAORegistry::getDAO('ArticleGalleyDAO');
     $articleGalleyDao->deleteByArticleId($submissionId);
     $articleSearchDao = DAORegistry::getDAO('ArticleSearchDAO');
     $articleSearchDao->deleteSubmissionKeywords($submissionId);
     // Delete article citations.
     $citationDao = DAORegistry::getDAO('CitationDAO');
     $citationDao->deleteObjectsByAssocId(ASSOC_TYPE_ARTICLE, $submissionId);
     import('classes.search.ArticleSearchIndex');
     $articleSearchIndex = new ArticleSearchIndex();
     $articleSearchIndex->articleDeleted($submissionId);
     $articleSearchIndex->articleChangesFinished();
     $this->flushCache();
 }
开发者ID:pkp,项目名称:ojs,代码行数:21,代码来源:ArticleDAO.inc.php

示例3: deleteArticleById

 /**
  * Delete an article by ID.
  * @param $articleId int
  */
 function deleteArticleById($articleId)
 {
     $this->authorDao->deleteAuthorsByArticle($articleId);
     $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticleDao->deletePublishedArticleByArticleId($articleId);
     $commentDao =& DAORegistry::getDAO('CommentDAO');
     $commentDao->deleteBySubmissionId($articleId);
     $noteDao =& DAORegistry::getDAO('NoteDAO');
     $noteDao->deleteByAssoc(ASSOC_TYPE_ARTICLE, $articleId);
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $sectionEditorSubmissionDao->deleteDecisionsByArticle($articleId);
     $sectionEditorSubmissionDao->deleteReviewRoundsByArticle($articleId);
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignmentDao->deleteBySubmissionId($articleId);
     $editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO');
     $editAssignmentDao->deleteEditAssignmentsByArticle($articleId);
     // Delete copyedit, layout, and proofread signoffs
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $copyedInitialSignoffs = $signoffDao->getBySymbolic('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $articleId);
     $copyedAuthorSignoffs = $signoffDao->getBySymbolic('SIGNOFF_COPYEDITING_AUTHOR', ASSOC_TYPE_ARTICLE, $articleId);
     $copyedFinalSignoffs = $signoffDao->getBySymbolic('SIGNOFF_COPYEDITING_FINAL', ASSOC_TYPE_ARTICLE, $articleId);
     $layoutSignoffs = $signoffDao->getBySymbolic('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
     $proofreadAuthorSignoffs = $signoffDao->getBySymbolic('SIGNOFF_PROOFREADING_AUTHOR', ASSOC_TYPE_ARTICLE, $articleId);
     $proofreadProofreaderSignoffs = $signoffDao->getBySymbolic('SIGNOFF_PROOFREADING_PROOFREADER', ASSOC_TYPE_ARTICLE, $articleId);
     $proofreadLayoutSignoffs = $signoffDao->getBySymbolic('SIGNOFF_PROOFREADING_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
     $signoffs = array($copyedInitialSignoffs, $copyedAuthorSignoffs, $copyedFinalSignoffs, $layoutSignoffs, $proofreadAuthorSignoffs, $proofreadProofreaderSignoffs, $proofreadLayoutSignoffs);
     foreach ($signoffs as $signoff) {
         if ($signoff) {
             $signoffDao->deleteObject($signoff);
         }
     }
     $articleCommentDao =& DAORegistry::getDAO('ArticleCommentDAO');
     $articleCommentDao->deleteArticleComments($articleId);
     $articleGalleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
     $articleGalleyDao->deleteGalleysByArticle($articleId);
     $articleSearchDao =& DAORegistry::getDAO('ArticleSearchDAO');
     $articleSearchDao->deleteArticleKeywords($articleId);
     $articleEventLogDao =& DAORegistry::getDAO('ArticleEventLogDAO');
     $articleEventLogDao->deleteByAssoc(ASSOC_TYPE_ARTICLE, $articleId);
     $articleEmailLogDao =& DAORegistry::getDAO('ArticleEmailLogDAO');
     $articleEmailLogDao->deleteByAssoc(ASSOC_TYPE_ARTICLE, $articleId);
     $notificationDao =& DAORegistry::getDAO('NotificationDAO');
     $notificationDao->deleteByAssoc(ASSOC_TYPE_ARTICLE, $articleId);
     $suppFileDao =& DAORegistry::getDAO('SuppFileDAO');
     $suppFileDao->deleteSuppFilesByArticle($articleId);
     // Delete article files -- first from the filesystem, then from the database
     import('classes.file.ArticleFileManager');
     $articleFileDao =& DAORegistry::getDAO('ArticleFileDAO');
     $articleFiles =& $articleFileDao->getArticleFilesByArticle($articleId);
     $articleFileManager = new ArticleFileManager($articleId);
     foreach ($articleFiles as $articleFile) {
         $articleFileManager->deleteFile($articleFile->getFileId());
     }
     $articleFileDao->deleteArticleFiles($articleId);
     // Delete article citations.
     $citationDao =& DAORegistry::getDAO('CitationDAO');
     $citationDao->deleteObjectsByAssocId(ASSOC_TYPE_ARTICLE, $articleId);
     $this->update('DELETE FROM article_settings WHERE article_id = ?', $articleId);
     $this->update('DELETE FROM articles WHERE article_id = ?', $articleId);
     import('classes.search.ArticleSearchIndex');
     $articleSearchIndex = new ArticleSearchIndex();
     $articleSearchIndex->articleDeleted($articleId);
     $articleSearchIndex->articleChangesFinished();
     $this->flushCache();
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:69,代码来源:ArticleDAO.inc.php

示例4: deleteById

 /**
  * Delete an article by ID.
  * @param $articleId int
  */
 function deleteById($articleId)
 {
     parent::deleteById($articleId);
     $publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticleDao->deletePublishedArticleByArticleId($articleId);
     $articleGalleyDao = DAORegistry::getDAO('ArticleGalleyDAO');
     $articleGalleyDao->deleteGalleysByArticle($articleId);
     $articleSearchDao = DAORegistry::getDAO('ArticleSearchDAO');
     $articleSearchDao->deleteSubmissionKeywords($articleId);
     $commentDao = DAORegistry::getDAO('CommentDAO');
     $commentDao->deleteBySubmissionId($submissionId);
     // Delete article files -- first from the filesystem, then from the database
     import('classes.file.ArticleFileManager');
     $articleFileDao = DAORegistry::getDAO('ArticleFileDAO');
     $articleFiles = $articleFileDao->getArticleFilesByArticle($articleId);
     $articleFileManager = new ArticleFileManager($articleId);
     foreach ($articleFiles as $articleFile) {
         $articleFileManager->deleteFile($articleFile->getFileId());
     }
     $articleFileDao->deleteArticleFiles($articleId);
     // Delete article citations.
     $citationDao = DAORegistry::getDAO('CitationDAO');
     $citationDao->deleteObjectsByAssocId(ASSOC_TYPE_ARTICLE, $articleId);
     import('classes.search.ArticleSearchIndex');
     $articleSearchIndex = new ArticleSearchIndex();
     $articleSearchIndex->articleDeleted($articleId);
     $articleSearchIndex->articleChangesFinished();
     $this->flushCache();
 }
开发者ID:utlib,项目名称:ojs,代码行数:33,代码来源:ArticleDAO.inc.php


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