mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
allow template to NOT support certain browser types / user agents
This commit is contained in:
parent
bf8b3211c8
commit
65bd2f4e24
@ -610,7 +610,7 @@ class egw_minimal
|
||||
function __get($name)
|
||||
{
|
||||
//error_log(__METHOD__."($name)".function_backtrace());
|
||||
|
||||
|
||||
if ($name == 'js') $name = 'framework'; // javascript class is integrated now into framework
|
||||
|
||||
if (isset($this->$name))
|
||||
@ -636,6 +636,13 @@ class egw_minimal
|
||||
$_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;
|
||||
case 'template': // need to be instancated for the current app
|
||||
if (!($tpl_dir = $GLOBALS['egw']->common->get_tpl_dir($this->currentapp)))
|
||||
|
Loading…
Reference in New Issue
Block a user