From a5513d165e31174412f966213b8574642e16bbc5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Feb 2010 22:00:51 +0000 Subject: [PATCH] Fix: Add test on database name --- htdocs/includes/modules/modAgenda.class.php | 14 +++++++------- htdocs/install/etape1.php | 7 ++++--- htdocs/install/fileconf.php | 20 ++++++++++++++++---- htdocs/langs/en_US/errors.lang | 3 ++- htdocs/langs/fr_FR/errors.lang | 1 + htdocs/lib/agenda.lib.php | 5 +++-- 6 files changed, 33 insertions(+), 17 deletions(-) diff --git a/htdocs/includes/modules/modAgenda.class.php b/htdocs/includes/modules/modAgenda.class.php index 0c5bfd39893..5dc3586627d 100644 --- a/htdocs/includes/modules/modAgenda.class.php +++ b/htdocs/includes/modules/modAgenda.class.php @@ -22,21 +22,21 @@ */ /** - * \defgroup agenda Module agenda - * \brief Module pour gerer l'agenda et actions + * \defgroup agenda Module agenda + * \brief Module pour gerer l'agenda et actions * \brief $Id$ */ /** - * \file htdocs/includes/modules/modAgenda.class.php - * \ingroup agenda - * \brief Fichier de description et activation du module agenda + * \file htdocs/includes/modules/modAgenda.class.php + * \ingroup agenda + * \brief Fichier de description et activation du module agenda */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - * \class modAdherent - * \brief Classe de description et activation du module Adherent + * \class modAdherent + * \brief Classe de description et activation du module Adherent */ class modAgenda extends DolibarrModules { diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index 4d0a7ff6f1f..fed9b1ae2d3 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2005-2010 Regis Houssin @@ -211,7 +211,7 @@ if ($_POST["action"] == "set") $oldcontent = dol_openfile($conffile, 'r', ''); if (! dol_openfile($conffile.'.old', 'w', $oldcontent)) $error++; } - + $error+=write_conf_file($conffile); } @@ -351,7 +351,7 @@ if ($_POST["action"] == "set") print $langs->trans("DatabaseCreation").' : '; print $dolibarr_main_db_name; print ''; - print ''.$langs->trans("Error").' '.$db->errno().''; + print ''.$langs->trans("Error").' '.$db->lasterrno().''; // Affiche aide diagnostique print '
'; @@ -360,6 +360,7 @@ if ($_POST["action"] == "set") print '
'; print ''; + dolibarr_install_syslog('etape1: Failed to create database '.$dolibarr_main_db_name.' '.$db->lasterrno(), LOG_ERR); $error++; } $db->close(); diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index c2f222d516a..d7b71f58029 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -35,6 +35,7 @@ $setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["select $langs->setDefaultLang($setuplang); $langs->load("install"); +$langs->load("errors"); // You can force preselected values of the config step of Dolibarr by adding a file // install.forced.php into directory htdocs/install (This is the case with some installer @@ -384,6 +385,12 @@ while (($file = readdir($handle))!==false)