Deprecated `add()` and `update()`, use `set()` instead
authorAlexander Ebert <ebert@woltlab.com>
Wed, 8 Jun 2016 14:07:41 +0000 (16:07 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 8 Jun 2016 14:07:49 +0000 (16:07 +0200)
wcfsetup/install/files/lib/system/search/AbstractSearchIndexManager.class.php
wcfsetup/install/files/lib/system/search/ISearchIndexManager.class.php
wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php

index 87e2a4fdbbc636a5aae37f08d7fd41b5025b4682..d04eab6427ac654abe988413f7e676d09bcf47f9 100644 (file)
@@ -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
         */
index edcf34a56a5b00df751510fddb196dc865b5df34..65523e12aa69a713dd9a17fa04c3e0411f2c3e5e 100644 (file)
@@ -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 = '');
        
index 15706a9c4f0738ea6a422327729a2fe3315339f0..0c7808cf8ebd7d69ef8a16733ed1014839387c9d 100644 (file)
@@ -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
         */