function cleanHistory() { global $DB; if ($this->dohistory) { $query = "DELETE\n FROM `glpi_logs`\n WHERE (`itemtype` = '" . $this->getType() . "'\n AND `items_id` = '" . $this->fields['id'] . "')"; $DB->query($query); } }