* @throws SystemException
*/
public function lookupDefaultController($application) {
- $controller = $this->landingPages[$application][1];
+ $data = $this->landingPages[$application];
+ $controller = $data[1];
if ($application === 'wcf' && empty($controller)) {
return null;
}
return [
- 'application' => $application,
+ 'application' => mb_substr($data[2], 0, mb_strpos($data[2], '\\')),
'controller' => $controller
];
}
// force a redirect
HeaderUtil::redirect($data['redirect'], true, false);
}
+ else if ($data['application'] !== $application) {
+ HeaderUtil::redirect(
+ LinkHandler::getInstance()->getLink(
+ ControllerMap::getInstance()->resolve($data['application'], $data['controller'], false)['controller'],
+ ['application' => $data['application']]
+ )
+ );
+ exit;
+ }
// copy route data
foreach ($data as $key => $value) {