Remove DesktopNotificationApplicationSelectOptionType
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 11 May 2022 09:54:21 +0000 (11:54 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 11 May 2022 12:24:40 +0000 (14:24 +0200)
This option type was tightly bound to the removed
`desktop_notification_package_id` option.

wcfsetup/install/files/acp/templates/desktopNotificationApplicationSelectOptionType.tpl [deleted file]
wcfsetup/install/files/lib/system/option/DesktopNotificationApplicationSelectOptionType.class.php [deleted file]

diff --git a/wcfsetup/install/files/acp/templates/desktopNotificationApplicationSelectOptionType.tpl b/wcfsetup/install/files/acp/templates/desktopNotificationApplicationSelectOptionType.tpl
deleted file mode 100644 (file)
index 94c2d2d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{if $isMultiDomainSetup}
-       <input type="hidden" name="values[{$option->optionName}]" value="1">
-       <select name="values[{$option->optionName}]" id="{$option->optionName}">
-               {foreach from=$applications item=application}
-                       <option value="{@$application->packageID}"{if $application->packageID == $value} selected{/if}>{$application->getPackage()}</option>
-               {/foreach}
-       </select>
-{else}
-       <input type="hidden" name="values[{$option->optionName}]" value="1">
-       <script>
-               (function() {
-                       {* pretend that this option does not exist *}
-                       var container = elBySel('.{$option->optionName}Input');
-                       container.style.setProperty('margin', '0', 'important');
-                       container.style.setProperty('max-height', '0', 'important');
-                       container.style.setProperty('overflow', 'hidden', 'important');
-               })();
-       </script>
-{/if}
diff --git a/wcfsetup/install/files/lib/system/option/DesktopNotificationApplicationSelectOptionType.class.php b/wcfsetup/install/files/lib/system/option/DesktopNotificationApplicationSelectOptionType.class.php
deleted file mode 100644 (file)
index 4265eba..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-namespace wcf\system\option;
-
-use wcf\data\option\Option;
-use wcf\system\application\ApplicationHandler;
-use wcf\system\exception\UserInputException;
-use wcf\system\WCF;
-
-/**
- * Option type implementation for the desktop notification application selection. This
- * option is intentionally designed to be invisible at most times.
- *
- * @author  Alexander Ebert
- * @copyright   2001-2019 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core\System\Option
- */
-class DesktopNotificationApplicationSelectOptionType extends AbstractOptionType
-{
-    /**
-     * @inheritDoc
-     */
-    public function getFormElement(Option $option, $value)
-    {
-        return WCF::getTPL()->fetch('desktopNotificationApplicationSelectOptionType', 'wcf', [
-            'applications' => ApplicationHandler::getInstance()->getApplications(),
-            'isMultiDomainSetup' => ApplicationHandler::getInstance()->isMultiDomainSetup(),
-            'option' => $option,
-            'value' => $value,
-        ]);
-    }
-
-    /**
-     * @inheritDoc
-     */
-    public function validate(Option $option, $newValue)
-    {
-        if (ApplicationHandler::getInstance()->isMultiDomainSetup()) {
-            if (ApplicationHandler::getInstance()->getApplicationByID($newValue) === null) {
-                throw new UserInputException($option->optionName, 'validationFailed');
-            }
-        }
-    }
-}