From 7b4c7f98f7f93d99353861799160ad14e04350d9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Apr 2011 11:59:26 +0000 Subject: [PATCH] Removed a useless file Go on tab "external access" on security menu. --- htdocs/includes/menus/init_menu_auguria.sql | 2 +- .../menus/standard/bureau2crea.lib.php | 332 ------------------ htdocs/includes/menus/standard/eldy.lib.php | 2 +- htdocs/langs/en_US/admin.lang | 3 +- htdocs/langs/fr_FR/admin.lang | 3 +- 5 files changed, 6 insertions(+), 336 deletions(-) delete mode 100644 htdocs/includes/menus/standard/bureau2crea.lib.php diff --git a/htdocs/includes/menus/init_menu_auguria.sql b/htdocs/includes/menus/init_menu_auguria.sql index 8a05ce6b556..eb264088d89 100644 --- a/htdocs/includes/menus/init_menu_auguria.sql +++ b/htdocs/includes/menus/init_menu_auguria.sql @@ -30,7 +30,7 @@ insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$leftmenu==\'setup\'', __HANDLER__, 'left', 104__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/boxes.php?leftmenu=setup', 'Boxes', 1, 'admin', '', '', 2, 5, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$leftmenu==\'setup\'', __HANDLER__, 'left', 105__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/menus.php?leftmenu=setup', 'Menus', 1, 'admin', '', '', 2, 3, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$leftmenu==\'setup\'', __HANDLER__, 'left', 106__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/delais.php?leftmenu=setup', 'Alerts', 1, 'admin', '', '', 2, 6, __ENTITY__); -insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$leftmenu==\'setup\'', __HANDLER__, 'left', 108__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/perms.php?leftmenu=setup', 'Security', 1, 'admin', '', '', 2, 7, __ENTITY__); +insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$leftmenu==\'setup\'', __HANDLER__, 'left', 108__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/proxy.php?leftmenu=setup', 'Security', 1, 'admin', '', '', 2, 7, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$leftmenu==\'setup\'', __HANDLER__, 'left', 110__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/limits.php?leftmenu=setup', 'MenuLimits', 1, 'admin', '', '', 2, 8, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$leftmenu==\'setup\'', __HANDLER__, 'left', 109__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/mails.php?leftmenu=setup', 'Emails', 1, 'admin', '', '', 2, 9, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$leftmenu==\'setup\' && $conf->global->MAIN_FEATURES_LEVEL', __HANDLER__, 'left', 113__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/sms.php?leftmenu=setup', 'Sms', 1, 'admin', '', '', 2, 9, __ENTITY__); diff --git a/htdocs/includes/menus/standard/bureau2crea.lib.php b/htdocs/includes/menus/standard/bureau2crea.lib.php deleted file mode 100644 index 840827f793a..00000000000 --- a/htdocs/includes/menus/standard/bureau2crea.lib.php +++ /dev/null @@ -1,332 +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. - * or see http://www.gnu.org/ - */ - -/** - * \file htdocs/includes/menus/standard/bureau2crea.lib.php - * \brief Library for file bureau2crea menus - * \version $Id$ - */ - - - -/** - * Core function to output top menu bureau2crea - * - * @param $db - * @param $atarget - * @param $type_user 0=Internal,1=External,2=All - */ -function print_bureau2crea_menu($db,$atarget,$type_user) -{ - require_once(DOL_DOCUMENT_ROOT."/core/class/menubase.class.php"); - - global $user,$conf,$langs,$dolibarr_main_db_name; - - // On sauve en session le menu principal choisi - if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"]; - if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"]; - $_SESSION["leftmenuopened"]=""; - - $menuArbo = new Menubase($db,'bureau2crea','top'); - $tabMenu = $menuArbo->menuTopCharger($type_user,$_SESSION['mainmenu'], 'bureau2crea'); - - print_start_menu_array_bureau2crea(); - - for($i=0; $i'; - print ''; - print_text_menu_entry_bureau2crea($tabMenu[$i]['titre']); - print ''; - print_end_menu_entry_bureau2crea(); - } - else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) - { - if (! $type_user) - { - print_start_menu_entry_bureau2crea($idsel); - print ''; - print ''; - print_text_menu_entry_bureau2crea($tabMenu[$i]['titre']); - print ''; - print_end_menu_entry_bureau2crea(); - } - } - } - } - - print_end_menu_array_bureau2crea(); - - print "\n"; -} - - - -function print_start_menu_array_bureau2crea() -{ - global $conf; - if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print ''; - else print ''; - else print ''; - print "\n"; -} - -function print_end_menu_array_bureau2crea() -{ - global $conf; - if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print '
'; - else print ''; - print "\n"; -} - - - -/** - * Core function to output left menu bureau2crea - * - * @param db Database handler - * @param menu_array_before Table of menu entries to show before entries of menu handler - * @param menu_array_after Table of menu entries to show after entries of menu handler - */ -function print_left_bureau2crea_menu($db,$menu_array_before,$menu_array_after) -{ - global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc; - - $overwritemenufor = array(); - $newmenu = new Menu(); - - // Read mainmenu and leftmenu that define which menu to show - if (isset($_GET["mainmenu"])) { - // On sauve en session le menu principal choisi - $mainmenu=$_GET["mainmenu"]; - $_SESSION["mainmenu"]=$mainmenu; - $_SESSION["leftmenuopened"]=""; - } else { - // On va le chercher en session si non defini par le lien - $mainmenu=$_SESSION["mainmenu"]; - } - - if (isset($_GET["leftmenu"])) { - // On sauve en session le menu principal choisi - $leftmenu=$_GET["leftmenu"]; - $_SESSION["leftmenu"]=$leftmenu; - if ($_SESSION["leftmenuopened"]==$leftmenu) { - //$leftmenu=""; - $_SESSION["leftmenuopened"]=""; - } - else { - $_SESSION["leftmenuopened"]=$leftmenu; - } - } else { - // On va le chercher en session si non defini par le lien - $leftmenu=isset($_SESSION["leftmenu"])?$_SESSION["leftmenu"]:''; - } - - //this->menu_array contains menu in pre.inc.php - - - // Show logo company - if (! empty($conf->global->MAIN_SHOW_LOGO)) - { - $mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; - if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) - { - $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_mini); - print "\n".''."\n"; - print '
'."\n"; - print '
'."\n"; - print '
'."\n"; - } - } - - /** - * On definit newmenu en fonction de mainmenu et leftmenu - * ------------------------------------------------------ - */ - if ($mainmenu) - { - require_once(DOL_DOCUMENT_ROOT."/core/class/menubase.class.php"); - - $menuArbo = new Menubase($db,'bureau2crea','left'); - $overwritemenufor = $menuArbo->listeMainmenu(); - $newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,($user->societe_id?1:0),'bureau2crea'); - //var_dump($newmenu); - - /* - * Menu AUTRES (Pour les menus du haut qui ne serait pas geres) - */ - if ($mainmenu && ! in_array($mainmenu,$overwritemenufor)) { $mainmenu=""; } - } - - - /** - * Si on est sur un cas gere de surcharge du menu, on ecrase celui par defaut - */ - //var_dump($menu_array_before);exit; - //var_dump($menu_array_after);exit; - $menu_array=$newmenu->liste; - //if ($mainmenu) { - if (is_array($menu_array_before)) $menu_array=array_merge($menu_array_before, $menu_array); - if (is_array($menu_array_after)) $menu_array=array_merge($menu_array, $menu_array_after); - //} - //var_dump($menu_array);exit; - - // Affichage du menu - $alt=0; - if (is_array($menu_array)) - { - for ($i = 0 ; $i < sizeof($menu_array) ; $i++) - { - $alt++; - if (empty($menu_array[$i]['level'])) - { - if (($alt%2==0)) - { - if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_ACCORDION) - { - print '
'."\n"; - } - else - { - print '
'."\n"; - } - } - else - { - print '
'."\n"; - } - } - - // Place tabulation - $tabstring=''; - $tabul=($menu_array[$i]['level'] - 1); - if ($tabul > 0) - { - for ($j=0; $j < $tabul; $j++) - { - $tabstring.='   '; - } - } - - // Add mainmenu in GET url. This make to go back on correct menu even when using Back on browser. - $url=$menu_array[$i]['url']; - if (! preg_match('/mainmenu=/i',$menu_array[$i]['url'])) - { - if (! preg_match('/\?/',$url)) $url.='?'; - else $url.='&'; - $url.='mainmenu='.$mainmenu; - } - - // Menu niveau 0 - if ($menu_array[$i]['level'] == 0) - { - if ($menu_array[$i]['enabled']) - { - print ''; - } - else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) - { - print ''; - } - print "\n".'
'."\n"; - print ''."\n"; - } - // Menu niveau > 0 - if ($menu_array[$i]['level'] > 0) - { - if ($menu_array[$i]['enabled']) - { - print ''; - } - else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) - { - print ''; - } - } - - // If next is a new block or end - if (empty($menu_array[$i+1]['level'])) - { - print ''."\n"; - print "
\n"; - print "
\n"; - } - } - } - - return sizeof($menu_array); -} - -?> diff --git a/htdocs/includes/menus/standard/eldy.lib.php b/htdocs/includes/menus/standard/eldy.lib.php index 863bee70a20..c28cb46a25b 100644 --- a/htdocs/includes/menus/standard/eldy.lib.php +++ b/htdocs/includes/menus/standard/eldy.lib.php @@ -624,7 +624,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) if ($leftmenu=="setup") $newmenu->add("/admin/boxes.php", $langs->trans("Boxes"),1); if ($leftmenu=="setup") $newmenu->add("/admin/delais.php",$langs->trans("Alerts"),1); - if ($leftmenu=="setup") $newmenu->add("/admin/perms.php", $langs->trans("Security"),1); + if ($leftmenu=="setup") $newmenu->add("/admin/proxy.php", $langs->trans("Security"),1); if ($leftmenu=="setup") $newmenu->add("/admin/limits.php", $langs->trans("MenuLimits"),1); if ($leftmenu=="setup") $newmenu->add("/admin/mails.php", $langs->trans("Emails"),1); if ($leftmenu=="setup" && $conf->global->MAIN_FEATURES_LEVEL) $newmenu->add("/admin/sms.php", $langs->trans("Sms"),1); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index a36af50448e..b46f7471d62 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -821,7 +821,8 @@ SomeTranslationAreUncomplete=Some languages may be partially translated or may c MenuUseLayout=Make vertical menu hidable (option javascript must not be disabled) MAIN_DISABLE_METEO=Disable meteo view TestLoginToAPI=Test login to API -ProxyDesc=Some features of Dolibarr need to have an Internet access to work. If the Dolibarr server is behind a Proxy server, those parameters tells Dolibarr how to access Internet through it. +ProxyDesc=Some features of Dolibarr need to have an Internet access to work. Define here parameters for this. If the Dolibarr server is behind a Proxy server, those parameters tells Dolibarr how to access Internet through it. +ExternalAccess=External access MAIN_PROXY_USE=Use a proxy server MAIN_PROXY_HOST=Name/Address of proxy server MAIN_PROXY_PORT=Port of proxy server diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 2e0c6c504ec..8d07a3c1593 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -832,7 +832,8 @@ SomeTranslationAreUncomplete=Certaines langues sont traduites partiellement ou p MenuUseLayout=Rendre le menu gauche cachable (L'option javascript ne doit pas avoir été désactivée) MAIN_DISABLE_METEO=Désactiver la vue météo TestLoginToAPI=Tester connexion à l'API -ProxyDesc=Certaines fonction de Dolibarr nécessite que le serveur ait accès à internet. Si le serveur Dolibarr est derrière un proxy, ces paramètres indiquent à Dolibarr comment le traverser. +ProxyDesc=Certaines fonctions de Dolibarr nécessitent que le serveur ait accès à internet. Définissez ici les paramètres de ces accès. Si le serveur Dolibarr est derrière un proxy, ces paramètres indiquent à Dolibarr comment le traverser. +ExternalAccess=Accès externes MAIN_PROXY_USE=Utiliser un serveur proxy mandataire MAIN_PROXY_HOST=Nom/Adresse du serveur proxy mandataire MAIN_PROXY_PORT=Port du serveur proxy mandataire