Qual: Merge the 2 class MenuTop and MenuLeft into menu handler file
into 1 class MenuManager. This make code simpler and is also a first step to optimize performance of menu loading.
This commit is contained in:
parent
ec5b4f5fa7
commit
db1cd6b27f
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
@ -31,46 +31,13 @@
|
||||
/**
|
||||
* Classe permettant la gestion du menu du haut Auguria
|
||||
*/
|
||||
class MenuTop
|
||||
class MenuManager
|
||||
{
|
||||
var $db;
|
||||
var $require_left=array("auguria_backoffice"); // Si doit etre en phase avec un gestionnaire de menu gauche particulier
|
||||
var $type_user=0; // Put 0 for internal users, 1 for external users
|
||||
var $atarget=""; // Valeur du target a utiliser dans les liens
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria.lib.php';
|
||||
|
||||
print_auguria_menu($this->db,$this->atarget,$this->type_user);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Classe permettant la gestion du menu du gauche Auguria
|
||||
*/
|
||||
class MenuLeft
|
||||
{
|
||||
var $db;
|
||||
var $menu_array;
|
||||
var $menu_array_after;
|
||||
|
||||
@ -93,16 +60,20 @@ class MenuLeft
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @param string $mode 'top' or 'left'
|
||||
* @return int Number of menu entries shown
|
||||
*/
|
||||
function showmenu()
|
||||
function showmenu($mode)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria.lib.php';
|
||||
|
||||
$res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after);
|
||||
$res='ErrorBadParameterForMode';
|
||||
if ($mode == 'top') $res=print_auguria_menu($this->db,$this->atarget,$this->type_user);
|
||||
if ($mode == 'left') $res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after);
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
@ -31,7 +31,7 @@
|
||||
/**
|
||||
* Classe permettant la gestion du menu du haut Auguria
|
||||
*/
|
||||
class MenuTop
|
||||
class MenuManager
|
||||
{
|
||||
var $db;
|
||||
var $require_left=array("auguria_backoffice"); // Si doit etre en phase avec un gestionnaire de menu gauche particulier
|
||||
@ -39,39 +39,6 @@ class MenuTop
|
||||
var $atarget=""; // Valeur du target a utiliser dans les liens
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria.lib.php';
|
||||
|
||||
print_auguria_menu($this->db,$this->atarget,$this->type_user);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Classe permettant la gestion du menu du gauche Auguria
|
||||
*/
|
||||
class MenuLeft
|
||||
{
|
||||
var $db;
|
||||
var $menu_array;
|
||||
var $menu_array_after;
|
||||
|
||||
@ -94,19 +61,22 @@ class MenuLeft
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @param string $mode 'top' or 'left'
|
||||
* @return int Number of menu entries shown
|
||||
*/
|
||||
function showmenu()
|
||||
function showmenu($mode)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria.lib.php';
|
||||
|
||||
$res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after);
|
||||
|
||||
$conf->global->MAIN_SEARCHFORM_SOCIETE=0;
|
||||
$conf->global->MAIN_SEARCHFORM_CONTACT=0;
|
||||
|
||||
$res='ErrorBadParameterForMode';
|
||||
if ($mode == 'top') $res=print_auguria_menu($this->db,$this->atarget,$this->type_user);
|
||||
if ($mode == 'left') $res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after);
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -28,49 +28,15 @@
|
||||
|
||||
|
||||
/**
|
||||
* Class to manage top menu Eldy (for internal users)
|
||||
* Classe to manage menu Eldy
|
||||
*/
|
||||
class MenuTop
|
||||
class MenuManager
|
||||
{
|
||||
var $db;
|
||||
var $require_left=array("eldy_backoffice"); // Si doit etre en phase avec un gestionnaire de menu gauche particulier
|
||||
var $type_user=0; // Put 0 for internal users, 1 for external users
|
||||
var $atarget=""; // Valeur du target a utiliser dans les liens
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy.lib.php';
|
||||
|
||||
print_eldy_menu($this->db,$this->atarget,$this->type_user);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \class MenuLeft
|
||||
* \brief Classe permettant la gestion du menu du gauche Eldy
|
||||
*/
|
||||
class MenuLeft
|
||||
{
|
||||
var $db;
|
||||
var $menu_array;
|
||||
var $menu_array_after;
|
||||
|
||||
@ -93,13 +59,16 @@ class MenuLeft
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @param string $mode 'top' or 'left'
|
||||
* @return int Number of menu entries shown
|
||||
*/
|
||||
function showmenu()
|
||||
function showmenu($mode)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy.lib.php';
|
||||
|
||||
$res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after);
|
||||
$res='ErrorBadParameterForMode';
|
||||
if ($mode == 'top') $res=print_eldy_menu($this->db,$this->atarget,$this->type_user);
|
||||
if ($mode == 'left') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after);
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -28,48 +28,15 @@
|
||||
|
||||
|
||||
/**
|
||||
* Class to manage top menu Eldy (for external users)
|
||||
* Class to manage menu Eldy (for external users)
|
||||
*/
|
||||
class MenuTop
|
||||
class MenuManager
|
||||
{
|
||||
var $db;
|
||||
var $require_left=array("eldy_frontoffice"); // Si doit etre en phase avec un gestionnaire de menu gauche particulier
|
||||
var $type_user=1; // Put 0 for internal users, 1 for external users
|
||||
var $atarget=""; // Valeur du target a utiliser dans les liens
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy.lib.php';
|
||||
|
||||
print_eldy_menu($this->db,$this->atarget,$this->type_user);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Classe permettant la gestion du menu du gauche Eldy
|
||||
*/
|
||||
class MenuLeft
|
||||
{
|
||||
var $db;
|
||||
var $menu_array;
|
||||
var $menu_array_after;
|
||||
|
||||
@ -92,19 +59,22 @@ class MenuLeft
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @param string $mode 'top' or 'left'
|
||||
* @return int Number of menu entries shown
|
||||
*/
|
||||
function showmenu()
|
||||
function showmenu($mode)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy.lib.php';
|
||||
|
||||
$res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after);
|
||||
|
||||
$conf->global->MAIN_SEARCHFORM_SOCIETE=0;
|
||||
$conf->global->MAIN_SEARCHFORM_CONTACT=0;
|
||||
|
||||
$res='ErrorBadParameterForMode';
|
||||
if ($mode == 'top') $res=print_eldy_menu($this->db,$this->atarget,$this->type_user);
|
||||
if ($mode == 'left') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after);
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
@ -21,129 +21,15 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \class MenuTop
|
||||
* \brief Class for top empty menu
|
||||
* Class to manage empty menu
|
||||
*/
|
||||
class MenuTop
|
||||
class MenuManager
|
||||
{
|
||||
var $db;
|
||||
var $require_left=array("empty"); // If this top menu handler must be used with a particular left menu handler
|
||||
var $type_user=0; // Put 0 for internal users, 1 for external users
|
||||
var $atarget=""; // To store arget to use in menu links
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db=$db;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
global $user,$conf,$langs,$dolibarr_main_db_name;
|
||||
|
||||
print_start_menu_array_empty();
|
||||
|
||||
$idsel='home';
|
||||
$classname='class="tmenu"';
|
||||
|
||||
print_start_menu_entry_empty($idsel);
|
||||
print '<a class="tmenuimage" href="'.dol_buildpath('/index.php',1).'?mainmenu=home&leftmenu="'.($this->atarget?' target="'.$this->atarget.'"':'').'>';
|
||||
print '<div class="mainmenu '.$idsel.'"><span class="mainmenu_'.$idsel.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '</a>';
|
||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'"'.($this->atarget?' target="'.$this->atarget.'"':'').'>';
|
||||
print_text_menu_entry_empty($langs->trans("Home"));
|
||||
print '</a>';
|
||||
print_end_menu_entry_empty();
|
||||
|
||||
print_end_menu_array_empty();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Output menu entry
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function print_start_menu_array_empty()
|
||||
{
|
||||
global $conf;
|
||||
if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print '<table class="tmenu" summary="topmenu"><tr class="tmenu">';
|
||||
else print '<ul class="tmenu">';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output start menu entry
|
||||
*
|
||||
* @param string $idsel Text
|
||||
* @return void
|
||||
*/
|
||||
function print_start_menu_entry_empty($idsel)
|
||||
{
|
||||
global $conf;
|
||||
if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
||||
else print '<li class="tmenu" id="mainmenutd_'.$idsel.'">';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output menu entry
|
||||
*
|
||||
* @param string $text Text
|
||||
* @return void
|
||||
*/
|
||||
function print_text_menu_entry_empty($text)
|
||||
{
|
||||
global $conf;
|
||||
print '<span class="mainmenuaspan">';
|
||||
print $text;
|
||||
print '</span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output end menu entry
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function print_end_menu_entry_empty()
|
||||
{
|
||||
global $conf;
|
||||
if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print '</td>';
|
||||
else print '</li>';
|
||||
print "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Output menu array
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function print_end_menu_array_empty()
|
||||
{
|
||||
global $conf;
|
||||
if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print '</tr></table>';
|
||||
else print '</ul>';
|
||||
print "\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Class for left empty menu
|
||||
*/
|
||||
class MenuLeft
|
||||
{
|
||||
var $db;
|
||||
var $menu_array;
|
||||
var $menu_array_after;
|
||||
|
||||
@ -166,11 +52,34 @@ class MenuLeft
|
||||
/**
|
||||
* Show menu
|
||||
*
|
||||
* @param string $mode 'top' or 'left'
|
||||
* @return void
|
||||
*/
|
||||
function showmenu()
|
||||
function showmenu($mode)
|
||||
{
|
||||
global $user,$conf,$langs,$dolibarr_main_db_name;
|
||||
|
||||
if ($mode == 'top')
|
||||
{
|
||||
print_start_menu_array_empty();
|
||||
|
||||
$idsel='home';
|
||||
$classname='class="tmenu"';
|
||||
|
||||
print_start_menu_entry_empty($idsel);
|
||||
print '<a class="tmenuimage" href="'.dol_buildpath('/index.php',1).'?mainmenu=home&leftmenu="'.($this->atarget?' target="'.$this->atarget.'"':'').'>';
|
||||
print '<div class="mainmenu '.$idsel.'"><span class="mainmenu_'.$idsel.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||
print '</a>';
|
||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'"'.($this->atarget?' target="'.$this->atarget.'"':'').'>';
|
||||
print_text_menu_entry_empty($langs->trans("Home"));
|
||||
print '</a>';
|
||||
print_end_menu_entry_empty();
|
||||
|
||||
print_end_menu_array_empty();
|
||||
}
|
||||
|
||||
if ($mode == 'left')
|
||||
{
|
||||
$newmenu = new Menu();
|
||||
|
||||
// Put here left menu entries
|
||||
@ -184,11 +93,13 @@ class MenuLeft
|
||||
$newmenu->add("/admin/ihm.php", $langs->trans("GUISetup"),1);
|
||||
$newmenu->add("/admin/boxes.php", $langs->trans("Boxes"),1);
|
||||
$newmenu->add("/admin/delais.php",$langs->trans("Alerts"),1);
|
||||
$newmenu->add("/admin/perms.php", $langs->trans("Security"),1);
|
||||
$newmenu->add("/admin/mails.php", $langs->trans("EMails"),1);
|
||||
$newmenu->add("/admin/limits.php", $langs->trans("Limits"),1);
|
||||
$newmenu->add("/admin/dict.php", $langs->trans("DictionnarySetup"),1);
|
||||
$newmenu->add("/admin/const.php", $langs->trans("OtherSetup"),1);
|
||||
$newmenu->add("/admin/proxy.php?mainmenu=home", $langs->trans("Security"),1);
|
||||
$newmenu->add("/admin/limits.php?mainmenu=home", $langs->trans("MenuLimits"),1);
|
||||
$newmenu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"),1);
|
||||
$newmenu->add("/admin/mails.php?mainmenu=home", $langs->trans("Emails"),1);
|
||||
$newmenu->add("/admin/sms.php?mainmenu=home", $langs->trans("SMS"),1);
|
||||
$newmenu->add("/admin/dict.php?mainmenu=home", $langs->trans("DictionnarySetup"),1);
|
||||
$newmenu->add("/admin/const.php?mainmenu=home", $langs->trans("OtherSetup"),1);
|
||||
|
||||
// ***** END *****
|
||||
|
||||
@ -256,7 +167,73 @@ class MenuLeft
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Output menu entry
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function print_start_menu_array_empty()
|
||||
{
|
||||
global $conf;
|
||||
if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print '<table class="tmenu" summary="topmenu"><tr class="tmenu">';
|
||||
else print '<ul class="tmenu">';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output start menu entry
|
||||
*
|
||||
* @param string $idsel Text
|
||||
* @return void
|
||||
*/
|
||||
function print_start_menu_entry_empty($idsel)
|
||||
{
|
||||
global $conf;
|
||||
if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print '<td class="tmenu" id="mainmenutd_'.$idsel.'">';
|
||||
else print '<li class="tmenu" id="mainmenutd_'.$idsel.'">';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output menu entry
|
||||
*
|
||||
* @param string $text Text
|
||||
* @return void
|
||||
*/
|
||||
function print_text_menu_entry_empty($text)
|
||||
{
|
||||
global $conf;
|
||||
print '<span class="mainmenuaspan">';
|
||||
print $text;
|
||||
print '</span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output end menu entry
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function print_end_menu_entry_empty()
|
||||
{
|
||||
global $conf;
|
||||
if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print '</td>';
|
||||
else print '</li>';
|
||||
print "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Output menu array
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function print_end_menu_array_empty()
|
||||
{
|
||||
global $conf;
|
||||
if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print '</tr></table>';
|
||||
else print '</ul>';
|
||||
print "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
@ -1271,7 +1271,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
if (GETPOST('menu')) $top_menu=GETPOST('menu'); // menu=eldy_backoffice.php
|
||||
|
||||
// Load the top menu manager (only if not already done)
|
||||
if (! class_exists('MenuTop'))
|
||||
if (! class_exists('MenuManager'))
|
||||
{
|
||||
$menufound=0;
|
||||
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
|
||||
@ -1296,9 +1296,10 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
print '<div id="tmenu_tooltip" class="tmenu">'."\n";
|
||||
|
||||
// Show menu
|
||||
$menutop = new MenuTop($db);
|
||||
$dummy1=array();$dummy2=array();
|
||||
$menutop = new MenuManager($db,$dummy1,$dummy2);
|
||||
$menutop->atarget=$target;
|
||||
$menutop->showmenu(); // This contains a \n
|
||||
$menutop->showmenu('top'); // This contains a \n
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
@ -1483,8 +1484,8 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
||||
$left_menu=empty($conf->browser->phone)?$conf->top_menu:$conf->smart_menu;
|
||||
if (GETPOST('menu')) $left_menu=GETPOST('menu'); // menu=eldy_backoffice.php
|
||||
|
||||
// Load the top menu manager (only if not already done)
|
||||
if (! class_exists('MenuLeft'))
|
||||
// Load the menu manager (only if not already done)
|
||||
if (! class_exists('MenuManager'))
|
||||
{
|
||||
$menufound=0;
|
||||
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
|
||||
@ -1505,8 +1506,8 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
||||
|
||||
print '<div class="vmenu">'."\n";
|
||||
|
||||
$menuleft=new MenuLeft($db,$menu_array_before,$menu_array_after);
|
||||
$menuleft->showmenu(); // output menu_array and menu found in database
|
||||
$menuleft=new MenuManager($db,$menu_array_before,$menu_array_after);
|
||||
$menuleft->showmenu('left'); // output menu_array and menu found in database
|
||||
|
||||
|
||||
// Show other forms
|
||||
|
||||
Loading…
Reference in New Issue
Block a user