#29583TypoScript condition [userFunc]...[ELSE] does not work correctly
Description
The following condition always includes both files:
[userFunc = user_match(userAgentIsMobile)] <INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/res/typoscript/setup/mobile_page.ts"> [else] <INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/res/typoscript/setup/page.ts"> [global]
The userfunc is defined in localconf.php
function user_match($cmd) {
switch($cmd)
{
case 'userAgentIsMobile':
if(preg_match('/(IEMobile|like Mac OS X|Android|BlackBerry|Symbian|LG|NetFront|MIDP|Windows CE|NetFront|PlayStation|PLAYSTATION|MIDP|UP\.Browser|Nintendo)/', t3lib_div::getIndpEnv('HTTP_USER_AGENT'))){
return TRUE;
}
break;
default:
return FALSE;
}
return FALSE;
}
Seems like the else-condition was ignored completely?
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.