Clean code

This commit is contained in:
Laurent Destailleur 2021-07-11 20:16:47 +02:00
parent fb13746644
commit c9242d83ab
2 changed files with 1 additions and 14 deletions

View File

@ -1791,11 +1791,11 @@ function addFileIntoDatabaseIndex($dir, $file, $fullpathorig = '', $mode = 'uplo
$ecmfile->src_object_id = $object->id; $ecmfile->src_object_id = $object->id;
if (isset($object->table_element)) { if (isset($object->table_element)) {
$ecmfile->src_object_type = $object->table_element; $ecmfile->src_object_type = $object->table_element;
if (isset($object->src_object_description)) $ecmfile->description = $object->src_object_description;
} else { } else {
dol_syslog('Error: object ' . get_class($object) . ' has no table_element attribute.'); dol_syslog('Error: object ' . get_class($object) . ' has no table_element attribute.');
return -1; return -1;
} }
if (isset($object->src_object_description)) $ecmfile->description = $object->src_object_description;
if (isset($object->src_object_keywords)) $ecmfile->keywords = $object->src_object_keywords; if (isset($object->src_object_keywords)) $ecmfile->keywords = $object->src_object_keywords;
} }

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();