Skip to content

Commit

Permalink
Call setArticleStatus in place of markArticleChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Apr 1, 2022
1 parent 00b6a4b commit d78b2b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions LucenePlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ function callbackArticleMetadataChanged($hookName, $params) {
assert($hookName == 'ArticleSearchIndex::articleMetadataChanged');
list($article) = $params;
/* @var $article Article */
$this->_solrWebService->markArticleChanged($article->getId());
$this->_solrWebService->setArticleStatus($article->getId());
// in OJS core in many cases callbackArticleChangesFinished is not called.
// So we call it ourselves, it won't do anything is pull-indexing is active
$this->callbackArticleChangesFinished(null, null);
Expand All @@ -595,7 +595,7 @@ function callbackSubmissionFilesChanged($hookName, $params) {
assert($hookName == 'ArticleSearchIndex::submissionFilesChanged');
list($article) = $params;
/* @var $article Article */
$this->_solrWebService->markArticleChanged($article->getId());
$this->_solrWebService->setArticleStatus($article->getId());

return true;
}
Expand All @@ -606,7 +606,7 @@ function callbackSubmissionFilesChanged($hookName, $params) {
function callbackSubmissionFileChanged($hookName, $params) {
assert($hookName == 'ArticleSearchIndex::submissionFileChanged');
list($articleId, $type, $fileId) = $params;
$this->_solrWebService->markArticleChanged($articleId);
$this->_solrWebService->setArticleStatus($article->getId());
// in OJS core in many cases callbackArticleChangesFinished is not called.
// So we call it ourselves, it won't do anything is pull-indexing is active
$this->callbackArticleChangesFinished(null, null);
Expand All @@ -620,7 +620,7 @@ function callbackSubmissionFileChanged($hookName, $params) {
function callbackSubmissionFileDeleted($hookName, $params) {
assert($hookName == 'ArticleSearchIndex::submissionFileDeleted');
list($articleId, $type, $assocId) = $params;
$this->_solrWebService->markArticleChanged($articleId);
$this->_solrWebService->setArticleStatus($article->getId());

return true;
}
Expand Down

0 comments on commit d78b2b5

Please sign in to comment.