Experimental: add smartphone maemo system

This commit is contained in:
Regis Houssin 2010-09-25 11:03:58 +00:00
parent 95a134b316
commit ca900c68d1
2 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class Smartphone {
function getTemplateDir()
{
// iWebKit template
if (preg_match('/android|blackberry|iphone/i',$this->phone))
if (preg_match('/android|blackberry|iphone|maemo/i',$this->phone))
{
$this->theme = 'default';
$this->template_dir=DOL_DOCUMENT_ROOT."/theme/phones/smartphone/tpl/";

View File

@ -202,6 +202,7 @@ if (isset($_SERVER["HTTP_USER_AGENT"]))
elseif (preg_match('/palm/i',$_SERVER["HTTP_USER_AGENT"])) $conf->browser->phone='palm';
elseif (preg_match('/symbian/i',$_SERVER["HTTP_USER_AGENT"])) $conf->browser->phone='symbian';
elseif (preg_match('/webos/i',$_SERVER["HTTP_USER_AGENT"])) $conf->browser->phone='webos';
elseif (preg_match('/maemo/i',$_SERVER["HTTP_USER_AGENT"])) $conf->browser->phone='maemo';
// MS products at end
elseif (preg_match('/iemobile/i',$_SERVER["HTTP_USER_AGENT"])) $conf->browser->phone='windowsmobile';
elseif (preg_match('/windows ce/i',$_SERVER["HTTP_USER_AGENT"])) $conf->browser->phone='windowsmobile';