From 951ba1743a50ab3c56f8acda284cd701ae513cef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 11 May 2022 11:52:45 +0200 Subject: [PATCH] Remove `DESKTOP_NOTIFICATION_PACKAGE_ID` see #4295 --- com.woltlab.wcf/option.xml | 11 ++++------- constants.php | 1 - wcfsetup/install/files/lib/system/WCF.class.php | 9 ++++----- .../acp/OptionACPSearchResultProvider.class.php | 9 --------- wcfsetup/install/lang/de.xml | 6 ++++-- wcfsetup/install/lang/en.xml | 6 ++++-- 6 files changed, 16 insertions(+), 26 deletions(-) diff --git a/com.woltlab.wcf/option.xml b/com.woltlab.wcf/option.xml index 2b849b4a5c..d7ba28442b 100644 --- a/com.woltlab.wcf/option.xml +++ b/com.woltlab.wcf/option.xml @@ -456,18 +456,12 @@ general.page boolean 1 - enable_desktop_notifications,desktop_notification_package_id + enable_desktop_notifications - + + diff --git a/constants.php b/constants.php index 6144dfe294..b6e939e29d 100644 --- a/constants.php +++ b/constants.php @@ -209,7 +209,6 @@ \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); diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index f8da53a2df..1d593a1f04 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -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) { diff --git a/wcfsetup/install/files/lib/system/search/acp/OptionACPSearchResultProvider.class.php b/wcfsetup/install/files/lib/system/search/acp/OptionACPSearchResultProvider.class.php index 31dd898625..684f2d8a54 100644 --- a/wcfsetup/install/files/lib/system/search/acp/OptionACPSearchResultProvider.class.php +++ b/wcfsetup/install/files/lib/system/search/acp/OptionACPSearchResultProvider.class.php @@ -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)); diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 600318f9f0..b23d22676f 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -1706,8 +1706,6 @@ Als Benachrichtigungs-URL in der Konfiguration der sofortigen Zahlungsbestätigu - - @@ -5564,4 +5562,8 @@ Benachrichtigungen auf {PAGE_TITLE|phra + + + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 8ccc9da5e7..9a7355b3a3 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -1692,8 +1692,6 @@ When prompted for the notification URL for the instant payment notifications, pl - - @@ -5566,4 +5564,8 @@ your notifications on {PAGE_TITLE|phras + + + + -- 2.20.1