FIX #yogosha5782

This commit is contained in:
Laurent Destailleur 2021-03-30 11:26:49 +02:00
parent d61f61ab45
commit 6c98276ead
5 changed files with 5 additions and 5 deletions

View File

@ -1175,7 +1175,7 @@ abstract class CommonObject
$this->db->begin();
$sql = "DELETE FROM ".MAIN_DB_PREFIX."element_contact";
$sql .= " WHERE rowid =".$rowid;
$sql .= " WHERE rowid = ".((int) $rowid);
dol_syslog(get_class($this)."::delete_contact", LOG_DEBUG);
if ($this->db->query($sql)) {

View File

@ -99,7 +99,7 @@ if ($action == 'addcontact' && $user->rights->expedition->creer) {
$result = $objectsrc->swapContactStatus(GETPOST('ligne', 'int'));
} elseif ($action == 'deletecontact' && $user->rights->expedition->creer) {
// Efface un contact
$result = $objectsrc->delete_contact(GETPOST("lineid"));
$result = $objectsrc->delete_contact(GETPOST("lineid", 'int'));
if ($result >= 0) {
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);

View File

@ -223,7 +223,7 @@ if ($action == 'swapstatut' && $user->rights->projet->creer) {
// Delete a contact
if (($action == 'deleteline' || $action == 'deletecontact') && $user->rights->projet->creer) {
$object->fetch($id);
$result = $object->delete_contact(GETPOST("lineid"));
$result = $object->delete_contact(GETPOST("lineid", 'int'));
if ($result >= 0) {
header("Location: contact.php?id=".$object->id);

View File

@ -110,7 +110,7 @@ if ($action == 'addcontact' && $user->rights->reception->creer) {
$result = $objectsrc->swapContactStatus(GETPOST('ligne', 'int'));
} elseif ($action == 'deletecontact' && $user->rights->reception->creer) {
// Efface un contact
$result = $objectsrc->delete_contact(GETPOST("lineid"));
$result = $objectsrc->delete_contact(GETPOST("lineid", 'int'));
if ($result >= 0) {
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);

View File

@ -410,7 +410,7 @@ class Dolresource extends CommonObject
$this->db->begin();
$sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element;
$sql .= " WHERE rowid =".$rowid;
$sql .= " WHERE rowid = ".((int) $rowid);
dol_syslog(get_class($this), LOG_DEBUG);
if ($this->db->query($sql)) {