<optiontype>desktopNotificationApplicationSelect</optiontype>
<defaultvalue>1</defaultvalue>
</option>
+ <option name="page_logo_link_to_app_default">
+ <categoryname>general.page</categoryname>
+ <optiontype>boolean</optiontype>
+ <defaultvalue>1</defaultvalue>
+ </option>
<option name="head_code">
<categoryname>general.page</categoryname>
<optiontype>textarea</optiontype>
<div id="pageHeaderLogo" class="pageHeaderLogo">
{if MODULE_WCF_AD && $__disableAds|empty}{@$__wcf->getAdHandler()->getAds('com.woltlab.wcf.logo')}{/if}
- <a href="{link}{/link}">
+ <a href="{if PAGE_LOGO_LINK_TO_APP_DEFAULT}{link application=$__wcf->getActiveApplication()->getAbbreviation()}{/link}{else}{link}{/link}{/if}">
<img src="{$__wcf->getStyleHandler()->getStyle()->getPageLogo()}" alt="" class="pageHeaderLogoLarge" style="{if $__wcf->getStyleHandler()->getStyle()->getVariable('pageLogoWidth')}width: {@$__wcf->getStyleHandler()->getStyle()->getVariable('pageLogoWidth')}px;{/if}{if $__wcf->getStyleHandler()->getStyle()->getVariable('pageLogoHeight')}height: {@$__wcf->getStyleHandler()->getStyle()->getVariable('pageLogoHeight')}px{/if}">
<img src="{$__wcf->getStyleHandler()->getStyle()->getPageLogoMobile()}" alt="" class="pageHeaderLogoSmall">
define('ENABLE_DEVELOPER_TOOLS', 0);
define('FORCE_LOGIN', 0);
define('DESKTOP_NOTIFICATION_PACKAGE_ID', 1);
+define('PAGE_LOGO_LINK_TO_APP_DEFAULT', 1);
return null;
}
+ /**
+ * Returns the invoked application.
+ *
+ * @return Application
+ */
+ public static function getActiveApplication() {
+ return ApplicationHandler::getInstance()->getActiveApplication();
+ }
+
/**
* Loads an application on runtime, do not use this outside the package installation.
*
$controller = 'Index';
}
else {
+ if (!empty($parameters['application']) && $abbreviation !== 'wcf') {
+ $application = ApplicationHandler::getInstance()->getApplication($abbreviation);
+ if ($application === null) {
+ throw new \RuntimeException("Unknown abbreviation '" . $abbreviation . "'.");
+ }
+
+ $landingPage = PageCache::getInstance()->getPage($application->landingPageID);
+ if ($landingPage === null) {
+ $landingPage = PageCache::getInstance()->getPageByController(WCF::getApplicationObject($application)->getPrimaryController());
+ }
+
+ if ($landingPage !== null) {
+ return $landingPage->getLink();
+ }
+ }
+
return PageCache::getInstance()->getLandingPage()->getLink();
}
}
<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>
</category>
<category name="wcf.acp.customOption">
<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>
</category>
<category name="wcf.acp.customOption">