Remove `SearchKeywordManager` (#4313)
authorMatthias Schmidt <gravatronics@live.com>
Tue, 22 Jun 2021 14:44:37 +0000 (16:44 +0200)
committerGitHub <noreply@github.com>
Tue, 22 Jun 2021 14:44:37 +0000 (16:44 +0200)
Since 8d04d7bd18a910393ebb2000f21babca260fde24, the action `upsert` does not exist anymore resulting in an exception when calling `SearchKeywordManager::add()`, illustrating that this class is unused in practice.

com.woltlab.wcf/fileDelete.xml
wcfsetup/install/files/lib/system/search/SearchKeywordManager.class.php [deleted file]

index c294e8a1cae5666e865ed55dbfa19a0baa4f6172..0da45012fcfa5bafe2b8b54bdc18004ae0d91090 100644 (file)
                <file>lib/system/request/IRoute.class.php</file>
                <file>lib/system/request/Route.class.php</file>
                <file>lib/system/request/StaticRoute.class.php</file>
+               <file>lib/system/search/SearchKeywordManager.class.php</file>
                <file>lib/system/sitemap/ISitemapProvider.class.php</file>
                <file>lib/system/sitemap/SitemapHandler.class.php</file>
                <file>lib/system/sitemap/UserAccountSitemapProvider.class.php</file>
diff --git a/wcfsetup/install/files/lib/system/search/SearchKeywordManager.class.php b/wcfsetup/install/files/lib/system/search/SearchKeywordManager.class.php
deleted file mode 100644 (file)
index 01a3b50..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-namespace wcf\system\search;
-
-use wcf\data\search\keyword\SearchKeywordAction;
-use wcf\system\SingletonFactory;
-
-/**
- * Manages the search keywords.
- *
- * @author  Marcel Werk
- * @copyright   2001-2019 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core\System\Search
- * @deprecated  5.2
- */
-class SearchKeywordManager extends SingletonFactory
-{
-    /**
-     * Adds the given keyword.
-     *
-     * @param string $keyword
-     */
-    public function add($keyword)
-    {
-        (new SearchKeywordAction([], 'upsert', [
-            'data' => [
-                'keyword' => $keyword,
-            ],
-        ]))->executeAction();
-    }
-}