Fix delete of ticket

This commit is contained in:
Laurent Destailleur 2019-01-21 16:42:34 +01:00
parent 8950720fb5
commit daa2fccd73

View File

@ -901,11 +901,6 @@ class Ticket extends CommonObject
if ($res < 0) $error++; if ($res < 0) $error++;
} }
if (!$error) {
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "ticket_logs";
$sql .= " WHERE fk_track_id = '" . $this->db->escape($this->track_id) . "'";
$resql = $this->db->query($sql);
}
if (!$error) { if (!$error) {
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "ticket_msg"; $sql = "DELETE FROM " . MAIN_DB_PREFIX . "ticket_msg";
$sql .= " WHERE fk_track_id = '" . $this->db->escape($this->track_id) . "'"; $sql .= " WHERE fk_track_id = '" . $this->db->escape($this->track_id) . "'";