Fix: More log to hunt a bug
This commit is contained in:
parent
e3b1c513b9
commit
807fad406f
@ -141,12 +141,16 @@ if ($_GET["action"] == 'setdoc')
|
|||||||
|
|
||||||
// On active le modele
|
// On active le modele
|
||||||
$type='invoice';
|
$type='invoice';
|
||||||
|
|
||||||
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
||||||
$sql_del.= " WHERE nom = '".$_GET["value"]."'";
|
$sql_del.= " WHERE nom = '".addslashes($_GET["value"])."'";
|
||||||
$sql_del.= " AND type = '".$type."'";
|
$sql_del.= " AND type = '".$type."'";
|
||||||
$sql_del.= " AND entity = ".$conf->entity;
|
$sql_del.= " AND entity = ".$conf->entity;
|
||||||
|
dol_syslog("facture.php ".$sql_del);
|
||||||
$result1=$db->query($sql_del);
|
$result1=$db->query($sql_del);
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom,type,entity) VALUES ('".$_GET["value"]."','".$type."',".$conf->entity.")";
|
|
||||||
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom,type,entity) VALUES ('".addslashes($_GET["value"])."','".$type."',".$conf->entity.")";
|
||||||
|
dol_syslog("facture.php ".$sql);
|
||||||
$result2=$db->query($sql);
|
$result2=$db->query($sql);
|
||||||
if ($result1 && $result2)
|
if ($result1 && $result2)
|
||||||
{
|
{
|
||||||
@ -154,6 +158,7 @@ if ($_GET["action"] == 'setdoc')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
dol_syslog("facture.php ".$db->lasterror(), LOG_ERR);
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user