diff --git a/htdocs/install/etape0.php b/htdocs/install/etape0.php index a0b410116bc..fd5eea41ce4 100644 --- a/htdocs/install/etape0.php +++ b/htdocs/install/etape0.php @@ -101,28 +101,125 @@ if (! $error && (isset($_POST["db_create_database"]) && $_POST["db_create_databa }else{ $disabled="disabled"; } -if ($db->connected){ + +if ($db->connected) +{ ?> - + - -getDefaultCharacterSetDatabase(); + $defaultCollationConnection=$db->getDefaultCollationConnection(); + $listOfCharacterSet=$db->getListOfCharacterSet(); + $listOfCollation=$db->getListOfCollation(); + + if ($defaultCharacterSet) + { + ?> + + + + + + + + + + + + '.$dolibarr_main_db_user.'", mais pour cela, '; - print 'Dolibarr doit se connecter sur le serveur "'.$dolibarr_main_db_host.'" via le super utilisateur "'.$userroot.'".
'; - print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects.
'; - print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; - }else{ - print 'La connexion ayant échoué, les paramètres de connexion de l\'utilisateur sont peut-etre incorrects.
'; - print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; + print $langs->trans("YouAskDatabaseCreationSoDolibarrNeedToConnect",$dolibarr_main_db_user,$dolibarr_main_db_host,$userroot); + print '
'; + print $langs->trans("BecauseConnectionFailedParametersMayBeWrong").'

'; + print $langs->trans("ErrorGoBackAndCorrectParameters"); + $error++; + } + else + { + print $db->lasterror(); + print '
'.$langs->trans("BecauseConnectionFailedParametersMayBeWrong").'

'; + print $langs->trans("ErrorGoBackAndCorrectParameters"); + $error++; } } diff --git a/htdocs/install/mysql.php b/htdocs/install/mysql.php deleted file mode 100644 index 85e9440179f..00000000000 --- a/htdocs/install/mysql.php +++ /dev/null @@ -1,79 +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. - * - * $Id$ - * $Source$ - */ - - $listOfCharacterSet=$db->getListOfCharacterSet(); - $listOfCollation=$db->getListOfCollation(); -?> - - - - - - - - - - \ No newline at end of file diff --git a/htdocs/install/mysqli.php b/htdocs/install/mysqli.php deleted file mode 100644 index 3c6943eae91..00000000000 --- a/htdocs/install/mysqli.php +++ /dev/null @@ -1,79 +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. - * - * $Id$ - * $Source$ - */ - - $listOfCharacterSet=$db->getListOfCharacterSet(); - $listOfCollation=$db->getListOfCollation(); -?> - - - - - - - - - - \ No newline at end of file diff --git a/htdocs/install/pgsql.php b/htdocs/install/pgsql.php deleted file mode 100644 index 61e438cc98d..00000000000 --- a/htdocs/install/pgsql.php +++ /dev/null @@ -1,28 +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. - * - * $Id$ - * $Source$ - */ -?> - - - - - \ No newline at end of file
trans("CharsetChoice");?>
trans("CharacterSetClient"); ?>
trans("CharacterSetClientComment"); ?>
trans("CharacterSetDatabase"); ?> + '; + $selected=""; + foreach ($listOfCharacterSet as $characterSet) + { + if ($defaultCharacterSet == $characterSet['charset'] ) + { + $selected="selected"; + } + else + { + $selected=""; + } + print ''; + } + print ''; + } + else + { + print ''; + } + ?> +
trans("CharacterSetDatabaseComment"); ?>
trans("CollationConnection"); ?> + '; + $selected=""; + foreach ($listOfCollation as $collation) + { + if ($defaultCollationConnection == $collation['collation']) + { + $selected="selected"; + } + else + { + $selected=""; + } + print ''; + } + print ''; + } + else + { + print ''; + } + ?> +
trans("CollationConnectionComment"); ?>
trans("CharacterSetDatabase"); ?> - getListOfCharacterSet(); - ?> - -
trans("CharacterSetDatabaseComment"); ?>
trans("CollationConnection"); ?> - getListOfCollation(); - ?> - - - - - -
trans("CollationConnectionComment"); ?>
trans("CharacterSetDatabase"); ?> - getListOfCharacterSet(); - ?> - -
trans("CharacterSetDatabaseComment"); ?>
trans("CollationConnection"); ?> - getListOfCollation(); - ?> - - - - - -
trans("CollationConnectionComment"); ?>
trans("CharacterSetDatabase"); ?> - value="getDefaultCharacterSetDatabase()?>"> -
trans("CharacterSetDatabaseComment"); ?>