From 5fddc963cb394ba7722b992db90252236b5de8e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Mar 2007 18:19:33 +0000 Subject: [PATCH] Si gestionnair emenu n'existe pas, prend par defaut. Ajout noindex sur page login pour eviter indexation sous moteurs de recherche --- htdocs/lib/functions.inc.php | 6 +++++- htdocs/main.inc.php | 18 ++++++++++++++---- htdocs/translate.class.php | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index b437fa67cfd..670e0013de0 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1136,7 +1136,11 @@ function dol_loginfunction($notused,$pearstatus) // Ce DTD est OK print ''; - print "\nDolibarr Authentification\n"; + print "\n"; + print "\n"; + print "\n"; + print ''."\n"; // Evite indexation par robots + print "Dolibarr Authentification\n"; print ''."\n"; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8a9d8edd596..7cd3b1fec79 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -471,8 +471,10 @@ function top_htmlhead($head, $title="", $target="") print ''; // print ''; - print "\n"; - + print "\n"; + print "\n"; + print "\n"; + print $langs->lang_header(); print $head; @@ -569,7 +571,11 @@ function top_menu($head, $title="", $target="") print '
'."\n"; // Charge le gestionnaire des entrees de menu du haut - require_once(DOL_DOCUMENT_ROOT ."/includes/menus/barre_top/".$conf->top_menu); + if (! file_exists(DOL_DOCUMENT_ROOT ."/includes/menus/barre_top/".$conf->top_menu)) + { + $conf->top_menu='eldy_backoffice.php'; + } + require_once(DOL_DOCUMENT_ROOT ."/includes/menus/barre_top/".$conf->top_menu); $menutop = new MenuTop($db); $menutop->atarget=$target; @@ -619,7 +625,11 @@ function left_menu($menu_array, $help_url='', $form_search='') // Autres entrees du menu par le gestionnaire - require_once(DOL_DOCUMENT_ROOT ."/includes/menus/barre_left/".$conf->left_menu); + if (! file_exists(DOL_DOCUMENT_ROOT ."/includes/menus/barre_left/".$conf->left_menu)) + { + $conf->left_menu='eldy_backoffice.php'; + } + require_once(DOL_DOCUMENT_ROOT ."/includes/menus/barre_left/".$conf->left_menu); $menu=new MenuLeft($db,$menu_array); $menu->showmenu(); diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php index f3c081c559a..bd812eefc2c 100644 --- a/htdocs/translate.class.php +++ b/htdocs/translate.class.php @@ -312,7 +312,7 @@ class Translate { if (! $charset) $charset="iso-8859-1"; //header("Content-Type: text/html; charset=$charset"); - $texte = "\n\n"; + $texte = "\n"; return $texte; }