<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>
// 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;
}