diff --git a/htdocs/core/class/smartphone.class.php b/htdocs/core/class/smartphone.class.php deleted file mode 100644 index af0535e69fb..00000000000 --- a/htdocs/core/class/smartphone.class.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * \file htdocs/core/class/smartphone.class.php - * \ingroup core - * \brief Fichier de la classe de gestion des smartphones - * \version $Id$ - */ - - -/** - * \class Smartphone - * \brief Class to manage Smartphones - */ -class Smartphone { - - var $db; - - var $phone; - var $theme; - var $title; - var $template_dir; - - /** - * Constructor for class - * @param DB Handler acces base de donnees - */ - function Smartphone($DB,$phone) - { - $this->db = $DB; - - $dirt='others'; // default - - if (preg_match('/android|blackberry|iphone|maemo/i',$phone)) // iWebKit template - { - $this->theme = 'default'; - $dirt='smartphone'; - } - elseif (file_exists(DOL_DOCUMENT_ROOT."/theme/phones/".$phone)) // Special template - { - $this->theme = 'default'; - $dirt=$phone; - } - - $this->phone=$phone; - $this->template_dir=DOL_DOCUMENT_ROOT.'/theme/phones/'.$dirt.'/tpl/'; - } - - /** - * Show menu - */ - function smartmenu() - { - global $conf, $langs; - - if (! $conf->smart_menu) $conf->smart_menu ='smartphone_backoffice.php'; - $smart_menu=$conf->smart_menu; - if (GETPOST('top_menu')) $smart_menu=GETPOST('top_menu'); - - // Load the smartphone menu manager - $result=@include_once(DOL_DOCUMENT_ROOT ."/includes/menus/smartphone/".$smart_menu); - if (! $result) // If failed to include, we try with standard - { - $conf->smart_menu='smartphone_backoffice.php'; - include_once(DOL_DOCUMENT_ROOT ."/includes/menus/smartphone/".$smart_menu); - } - $menusmart = new MenuSmart($this->db); - $menusmart->atarget=$target; - - include_once($this->template_dir.'menu.tpl.php'); - } - -} diff --git a/htdocs/lib/security.lib.php b/htdocs/lib/security.lib.php index a1f178cfc6d..c5b52598f98 100644 --- a/htdocs/lib/security.lib.php +++ b/htdocs/lib/security.lib.php @@ -59,11 +59,7 @@ function dol_loginfunction($langs,$conf,$mysoc) // Select templates if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone)) { - // Template directory - include_once(DOL_DOCUMENT_ROOT.'/core/class/smartphone.class.php'); - $smartphone = new Smartphone($db,$conf->browser->phone); // This class is only to know template dir according to phone type - $smartphone->title = $title; - $template_dir = $smartphone->template_dir; + $template_dir = DOL_DOCUMENT_ROOT.'/theme/phones/smartphone/tpl/'; } else { diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 03f5c8a5a94..9b0d655f8b0 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -478,8 +478,7 @@ img.login, img.printer, img.entity { /* Menu gauche */ /* ============================================================================== */ -browser->phone) && class_exists('Smartphone') && empty($conf->global->MAIN_SEARCHFORM_WITH_SMARTHPONE) && empty($conf->global->BOOKMARKS_SHOW_WITH_SMARTHPONE))) { ?> + .vmenu { display: none; } diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 895353c5727..adf816b8ea9 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -530,8 +530,7 @@ img.entity { /* Menu gauche */ /* ============================================================================== */ -browser->phone) && class_exists('Smartphone') && empty($conf->global->MAIN_SEARCHFORM_WITH_SMARTHPONE) && empty($conf->global->BOOKMARKS_SHOW_WITH_SMARTHPONE))) { ?> + .vmenu { display: none; } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index c6948c59285..c41c6dec38f 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -499,7 +499,7 @@ img.login, img.printer, img.entity { /* ============================================================================== */ browser->phone) && class_exists('Smartphone') && empty($conf->global->MAIN_SEARCHFORM_WITH_SMARTHPONE) && empty($conf->global->BOOKMARKS_SHOW_WITH_SMARTHPONE))) { ?> +|| (! empty($conf->browser->phone) && empty($conf->global->MAIN_SEARCHFORM_WITH_SMARTHPONE) && empty($conf->global->BOOKMARKS_SHOW_WITH_SMARTHPONE))) { ?> .vmenu { display: none; } diff --git a/htdocs/theme/freelug/style.css.php b/htdocs/theme/freelug/style.css.php index 6bf4becb025..d97f5d73562 100644 --- a/htdocs/theme/freelug/style.css.php +++ b/htdocs/theme/freelug/style.css.php @@ -405,8 +405,7 @@ img.printer /* Menu gauche */ /* ============================================================================== */ -browser->phone) && class_exists('Smartphone') && empty($conf->global->MAIN_SEARCHFORM_WITH_SMARTHPONE) && empty($conf->global->BOOKMARKS_SHOW_WITH_SMARTHPONE))) { ?> + .vmenu { display: none; } diff --git a/htdocs/theme/yellow/style.css.php b/htdocs/theme/yellow/style.css.php index 81978a46dfd..48ebfd7099b 100644 --- a/htdocs/theme/yellow/style.css.php +++ b/htdocs/theme/yellow/style.css.php @@ -386,8 +386,7 @@ img.printer /* Menu gauche */ /* ============================================================================== */ -browser->phone) && class_exists('Smartphone') && empty($conf->global->MAIN_SEARCHFORM_WITH_SMARTHPONE) && empty($conf->global->BOOKMARKS_SHOW_WITH_SMARTHPONE))) { ?> + .vmenu { display: none; } diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 19d62a1141e..c87d3f4e561 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -153,10 +153,7 @@ if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_A // Select templates if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone)) { - include_once(DOL_DOCUMENT_ROOT.'/core/class/smartphone.class.php'); - $smartphone = new Smartphone($db,$conf->browser->phone); // This class is only to know template dir according to phone type - $smartphone->title = $title; - $template_dir = $smartphone->template_dir; + $template_dir = DOL_DOCUMENT_ROOT.'/theme/phones/smartphone/tpl/'; } else {