2
0
forked from Wavyzz/dolibarr

Fix: iWebKit is compatible with Android and Blackberry

This commit is contained in:
Regis Houssin
2010-09-21 17:02:57 +00:00
parent 93df5fcb01
commit 101b9ce166
106 changed files with 66 additions and 50 deletions

View File

@@ -54,12 +54,19 @@ function dol_loginfunction($langs,$conf,$mysoc)
// Select templates
if ($conf->browser->phone)
{
// Special cases
if (file_exists(DOL_DOCUMENT_ROOT."/theme/phones/".$conf->browser->phone))
// iWebKit template
if (preg_match('/android|blackberry|iphone/i',$conf->browser->phone))
{
$theme = 'default';
$template_dir=DOL_DOCUMENT_ROOT."/theme/phones/smartphone/tpl/";
}
// Special template
elseif (file_exists(DOL_DOCUMENT_ROOT."/theme/phones/".$conf->browser->phone))
{
$theme = 'default';
$template_dir=DOL_DOCUMENT_ROOT."/theme/phones/".$conf->browser->phone."/tpl/";
}
// Default template
else
{
$template_dir=DOL_DOCUMENT_ROOT."/theme/phones/others/tpl/";