FIX #yogosha5782
This commit is contained in:
parent
d61f61ab45
commit
6c98276ead
@ -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)) {
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user