Remove the option to disable desktop notifications
authorAlexander Ebert <ebert@woltlab.com>
Sat, 14 May 2022 14:07:03 +0000 (16:07 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 14 May 2022 14:07:03 +0000 (16:07 +0200)
Fixes #4806

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

index 361692e21372a5226fa40c4e03e111d6a0f6a0b6..dd1ce33cf5a56014b83d8a09b27979e96302accf 100644 (file)
                                <options>module_wcf_ad</options>
                        </option>
                        <option name="enable_polling">
-                               <categoryname>general.page</categoryname>
-                               <optiontype>boolean</optiontype>
-                               <defaultvalue>1</defaultvalue>
-                               <enableoptions>enable_desktop_notifications,desktop_notification_package_id</enableoptions>
-                       </option>
-                       <option name="enable_desktop_notifications">
                                <categoryname>general.page</categoryname>
                                <optiontype>boolean</optiontype>
                                <defaultvalue>1</defaultvalue>
@@ -1675,5 +1669,6 @@ DESC:wcf.global.sortOrder.descending</selectoptions>
                <option name="url_legacy_mode"/>
                <option name="enable_censorship"/>
                <option name="search_use_captcha" />
+               <option name="enable_desktop_notifications"/>
        </delete>
 </data>
index 6144dfe29499d3dde20f8bb67117b4dda19f7606..3bf8a29881eae0c693a1bc4aa10aad65d58e0b6d 100644 (file)
 \define('ARTICLE_ENABLE_VISIT_TRACKING', 1);
 \define('ENABLE_AD_ROTATION', 1);
 \define('ENABLE_POLLING', 1);
-\define('ENABLE_DESKTOP_NOTIFICATIONS', 1);
 \define('FB_SHARE_APP_ID', '');
 \define('MODULE_CONTACT_FORM', 0);
 \define('SITEMAP_INDEX_TIME_FRAME', 365);
index f8da53a2dfff6d39912b680d450989b74067189f..7fec9f3b3c8c9b84490665e3f08e493e1196e001 100644 (file)
@@ -495,6 +495,10 @@ class WCF
 
         // The captcha option related to the removed SearchForm was removed in 5.5.
         \define('SEARCH_USE_CAPTCHA', 0);
+
+        // The prompt for desktop notifications is no longer obtrusive since 5.5.
+        // https://github.com/WoltLab/WCF/issues/4806
+        \define('ENABLE_DESKTOP_NOTIFICATIONS', 1);
     }
 
     /**
@@ -1178,9 +1182,7 @@ class WCF
      */
     public function useDesktopNotifications()
     {
-        if (!ENABLE_DESKTOP_NOTIFICATIONS) {
-            return false;
-        } elseif (ApplicationHandler::getInstance()->isMultiDomainSetup()) {
+        if (ApplicationHandler::getInstance()->isMultiDomainSetup()) {
             $application = ApplicationHandler::getInstance()->getApplicationByID(DESKTOP_NOTIFICATION_PACKAGE_ID);
             // mismatch, default to Core
             if ($application === null) {
index e03b18975b33ea29c5c281a9ea997e7ea432b945..7c0bf15973cee1ca66233cf69bbc7baac1996c39 100644 (file)
@@ -1695,8 +1695,6 @@ Als Benachrichtigungs-URL in der Konfiguration der sofortigen Zahlungsbestätigu
                <item name="wcf.acp.option.fb_share_app_id.description"><![CDATA[Die App ID kann direkt über das <a href="https://developers.facebook.com/docs/apps/register?locale=de_DE" class="externalURL">App-Dashboard angefordert werden</a>, und wird für die Open Graph-Tags zum Teilen verwendet.]]></item>
                <item name="wcf.acp.option.enable_polling"><![CDATA[Hintergrund-Aktualisierung von Benachrichtigungen aktivieren]]></item>
                <item name="wcf.acp.option.enable_polling.description"><![CDATA[Neue Benachrichtigungen werden in periodischen Abständen automatisch abgerufen. Das Aktualisierungs-Intervall beträgt 5 Minuten und wird bei Inaktivität schrittweise auf 15 Minuten reduziert.]]></item>
-               <item name="wcf.acp.option.enable_desktop_notifications"><![CDATA[Desktop-Benachrichtigungen verwenden]]></item>
-               <item name="wcf.acp.option.enable_desktop_notifications.description"><![CDATA[Neue Benachrichtigungen, die im Hintergrund abgerufen wurden, werden als kleines Benachrichtigungsfenster unmittelbar angezeigt.]]></item>
                <item name="wcf.acp.option.module_contact_form"><![CDATA[Kontaktformular aktivieren]]></item>
                <item name="wcf.acp.option.module_contact_form.description"><![CDATA[Aktiviert das Kontaktformular, nach Aktivierung können Sie die <a href="{link controller='ContactSettings'}{/link}">Eingabefelder und Empfänger</a> individuell konfigurieren.]]></item>
                <item name="wcf.acp.option.module_trophy"><![CDATA[Trophäen]]></item>
@@ -5618,5 +5616,7 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phra
        <item name="wcf.user.panel.markAsRead" />
        <item name="wcf.user.profile.user" />
        <item name="wcf.user.profile.customization" />
+       <item name="wcf.acp.option.enable_desktop_notifications"/>
+       <item name="wcf.acp.option.enable_desktop_notifications.description"/>
 </delete>
 </language>
index a46592b2f23e37e331c774634c4faa48a22c26a0..752a3c139fbc478953933aa2df8b2fba92db46a1 100644 (file)
@@ -1681,8 +1681,6 @@ When prompted for the notification URL for the instant payment notifications, pl
                <item name="wcf.acp.option.fb_share_app_id.description"><![CDATA[You can obtain the app ID from your <a href="https://developers.facebook.com/docs/apps/register?locale=en_US" class="externalURL">app’s dashboard</a>, and is used with the Open Graph tags for sharing.]]></item>
                <item name="wcf.acp.option.enable_polling"><![CDATA[Enable Background Notifications]]></item>
                <item name="wcf.acp.option.enable_polling.description"><![CDATA[Periodically retrieves new notifications in the background, requests are dispatched every 5 minutes. Interval decreases down to 15 minutes on inactivity.]]></item>
-               <item name="wcf.acp.option.enable_desktop_notifications"><![CDATA[Enable Desktop Notifications]]></item>
-               <item name="wcf.acp.option.enable_desktop_notifications.description"><![CDATA[Display a small window for new notifications that have been retrieved in the background.]]></item>
                <item name="wcf.acp.option.module_contact_form"><![CDATA[Enable contact form]]></item>
                <item name="wcf.acp.option.module_contact_form.description"><![CDATA[Enables the contact form, once enabled you can customize the <a href="{link controller='ContactSettings'}{/link}">input fields and recipients</a> to better suit your needs.]]></item>
                <item name="wcf.acp.option.module_trophy"><![CDATA[Trophies]]></item>
@@ -5620,5 +5618,7 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phras
        <item name="wcf.user.panel.markAsRead" />
        <item name="wcf.user.profile.user" />
        <item name="wcf.user.profile.customization" />
+       <item name="wcf.acp.option.enable_desktop_notifications"/>
+       <item name="wcf.acp.option.enable_desktop_notifications.description"/>
 </delete>
 </language>