Remove the previous service implementation
authorAlexander Ebert <ebert@woltlab.com>
Thu, 10 Nov 2022 16:57:51 +0000 (17:57 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 13 Nov 2022 14:28:21 +0000 (15:28 +0100)
For some reason the `git mv` did not properly work.

wcfsetup/install/files/lib/system/language/preload/PhrasePreloadCache.class.php [deleted file]

diff --git a/wcfsetup/install/files/lib/system/language/preload/PhrasePreloadCache.class.php b/wcfsetup/install/files/lib/system/language/preload/PhrasePreloadCache.class.php
deleted file mode 100644 (file)
index ba9d3d6..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-namespace wcf\system\language\preload;
-
-use wcf\data\language\Language;
-use wcf\system\language\preload\command\CachePreloadPhrases;
-use wcf\system\WCF;
-
-/**
- * Provides the URL to the preload cache for
- * phrases and creates it if it is missing.
- *
- * @author Alexander Ebert
- * @copyright 2001-2022 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core\System\Language\Preload\Command
- * @since 6.0
- */
-final class PhrasePreloadCache
-{
-    /**
-     * Returns the URL to the preload cache. Will implicitly
-     * create the cache if it does not exist.
-     */
-    public static function getUrl(Language $language): string
-    {
-        if (self::needsRebuild($language)) {
-            self::rebuild($language);
-        }
-
-        return WCF::getPath() . $language->getPreloadCacheFilename();
-    }
-
-    private static function needsRebuild(Language $language): bool
-    {
-        return \file_exists(\WCF_DIR . $language->getPreloadCacheFilename());
-    }
-
-    private static function rebuild(Language $language): void
-    {
-        $command = new CachePreloadPhrases($language);
-        $command();
-    }
-}