allow template to NOT support certain browser types / user agents

This commit is contained in:
Ralf Becker 2010-10-28 16:28:16 +00:00
parent 1f98be4e38
commit 82793d32b0

View File

@ -636,6 +636,13 @@ class egw_minimal
$_SESSION['egw_required_files'][] = $file; // automatic load the used framework class, when the object get's restored $_SESSION['egw_required_files'][] = $file; // automatic load the used framework class, when the object get's restored
} }
} }
// fall back to idots if a template does NOT support current user-agent
if ($class != 'idots_framework' && method_exists($class,'is_supported_user_agent') &&
!call_user_func(array($class,'is_supported_user_agent')))
{
$GLOBALS['egw_info']['server']['template_set'] = 'idots';
return $this->__get('framework');
}
break; break;
case 'template': // need to be instancated for the current app case 'template': // need to be instancated for the current app
if (!($tpl_dir = $GLOBALS['egw']->common->get_tpl_dir($this->currentapp))) if (!($tpl_dir = $GLOBALS['egw']->common->get_tpl_dir($this->currentapp)))