Merge branch 'master' into remove-multi-domain
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 16 May 2022 09:42:53 +0000 (11:42 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 16 May 2022 09:43:54 +0000 (11:43 +0200)
1  2 
com.woltlab.wcf/option.xml
com.woltlab.wcf/templates/headInclude.tpl
constants.php
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 74a735f593ab1ed88a5b4894b89739e185850d73,c97ae5bac2aed5107194fbe809551aeeb1ccdbea..59c1d82e4d48f7fead359a4d26af4ccb2a22ad55
                                <categoryname>general.page</categoryname>
                                <optiontype>boolean</optiontype>
                                <defaultvalue>1</defaultvalue>
-                               <enableoptions>enable_desktop_notifications</enableoptions>
 -                              <enableoptions>desktop_notification_package_id</enableoptions>
--                      </option>
-                       <option name="enable_desktop_notifications">
 -                      <option name="desktop_notification_package_id">
--                              <categoryname>general.page</categoryname>
-                               <optiontype>boolean</optiontype>
 -                              <optiontype>desktopNotificationApplicationSelect</optiontype>
--                              <defaultvalue>1</defaultvalue>
                        </option>
                        <option name="page_logo_link_to_app_default">
                                <categoryname>general.page</categoryname>
diff --cc constants.php
Simple merge
index e57b72c010f1a87ebe1466676a43787c03c9c347,9dfec8631df4aa1c777b64295e32201b713aa0c9..d4798568cfc9ad1c2a0f9e9e50143a5a21dff7c4
@@@ -487,6 -488,6 +488,9 @@@ class WC
  
          // Disabling X-Frame-Options is no longer possible since 5.6.
          \define('HTTP_SEND_X_FRAME_OPTIONS', 1);
++
++        // Multi-domain setups were removed in 5.6.
++        \define('DESKTOP_NOTIFICATION_PACKAGE_ID', 1);
      }
  
      /**
       */
      public function useDesktopNotifications()
      {
-         if (!ENABLE_DESKTOP_NOTIFICATIONS) {
-             return false;
 -        if (ApplicationHandler::getInstance()->isMultiDomainSetup()) {
 -            $application = ApplicationHandler::getInstance()->getApplicationByID(DESKTOP_NOTIFICATION_PACKAGE_ID);
 -            // mismatch, default to Core
 -            if ($application === null) {
 -                $application = ApplicationHandler::getInstance()->getApplicationByID(1);
 -            }
 -
 -            $currentApplication = ApplicationHandler::getInstance()->getActiveApplication();
 -            if ($currentApplication->domainName != $application->domainName) {
 -                // different domain
 -                return false;
 -            }
--        }
--
          return true;
      }
  
Simple merge
Simple merge