Remove `DESKTOP_NOTIFICATION_PACKAGE_ID`
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 11 May 2022 09:52:45 +0000 (11:52 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 11 May 2022 12:24:40 +0000 (14:24 +0200)
see #4295

com.woltlab.wcf/option.xml
constants.php
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/lib/system/search/acp/OptionACPSearchResultProvider.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 2b849b4a5cd860a3f572a8f1dd9c65a9021c584b..d7ba28442bc1df1f897a27a1e3aed1603b95768e 100644 (file)
                                <categoryname>general.page</categoryname>
                                <optiontype>boolean</optiontype>
                                <defaultvalue>1</defaultvalue>
-                               <enableoptions>enable_desktop_notifications,desktop_notification_package_id</enableoptions>
+                               <enableoptions>enable_desktop_notifications</enableoptions>
                        </option>
                        <option name="enable_desktop_notifications">
                                <categoryname>general.page</categoryname>
                                <optiontype>boolean</optiontype>
                                <defaultvalue>1</defaultvalue>
-                               <enableoptions>desktop_notification_package_id</enableoptions>
-                       </option>
-                       <option name="desktop_notification_package_id">
-                               <categoryname>general.page</categoryname>
-                               <optiontype>desktopNotificationApplicationSelect</optiontype>
-                               <defaultvalue>1</defaultvalue>
                        </option>
                        <option name="page_logo_link_to_app_default">
                                <categoryname>general.page</categoryname>
@@ -1666,4 +1660,7 @@ DESC:wcf.global.sortOrder.descending</selectoptions>
                        </option>
                </options>
        </import>
+       <delete>
+               <option name="desktop_notification_package_id"/>
+       </delete>
 </data>
index 6144dfe29499d3dde20f8bb67117b4dda19f7606..b6e939e29d318c9576687d69725a1f281ffd8b07 100644 (file)
 \define('MODULE_TROPHY', 1);
 \define('ENABLE_DEVELOPER_TOOLS', 0);
 \define('FORCE_LOGIN', 0);
-\define('DESKTOP_NOTIFICATION_PACKAGE_ID', 1);
 \define('PAGE_LOGO_LINK_TO_APP_DEFAULT', 1);
 \define('IMAGE_ALLOW_EXTERNAL_SOURCE', 0);
 \define('MESSAGE_ENABLE_TOC', 1);
index f8da53a2dfff6d39912b680d450989b74067189f..1d593a1f04feee4618724cd486cb18d6b8112020 100644 (file)
@@ -495,6 +495,9 @@ class WCF
 
         // The captcha option related to the removed SearchForm was removed in 5.5.
         \define('SEARCH_USE_CAPTCHA', 0);
+
+        // Multi-domain setups were removed in 5.6.
+        \define('DESKTOP_NOTIFICATION_PACKAGE_ID', 1);
     }
 
     /**
@@ -1181,11 +1184,7 @@ class WCF
         if (!ENABLE_DESKTOP_NOTIFICATIONS) {
             return false;
         } elseif (ApplicationHandler::getInstance()->isMultiDomainSetup()) {
-            $application = ApplicationHandler::getInstance()->getApplicationByID(DESKTOP_NOTIFICATION_PACKAGE_ID);
-            // mismatch, default to Core
-            if ($application === null) {
-                $application = ApplicationHandler::getInstance()->getApplicationByID(1);
-            }
+            $application = ApplicationHandler::getInstance()->getApplicationByID(1);
 
             $currentApplication = ApplicationHandler::getInstance()->getActiveApplication();
             if ($currentApplication->domainName != $application->domainName) {
index 31dd8986257e0ed8d69ba95706aeadac36e8fb1e..684f2d8a54d6e7b351dad96b5c4db7176cab7694 100644 (file)
@@ -4,7 +4,6 @@ namespace wcf\system\search\acp;
 
 use wcf\data\option\category\OptionCategoryList;
 use wcf\data\option\Option;
-use wcf\system\application\ApplicationHandler;
 use wcf\system\cache\builder\OptionCacheBuilder;
 use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\request\LinkHandler;
@@ -96,14 +95,6 @@ class OptionACPSearchResultProvider extends AbstractCategorizedACPSearchResultPr
                 continue;
             }
 
-            // hide special option for multi-domain setups if not applicable
-            if (
-                $option->optionName === 'desktop_notification_package_id'
-                && !ApplicationHandler::getInstance()->isMultiDomainSetup()
-            ) {
-                continue;
-            }
-
             $link = LinkHandler::getInstance()->getLink('Option', [
                 'id' => $this->getCategoryID($this->getTopCategory($option->categoryName)->parentCategoryName),
             ], 'optionName=' . $option->optionName . '#category_' . $this->getCategoryName($option->categoryName));
index 600318f9f0d86730ccfcdbb441e5763a569df2d6..b23d22676f95e1475128ad4915350a0ad65ceb01 100644 (file)
@@ -1706,8 +1706,6 @@ Als Benachrichtigungs-URL in der Konfiguration der sofortigen Zahlungsbestätigu
                <item name="wcf.acp.option.enable_developer_tools.description"><![CDATA[Aktiviert spezielle Werkzeuge die für die Plugin-Entwicklung verwendet werden. Diese Option sollte im Live-Betrieb abgeschaltet werden.]]></item>
                <item name="wcf.acp.option.force_login"><![CDATA[Anmeldung erzwingen]]></item>
                <item name="wcf.acp.option.force_login.description"><![CDATA[Besucher werden aufgefordert sich anzumelden, um auf die Inhalte zugreifen zu können.]]></item>
-               <item name="wcf.acp.option.desktop_notification_package_id"><![CDATA[Primäre Domain für Desktop-Benachrichtigungen]]></item>
-               <item name="wcf.acp.option.desktop_notification_package_id.description"><![CDATA[Desktop-Benachrichtigungen werden nur für die ausgewählte App aktiviert, einschließlich aller anderen Apps die auf der identischen Domain laufen.]]></item>
                <item name="wcf.acp.option.page_logo_link_to_app_default"><![CDATA[Seitenlogo verlinkt auf die Startseite der aktiven App]]></item>
                <item name="wcf.acp.option.page_logo_link_to_app_default.description"><![CDATA[Deaktiviere{if !LANGUAGE_USE_INFORMAL_VARIANT}n Sie{/if} diese Option, damit das Logo stets auf die globale Startseite verlinkt. Die Deaktivierung entspricht dem Verhalten in früheren Versionen.]]></item>
                <item name="wcf.acp.option.image_allow_external_source"><![CDATA[Bilder von externen Seiten erlauben]]></item>
@@ -5564,4 +5562,8 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phra
                <item name="wcf.upload.error.uploadFailed"><![CDATA[Beim Hochladen der Datei ist ein unbekannter Fehler aufgetreten.]]></item>
        </category>
 </import>
+<delete>
+       <item name="wcf.acp.option.desktop_notification_package_id"/>
+       <item name="wcf.acp.option.desktop_notification_package_id.description"/>
+</delete>
 </language>
index 8ccc9da5e73e4b48d2fb0ca63166219bdff70d6d..9a7355b3a3bf4da49ae1b91f76705716f26cf5f2 100644 (file)
@@ -1692,8 +1692,6 @@ When prompted for the notification URL for the instant payment notifications, pl
                <item name="wcf.acp.option.enable_developer_tools.description"><![CDATA[Enables a set of specialized tools that are used for plugin development. Should always be disabled in production environments.]]></item>
                <item name="wcf.acp.option.force_login"><![CDATA[Force login]]></item>
                <item name="wcf.acp.option.force_login.description"><![CDATA[Visitors are required to log-in themselves to access the page.]]></item>
-               <item name="wcf.acp.option.desktop_notification_package_id"><![CDATA[Primary Domain for Desktop Notifications]]></item>
-               <item name="wcf.acp.option.desktop_notification_package_id.description"><![CDATA[Desktop Notifications will be enabled for the selected app only, including all other apps that use the exact same domain.]]></item>
                <item name="wcf.acp.option.page_logo_link_to_app_default"><![CDATA[Page logo links to the start page of the active app]]></item>
                <item name="wcf.acp.option.page_logo_link_to_app_default.description"><![CDATA[Disabling this option will cause the link to always point to the global landing page instead. This option enforces the behavior known from previous versions when disabled.]]></item>
                <item name="wcf.acp.option.image_allow_external_source"><![CDATA[Allow images from external sites]]></item>
@@ -5566,4 +5564,8 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phras
                <item name="wcf.upload.error.uploadFailed"><![CDATA[An unknown error occurred during the upload.]]></item>
        </category>
 </import>
+<delete>
+       <item name="wcf.acp.option.desktop_notification_package_id"/>
+       <item name="wcf.acp.option.desktop_notification_package_id.description"/>
+</delete>
 </language>