From f1be8df4ec5e2483213fe532f9ecf8f52c97704e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 9 Oct 2007 22:36:48 +0000 Subject: [PATCH] =?UTF-8?q?Si=20login=20pr=E9rempli,=20le=20focus=20va=20s?= =?UTF-8?q?ur=20le=20mot=20de=20passe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/install/etape5.php | 33 ++++----------------------------- htdocs/lib/functions.inc.php | 3 ++- 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php index dc145c5da14..6c21a24c90d 100644 --- a/htdocs/install/etape5.php +++ b/htdocs/install/etape5.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien DiCintio * @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -104,30 +103,6 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade") { $conf->setValues($db); -// todo: a supprimer ou modifier car le champs code n'existe plus -/* - $code=0; - - // Recherche du code AD99 le plus élevé. - $sql.= "select code from llx_user where code like 'AD%'"; - $resql=$db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $codefound=substr($obj->code,2); - if (is_numeric($codefound) && $codefound > $code) $code=$codefound; - //print "Found code=$code"; - $i++; - } - } - - $code++; - $code=sprintf("%02d",$code); -*/ $sql = "INSERT INTO llx_user(datec,login,pass,admin,name) VALUES (now()"; $sql.= ",'".$_POST["login"]."'"; $sql.= ",'".($conf->password_encrypted?md5($_POST["pass"]):$_POST["pass"])."'"; @@ -143,12 +118,12 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade") { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - print $langs->trans("AdminLoginAlreadyExists",$_POST["login"])."
"; + print '
'.$langs->trans("AdminLoginAlreadyExists",$_POST["login"])."

"; $success = 1; } else { - print $langs->trans("FailedToCreateAdminLogin")."
"; + print '
'.$langs->trans("FailedToCreateAdminLogin").'

'; } } @@ -208,7 +183,7 @@ if ($_POST["action"] == "upgrade") } -print ''; +print ''; print $langs->trans("GoToSetupArea"); print ''; diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 7ed722a61a4..208d671948a 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1354,7 +1354,8 @@ function dol_loginfunction($notused,$pearstatus) print ''."\n"; print ''."\n"; print ''."\n";