From cf7aa4a77546c7b7e3c97b64aa492bef1cb2342b Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 8 Jun 2016 16:07:41 +0200 Subject: [PATCH] Deprecated `add()` and `update()`, use `set()` instead --- .../search/AbstractSearchIndexManager.class.php | 7 +++++++ .../system/search/ISearchIndexManager.class.php | 17 +++++++++++++++++ .../system/search/SearchIndexManager.class.php | 7 +++++++ 3 files changed, 31 insertions(+) diff --git a/wcfsetup/install/files/lib/system/search/AbstractSearchIndexManager.class.php b/wcfsetup/install/files/lib/system/search/AbstractSearchIndexManager.class.php index 87e2a4fdbb..d04eab6427 100644 --- a/wcfsetup/install/files/lib/system/search/AbstractSearchIndexManager.class.php +++ b/wcfsetup/install/files/lib/system/search/AbstractSearchIndexManager.class.php @@ -17,6 +17,13 @@ use wcf\system\WCF; * @category Community Framework */ abstract class AbstractSearchIndexManager extends SingletonFactory implements ISearchIndexManager { + /** + * @inheritDoc + */ + public function set($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID = null, $metaData = '') { + $this->add($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID, $metaData); + } + /** * @inheritDoc */ diff --git a/wcfsetup/install/files/lib/system/search/ISearchIndexManager.class.php b/wcfsetup/install/files/lib/system/search/ISearchIndexManager.class.php index edcf34a56a..65523e12aa 100644 --- a/wcfsetup/install/files/lib/system/search/ISearchIndexManager.class.php +++ b/wcfsetup/install/files/lib/system/search/ISearchIndexManager.class.php @@ -12,6 +12,21 @@ namespace wcf\system\search; * @category Community Framework */ interface ISearchIndexManager { + /** + * Adds or updates an entry. + * + * @param string $objectType + * @param integer $objectID + * @param string $message + * @param string $subject + * @param integer $time + * @param integer $userID + * @param string $username + * @param integer $languageID + * @param string $metaData + */ + public function set($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID = null, $metaData = ''); + /** * Adds a new entry. * @@ -24,6 +39,7 @@ interface ISearchIndexManager { * @param string $username * @param integer $languageID * @param string $metaData + * @deprecated 2.2 - please use `set()` instead */ public function add($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID = null, $metaData = ''); @@ -39,6 +55,7 @@ interface ISearchIndexManager { * @param string $username * @param integer $languageID * @param string $metaData + * @deprecated 2.2 - please use `set() instead` */ public function update($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID = null, $metaData = ''); diff --git a/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php b/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php index 15706a9c4f..0c7808cf8e 100644 --- a/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php +++ b/wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php @@ -101,6 +101,13 @@ class SearchIndexManager extends SingletonFactory implements ISearchIndexManager return $this->searchIndexManager; } + /** + * @inheritDoc + */ + public function set($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID = null, $metaData = '') { + $this->getSearchIndexManager()->set($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID, $metaData); + } + /** * @inheritDoc */ -- 2.20.1