Clean v14

This commit is contained in:
Laurent Destailleur
2021-07-11 18:56:15 +02:00
parent e1e410ce91
commit 802ac58f9a
5 changed files with 38 additions and 788 deletions

File diff suppressed because one or more lines are too long

View File

@@ -25,6 +25,8 @@
*/ */
require '../../main.inc.php'; require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->load("admin"); $langs->load("admin");
@@ -35,6 +37,10 @@ if (!$user->admin) {
$action = GETPOST('action', 'aZ09'); $action = GETPOST('action', 'aZ09');
/*
* Actions
*/
if ($action == 'convert') { if ($action == 'convert') {
$sql = "ALTER TABLE ".$db->escape(GETPOST("table", "aZ09"))." ENGINE=INNODB"; $sql = "ALTER TABLE ".$db->escape(GETPOST("table", "aZ09"))." ENGINE=INNODB";
$db->query($sql); $db->query($sql);
@@ -82,6 +88,7 @@ if (!$base) {
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">'; print '<table class="noborder">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>#</td>';
print '<td>'.$langs->trans("TableName").'</td>'; print '<td>'.$langs->trans("TableName").'</td>';
print '<td colspan="2">'.$langs->trans("Type").'</td>'; print '<td colspan="2">'.$langs->trans("Type").'</td>';
print '<td>'.$langs->trans("Format").'</td>'; print '<td>'.$langs->trans("Format").'</td>';
@@ -105,7 +112,18 @@ if (!$base) {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a></td>'; print '<td>'.($i+1).'</td>';
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a>';
$tablename = preg_replace('/^'.MAIN_DB_PREFIX.'/', 'llx_', $obj->Name);
if (dol_is_file(DOL_DOCUMENT_ROOT.'/install/mysql/tables/'.$tablename.'.sql')) {
$img = "info";
//print img_picto($langs->trans("ExternalModule"), $img);
} else {
$img = "info_black";
//print DOL_DOCUMENT_ROOT.'/install/mysql/tables/'.$tablename.'.sql';
print img_picto($langs->trans("ExternalModule"), $img, 'class="small"');
}
print '</td>';
print '<td>'.$obj->Engine.'</td>'; print '<td>'.$obj->Engine.'</td>';
if (isset($obj->Engine) && $obj->Engine == "MyISAM") { if (isset($obj->Engine) && $obj->Engine == "MyISAM") {
print '<td><a class="reposition" href="database-tables.php?action=convert&amp;table='.$obj->Name.'">'.$langs->trans("Convert").' InnoDb</a></td>'; print '<td><a class="reposition" href="database-tables.php?action=convert&amp;table='.$obj->Name.'">'.$langs->trans("Convert").' InnoDb</a></td>';
@@ -142,6 +160,8 @@ if (!$base) {
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">'; print '<table class="noborder">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>#</td>';
print '<td>'.$langs->trans("TableName").'</td>'; print '<td>'.$langs->trans("TableName").'</td>';
print '<td>Nb of tuples</td>'; print '<td>Nb of tuples</td>';
print '<td>Nb index fetcher.</td>'; print '<td>Nb index fetcher.</td>';
@@ -160,6 +180,7 @@ if (!$base) {
while ($i < $num) { while ($i < $num) {
$row = $db->fetch_row($resql); $row = $db->fetch_row($resql);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.($i+1).'</td>';
print '<td>'.$row[0].'</td>'; print '<td>'.$row[0].'</td>';
print '<td class="right">'.$row[1].'</td>'; print '<td class="right">'.$row[1].'</td>';
print '<td class="right">'.$row[2].'</td>'; print '<td class="right">'.$row[2].'</td>';
@@ -179,6 +200,7 @@ if (!$base) {
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">'; print '<table class="noborder">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>#</td>';
print '<td>'.$langs->trans("TableName").'</td>'; print '<td>'.$langs->trans("TableName").'</td>';
print '<td>'.$langs->trans("NbOfRecord").'</td>'; print '<td>'.$langs->trans("NbOfRecord").'</td>';
print "</tr>\n"; print "</tr>\n";
@@ -197,6 +219,7 @@ if (!$base) {
} }
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.($i+1).'</td>';
print '<td>'.$row[0].'</td>'; print '<td>'.$row[0].'</td>';
print '<td>'.$count.'</td>'; print '<td>'.$count.'</td>';
print '</tr>'; print '</tr>';

View File

@@ -569,3 +569,17 @@ create table llx_c_partnership_type
)ENGINE=innodb; )ENGINE=innodb;
DELETE FROM llx_rights_def WHERE module = 'hrm' AND perms = 'employee'; DELETE FROM llx_rights_def WHERE module = 'hrm' AND perms = 'employee';
CREATE TABLE llx_ecm_directories_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;
DROP TABLE llx_categorie_association;
DROP TABLE llx_cond_reglement;
DROP TABLE llx_zapier_hook_extrafields;

View File

@@ -3439,19 +3439,6 @@ function migrate_categorie_association($db, $langs, $conf)
} }
if (!$error) { if (!$error) {
// TODO DROP table in the next release
/*
$sqlDrop = "DROP TABLE ".MAIN_DB_PREFIX."categorie_association";
if ($db->query($sqlDrop))
{
$db->commit();
}
else
{
$db->rollback();
}
*/
$db->commit(); $db->commit();
} else { } else {
$db->rollback(); $db->rollback();