From: Alexander Ebert Date: Wed, 8 Jun 2016 14:07:41 +0000 (+0200) Subject: Deprecated `add()` and `update()`, use `set()` instead X-Git-Tag: 3.0.0_Beta_1~1479 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf7aa4a77546c7b7e3c97b64aa492bef1cb2342b;p=GitHub%2FWoltLab%2FWCF.git Deprecated `add()` and `update()`, use `set()` instead --- 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 */