diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 545a7a9ccfb..ecb34ea62c4 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2007-2008 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 @@ -14,15 +14,12 @@ * 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$ */ /** \file htdocs/admin/limits.php \brief Page de configuration des limites - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index 47b6e45adec..eb94a29c243 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -17,15 +17,12 @@ * 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$ */ /** \file htdocs/admin/system/database-tables.php \brief Page d'infos des tables de la base - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); @@ -93,6 +90,7 @@ else print 'Index_length'; print 'Increment'; print 'Last check'; + print 'Collation'; print "\n"; $sql = "SHOW TABLE STATUS"; @@ -127,6 +125,7 @@ else print ''.$obj->Index_length.''; print ''.$obj->Auto_increment.''; print ''.$obj->Check_time.''; + print ''.$obj->Collation.''; print ''; $i++; } diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index 1f4ee937d26..88ac773553f 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -17,16 +17,13 @@ * 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$ */ /** - \file htdocs/admin/system/database.php - \brief Page des infos système de la base de donnée - \version $Revision$ -*/ + * \file htdocs/admin/system/database.php + * \brief Page des infos système de la base de donnée + * \version $Id$ + */ require("./pre.inc.php"); include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".lib.php"; @@ -34,14 +31,16 @@ include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".li $langs->load("admin"); if (!$user->admin) - accessforbidden(); +accessforbidden(); + - /* -* Afficahge page -*/ - + * Afficahge page + */ + +$html=new Form($db); + llxHeader(); print_fiche_titre($langs->trans("DatabaseConfiguration"),'','setup'); @@ -54,14 +53,14 @@ $base=0; $sqls = array(); if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') { - $sqls[0] = "SHOW VARIABLES"; - $sqls[1] = "SHOW STATUS"; - $base=1; + $sqls[0] = "SHOW VARIABLES"; + $sqls[1] = "SHOW STATUS"; + $base=1; } else if ($conf->db->type == 'pgsql') { - $sqls[0] = "select name,setting from pg_settings;"; - $base=2; + $sqls[0] = "select name,setting from pg_settings;"; + $base=2; } else if ($conf->db->type == 'mssql') { @@ -71,33 +70,60 @@ else if ($conf->db->type == 'mssql') if (! $base) { - print $langs->trans("FeatureNotAvailableWithThisDatabaseDriver"); + print $langs->trans("FeatureNotAvailableWithThisDatabaseDriver"); } else { - foreach($sqls as $sql) - { - print '
'; - print ''; - print ''; - print ''; - print ''; - print "\n"; - - $resql = $db->query($sql); - if ($resql) + foreach($sqls as $sql) { - $var=True; - while ($row = $db->fetch_row($resql)) - { - $var=!$var; - print ""; - print '\n"; - } - $db->free($resql); + print '
'; + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$row[0].''.$row[1]."
'; + print ''; + print ''; + print ''; + print "\n"; + + // arraytest is an array of test to do + $arraytest=array(); + if (eregi('mysql',$db->type)) + { + $arraytest=array( + "character_set_connection"=>'character_set_client', + 'character_set_database'=>'dolibarr_main_db_character_set', + 'collation_connection'=>"character_set_client", + 'collation_database'=>'dolibarr_main_db_collation' + ); + } + + $resql = $db->query($sql); + if ($resql) + { + $var=True; + while ($row = $db->fetch_row($resql)) + { + $var=!$var; + print ""; + print ''; + print ''; + print "\n"; + } + $db->free($resql); + } + print "
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + print $row[0]; + print ''; + $show=0;$text=''; + foreach($arraytest as $key => $val) + { + if ($key != $row[0]) continue; + $text='Should be in line with value of param '.$val.' thas is '.${$val}.''; + $show=1; + } + if ($show==0) print $row[1]; + if ($show==1) print $html->textwithhelp($row[1],$text); + if ($show==2) print $html->textwithwarning($row[1],$text); + print '
\n"; } - print "\n"; - } } llxFooter('$Date$ - $Revision$'); diff --git a/htdocs/install/etape0.php b/htdocs/install/etape0.php index aa2d1c8599e..6a2de7c80e8 100644 --- a/htdocs/install/etape0.php +++ b/htdocs/install/etape0.php @@ -229,14 +229,14 @@ if (! $error && $db->connected) $listOfCharacterSet=$db->getListOfCharacterSet(); $listOfCollation=$db->getListOfCollation(); - // Choice of character_set_database + // Choice of dolibarr_main_db_charaster_set ?> trans("CharacterSetDatabase"); ?> '; + print ''; if ($disabled=="disabled"){ - print ''; + print ''; } } else { - print ''; + print ''; } ?> diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index 34311f00226..a9a7a08f1d5 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -149,7 +149,7 @@ if ($_POST["action"] == "set") fputs($fp, '$dolibarr_main_db_type="'.$_POST["db_type"].'";'); fputs($fp,"\n"); - fputs($fp, '$dolibarr_main_db_character_set="'.$_POST["character_set_database"].'";'); + fputs($fp, '$dolibarr_main_db_character_set="'.$_POST["dolibarr_main_db_charaster_set"].'";'); fputs($fp,"\n"); fputs($fp, '$dolibarr_main_db_collation="'.$_POST["dolibarr_main_db_collation"].'";');