Qual: Déplacement des drivers de base de données de /lib dans /lib/databases pour plus de clarté.
New: Ajout du driver mysqli pour accéder à mysql via les fonction mysqli de la 4.1
This commit is contained in:
parent
9294334913
commit
28dd607f90
@ -43,18 +43,24 @@ llxHeader();
|
|||||||
|
|
||||||
print_titre($langs->trans("Constraints"));
|
print_titre($langs->trans("Constraints"));
|
||||||
|
|
||||||
if ($conf->db->type == 'mysql')
|
$base=0;
|
||||||
|
if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli')
|
||||||
{
|
{
|
||||||
$sql = "SHOW TABLE STATUS";
|
$sql = "SHOW TABLE STATUS";
|
||||||
$base=1;
|
$base=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->db->type == 'pgsql')
|
if ($conf->db->type == 'pgsql')
|
||||||
{
|
{
|
||||||
$sql = "SELECT conname, contype FROM pg_constraint;";
|
$sql = "SELECT conname, contype FROM pg_constraint;";
|
||||||
$base=2;
|
$base=2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $base)
|
||||||
|
{
|
||||||
|
print $langs->trans("FeatureNotAvailableWithThisDatabaseDriver");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -65,7 +71,7 @@ if($base==1)
|
|||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
print '<td>'.$langs->trans("Constraints").'</td>';
|
print '<td>'.$langs->trans("Constraints").'</td>';
|
||||||
}
|
}
|
||||||
else
|
if ($base==2)
|
||||||
{
|
{
|
||||||
print '<td>'.$langs->trans("Constraints").'</td>';
|
print '<td>'.$langs->trans("Constraints").'</td>';
|
||||||
print '<td>'.$langs->trans("ConstraintsType").'</td>';
|
print '<td>'.$langs->trans("ConstraintsType").'</td>';
|
||||||
@ -92,7 +98,7 @@ if ($result)
|
|||||||
print '<td>'.$obj->Engine.'</td>';
|
print '<td>'.$obj->Engine.'</td>';
|
||||||
print '<td>'.$obj->Comment.'</td>';
|
print '<td>'.$obj->Comment.'</td>';
|
||||||
}
|
}
|
||||||
else
|
if ($base==2)
|
||||||
{
|
{
|
||||||
print '<td>'.$obj->conname.'</td>';
|
print '<td>'.$obj->conname.'</td>';
|
||||||
print '<td>'.$obj->contype.'</td>';
|
print '<td>'.$obj->contype.'</td>';
|
||||||
@ -103,6 +109,7 @@ if ($result)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
}
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -48,7 +48,26 @@ llxHeader();
|
|||||||
|
|
||||||
print_titre($langs->trans("Tables")." ".ucfirst($conf->db->type));
|
print_titre($langs->trans("Tables")." ".ucfirst($conf->db->type));
|
||||||
|
|
||||||
if($conf->db->type == 'mysql')
|
$base=0;
|
||||||
|
if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli')
|
||||||
|
{
|
||||||
|
$sql = "SHOW TABLE STATUS";
|
||||||
|
$base=1;
|
||||||
|
}
|
||||||
|
if ($conf->db->type == 'pgsql')
|
||||||
|
{
|
||||||
|
$sql = "SELECT conname, contype FROM pg_constraint;";
|
||||||
|
$base=2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (! $base)
|
||||||
|
{
|
||||||
|
print $langs->trans("FeatureNotAvailableWithThisDatabaseDriver");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($base == 1)
|
||||||
{
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
@ -104,7 +123,7 @@ if($conf->db->type == 'mysql')
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($conf->db->type == 'pgsql')
|
if ($base == 2)
|
||||||
{
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
@ -141,7 +160,7 @@ if($conf->db->type == 'pgsql')
|
|||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,8 @@
|
|||||||
* $Source$
|
* $Source$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file htdocs/admin/system/database.php
|
/**
|
||||||
|
\file htdocs/admin/system/database.php
|
||||||
\brief Page des infos système de la base de donnée
|
\brief Page des infos système de la base de donnée
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
@ -35,22 +36,30 @@ $langs->load("admin");
|
|||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
print_titre($langs->trans("DatabaseConfiguration"));
|
print_titre($langs->trans("DatabaseConfiguration"));
|
||||||
|
|
||||||
if ($conf->db->type == 'mysql')
|
$base=0;
|
||||||
|
if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli')
|
||||||
{
|
{
|
||||||
$sql = "SHOW VARIABLES";
|
$sql = "SHOW VARIABLES";
|
||||||
$base=1;
|
$base=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->db->type == 'pgsql')
|
if ($conf->db->type == 'pgsql')
|
||||||
{
|
{
|
||||||
$sql = "select name,setting from pg_settings;";
|
$sql = "select name,setting from pg_settings;";
|
||||||
$base=2;
|
$base=2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $base)
|
||||||
|
{
|
||||||
|
print $langs->trans("FeatureNotAvailableWithThisDatabaseDriver");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -58,7 +67,6 @@ print '<td>'.$langs->trans("Parameter").'</td>';
|
|||||||
print '<td>'.$langs->trans("Value").'</td>';
|
print '<td>'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
@ -70,16 +78,15 @@ if ($result)
|
|||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
if ($base==1)
|
if ($base==1) print '<td>'.$objp->Variable_name.'</td><td>'.$objp->Value.'</td>';
|
||||||
print '<td>'.$objp->Variable_name.'</td><td>'.$objp->Value.'</td>';
|
if ($base==2) print '<td>'.$objp->name.'</td><td>'.$objp->setting.'</td>';
|
||||||
else
|
|
||||||
print '<td>'.$objp->name.'</td><td>'.$objp->setting.'</td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user