+
+
+
+
diff --git a/htdocs/core/antispamimage.php b/htdocs/core/antispamimage.php
index cbce684a88d..a8830a5a4eb 100644
--- a/htdocs/core/antispamimage.php
+++ b/htdocs/core/antispamimage.php
@@ -26,6 +26,7 @@ define('NOLOGIN',1);
if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER',1);
if (! defined('NOREQUIREDB')) define('NOREQUIREDB',1);
if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN',1);
+if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC',1);
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1);
diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php
index 6aa41576c01..0d39fff1d47 100644
--- a/htdocs/core/lib/security2.lib.php
+++ b/htdocs/core/lib/security2.lib.php
@@ -148,6 +148,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
$php_self = $_SERVER['PHP_SELF'];
$php_self.= $_SERVER["QUERY_STRING"]?'?'.$_SERVER["QUERY_STRING"]:'';
+ if (! preg_match('/mainmenu=/',$php_self)) $php_self.=(preg_match('/\?/',$php_self)?'&':'?').'mainmenu=home';
// Title
$title='Dolibarr '.DOL_VERSION;
@@ -190,7 +191,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
$template_dir = DOL_DOCUMENT_ROOT."/core/tpl/";
}
}
-
+
// Set cookie for timeout management
$prefix=dol_getprefix();
$sessiontimeout='DOLSESSTIMEOUT_'.$prefix;
diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php
index afc427b5d7e..b8864ea80f3 100644
--- a/htdocs/core/menus/standard/eldy_menu.php
+++ b/htdocs/core/menus/standard/eldy_menu.php
@@ -31,12 +31,12 @@ class MenuManager
var $type_user; // Put 0 for internal users, 1 for external users
var $atarget=""; // Valeur du target a utiliser dans les liens
var $name="eldy";
-
+
var $menu_array;
var $menu_array_after;
var $tabMenu;
-
+
/**
* Constructor
@@ -52,7 +52,7 @@ class MenuManager
// On sauve en session le menu principal choisi
if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"];
if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"];
-
+
// Read mainmenu and leftmenu that define which menu to show
if (isset($_GET["mainmenu"]))
{
@@ -62,11 +62,11 @@ class MenuManager
$_SESSION["leftmenuopened"]="";
}
else
- {
+ {
// On va le chercher en session si non defini par le lien
$mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:'';
}
-
+
if (isset($_GET["leftmenu"]))
{
// On sauve en session le menu principal choisi
@@ -86,7 +86,7 @@ class MenuManager
// On va le chercher en session si non defini par le lien
$leftmenu=isset($_SESSION["leftmenu"])?$_SESSION["leftmenu"]:'';
}
-
+
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
$tabMenu=array();
$menuArbo = new Menubase($db,'eldy');
@@ -112,11 +112,11 @@ class MenuManager
$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,$this->tabMenu);
if ($mode == 'left') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu);
-
+
return $res;
}
diff --git a/htdocs/core/tools.php b/htdocs/core/tools.php
index 1a6ef81a58e..21975a1aef4 100755
--- a/htdocs/core/tools.php
+++ b/htdocs/core/tools.php
@@ -51,7 +51,8 @@ print $langs->trans("ToolsDesc").'
';
-$db->close();
llxFooter();
+
+$db->close();
?>
diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php
index 3452fbe9e86..9bdd8369f70 100644
--- a/htdocs/core/tpl/login.tpl.php
+++ b/htdocs/core/tpl/login.tpl.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2011-2012 Laurent Destailleur
+ * Copyright (C) 2011-2013 Laurent Destailleur
*
* 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
@@ -75,7 +75,10 @@ $(document).ready(function () {
});
+