From: Marcel Werk Date: Fri, 15 Jul 2016 11:48:50 +0000 (+0200) Subject: Fixed usage of deprecated SearchIndexManager methods X-Git-Tag: 3.0.0_Beta_1~1125 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b6c7feea0a1f5226b5e2530b803b7fc0eb2ada74;p=GitHub%2FWoltLab%2FWCF.git Fixed usage of deprecated SearchIndexManager methods --- diff --git a/wcfsetup/install/files/lib/data/article/ArticleAction.class.php b/wcfsetup/install/files/lib/data/article/ArticleAction.class.php index a43096e058..40346f132c 100644 --- a/wcfsetup/install/files/lib/data/article/ArticleAction.class.php +++ b/wcfsetup/install/files/lib/data/article/ArticleAction.class.php @@ -81,7 +81,7 @@ class ArticleAction extends AbstractDatabaseObjectAction { } // update search index - SearchIndexManager::getInstance()->add('com.woltlab.wcf.article', $articleContent->articleContentID, $articleContent->content, $articleContent->title, $article->time, $article->userID, $article->username, ($languageID ?: null), $articleContent->teaser); + SearchIndexManager::getInstance()->set('com.woltlab.wcf.article', $articleContent->articleContentID, $articleContent->content, $articleContent->title, $article->time, $article->userID, $article->username, ($languageID ?: null), $articleContent->teaser); // save embedded objects if (!empty($content['htmlInputProcessor'])) { @@ -149,7 +149,7 @@ class ArticleAction extends AbstractDatabaseObjectAction { } // update search index - SearchIndexManager::getInstance()->add('com.woltlab.wcf.article', $articleContent->articleContentID, $articleContent->content, $articleContent->title, $article->time, $article->userID, $article->username, ($languageID ?: null), $articleContent->teaser); + SearchIndexManager::getInstance()->set('com.woltlab.wcf.article', $articleContent->articleContentID, $articleContent->content, $articleContent->title, $article->time, $article->userID, $article->username, ($languageID ?: null), $articleContent->teaser); // save embedded objects if (!empty($content['htmlInputProcessor'])) { diff --git a/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php b/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php index 7868fa558b..d1fba77883 100644 --- a/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php +++ b/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php @@ -108,16 +108,18 @@ class SearchIndexManager extends SingletonFactory implements ISearchIndexManager /** * @inheritDoc + * @deprecated 3.0 - please use `set() instead` */ public function add($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID = null, $metaData = '') { - $this->getSearchIndexManager()->add($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID, $metaData); + $this->set($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID, $metaData); } /** * @inheritDoc + * @deprecated 3.0 - please use `set() instead` */ public function update($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID = null, $metaData = '') { - $this->getSearchIndexManager()->update($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID, $metaData); + $this->set($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID, $metaData); } /** diff --git a/wcfsetup/install/files/lib/system/worker/ArticleRebuildDataWorker.class.php b/wcfsetup/install/files/lib/system/worker/ArticleRebuildDataWorker.class.php index 217d28066e..681ae73450 100644 --- a/wcfsetup/install/files/lib/system/worker/ArticleRebuildDataWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/ArticleRebuildDataWorker.class.php @@ -73,7 +73,7 @@ class ArticleRebuildDataWorker extends AbstractRebuildDataWorker { $comments[$articleContent->articleID] += $row['comments'] + $row['responses']; // update search index - SearchIndexManager::getInstance()->add('com.woltlab.wcf.article', $articleContent->articleContentID, $articleContent->content, $articleContent->title, $articles[$articleContent->articleID]->time, $articles[$articleContent->articleID]->userID, $articles[$articleContent->articleID]->username, $articleContent->languageID, $articleContent->teaser); + SearchIndexManager::getInstance()->set('com.woltlab.wcf.article', $articleContent->articleContentID, $articleContent->content, $articleContent->title, $articles[$articleContent->articleID]->time, $articles[$articleContent->articleID]->userID, $articles[$articleContent->articleID]->username, $articleContent->languageID, $articleContent->teaser); } // fetch cumulative likes