Fix: Compatibilité anciennes versions
This commit is contained in:
parent
12ae21e742
commit
3a5699e204
@ -22,13 +22,13 @@
|
|||||||
* $Source$
|
* $Source$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file htdocs/admin/system/mysql-tables-contraintes.php
|
/*! \file htdocs/admin/system/database-tables-contraintes.php
|
||||||
\brief Page d'info des contraintes de la base
|
\brief Page d'info des contraintes de la base
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
include_once $dolibarr_main_document_root."/lib/${dolibarr_main_db_type}.lib.php";
|
include_once $dolibarr_main_document_root."/lib/".$conf->db->type.".lib.php";
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
@ -42,12 +42,13 @@ llxHeader();
|
|||||||
|
|
||||||
print_titre($langs->trans("Constraints"));
|
print_titre($langs->trans("Constraints"));
|
||||||
|
|
||||||
if($dolibarr_main_db_type=="mysql")
|
if ($conf->db->type == 'mysql')
|
||||||
{
|
{
|
||||||
$sql = "SHOW TABLE STATUS";
|
$sql = "SHOW TABLE STATUS";
|
||||||
$base=1;
|
$base=1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if ($conf->db->type == 'pgsql')
|
||||||
{
|
{
|
||||||
$sql = "select conname,contype from pg_constraint;";
|
$sql = "select conname,contype from pg_constraint;";
|
||||||
$base=2;
|
$base=2;
|
||||||
|
|||||||
@ -22,13 +22,13 @@
|
|||||||
* $Source$
|
* $Source$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file htdocs/admin/system/mysql-tables.php
|
/*! \file htdocs/admin/system/database-tables.php
|
||||||
\brief Page d'infos des tables de la base
|
\brief Page d'infos des tables de la base
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
include_once $dolibarr_main_document_root."/lib/${dolibarr_main_db_type}.lib.php";
|
include_once $dolibarr_main_document_root."/lib/".$conf->db->type.".lib.php";
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
@ -44,9 +44,9 @@ if ($_GET["action"] == 'convert')
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
print_titre($langs->trans("Tables")." ".ucfirst($dolibarr_main_db_type));
|
print_titre($langs->trans("Tables")." ".ucfirst($conf->db->type));
|
||||||
|
|
||||||
if($dolibarr_main_db_type=="mysql")
|
if($conf->db->type == 'mysql')
|
||||||
{
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
@ -74,13 +74,13 @@ if($dolibarr_main_db_type=="mysql")
|
|||||||
{
|
{
|
||||||
$row = $db->fetch_row($i);
|
$row = $db->fetch_row($i);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<TR $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
print '<td>'.$row[0].'</td>';
|
print '<td>'.$row[0].'</td>';
|
||||||
print '<td>'.$row[1].'</td>';
|
print '<td>'.$row[1].'</td>';
|
||||||
if ($row[1] == "MyISAM")
|
if ($row[1] == "MyISAM")
|
||||||
{
|
{
|
||||||
print '<td><a href="mysql-tables.php?action=convert&table='.$row[0].'">Convertir</a></td>';
|
print '<td><a href="database-tables.php?action=convert&table='.$row[0].'">Convertir</a></td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -98,7 +98,8 @@ if($dolibarr_main_db_type=="mysql")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if($conf->db->type == 'pgsql')
|
||||||
{
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder">';
|
print '<table class="noborder">';
|
||||||
@ -135,5 +136,6 @@ else
|
|||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -22,13 +22,13 @@
|
|||||||
* $Source$
|
* $Source$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file htdocs/admin/system/mysql.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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
include_once $dolibarr_main_document_root."/lib/${dolibarr_main_db_type}.lib.php";
|
include_once $dolibarr_main_document_root."/lib/".$conf->db->type.".lib.php";
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
@ -39,12 +39,13 @@ llxHeader();
|
|||||||
|
|
||||||
print_titre($langs->trans("DatabaseConfiguration"));
|
print_titre($langs->trans("DatabaseConfiguration"));
|
||||||
|
|
||||||
if($dolibarr_main_db_type=="mysql")
|
if ($conf->db->type == 'mysql')
|
||||||
{
|
{
|
||||||
$sql = "SHOW VARIABLES";
|
$sql = "SHOW VARIABLES";
|
||||||
$base=1;
|
$base=1;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if ($conf->db->type == 'pgsql')
|
||||||
{
|
{
|
||||||
$sql = "select name,setting from pg_settings;";
|
$sql = "select name,setting from pg_settings;";
|
||||||
$base=2;
|
$base=2;
|
||||||
@ -69,7 +70,7 @@ if ($result)
|
|||||||
$objp = $db->fetch_object( $i);
|
$objp = $db->fetch_object( $i);
|
||||||
$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>';
|
||||||
else
|
else
|
||||||
print '<td>'.$objp->name.'</td><td>'.$objp->setting.'</td>';
|
print '<td>'.$objp->name.'</td><td>'.$objp->setting.'</td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user