2
0
forked from Wavyzz/dolibarr

Moved dol_syslog query log to the database handler and decreased report level to DEBUG

This commit is contained in:
Marcos García de La Fuente
2014-06-09 15:38:43 +02:00
parent 803ccc300a
commit ae4bd4445e
24 changed files with 11 additions and 30 deletions

View File

@@ -1582,7 +1582,6 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent)
// Check loops on each other
$sql = "UPDATE ".MAIN_DB_PREFIX.$tabletocleantree." SET ".$fieldfkparent." = 0 WHERE ".$fieldfkparent." = rowid"; // So we update only records linked to themself
dol_syslog("sql=".$sql);
$resql = $db->query($sql);
if ($resql)
{
@@ -1623,7 +1622,6 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent)
$sql = "UPDATE ".MAIN_DB_PREFIX.$tabletocleantree;
$sql.= " SET ".$fieldfkparent." = 0";
$sql.= " WHERE rowid IN (".join(',',$listofidtoclean).")"; // So we update only records detected wrong
dol_syslog("sql=".$sql);
$resql = $db->query($sql);
if ($resql)
{
@@ -1643,7 +1641,6 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent)
$sql = "UPDATE ".MAIN_DB_PREFIX.$tabletocleantree;
$sql.= " SET ".$fieldfkparent." = 0";
$sql.= " WHERE ".$fieldfkparent." NOT IN (".join(',',$listofid).")"; // So we update only records linked to a non existing parent
dol_syslog("sql=".$sql);
$resql = $db->query($sql);
if ($resql)
{