Code comment

This commit is contained in:
Laurent Destailleur 2021-09-09 19:47:15 +02:00
parent 520ce4c3ac
commit b8b5b97d78

View File

@ -714,12 +714,12 @@ class Holiday extends CommonObject
// Update status
$sql = "UPDATE ".MAIN_DB_PREFIX."holiday SET";
if (!empty($this->statut) && is_numeric($this->statut)) {
$sql .= " statut = ".$this->statut.",";
$sql .= " statut = ".((int) $this->statut).",";
} else {
$error++;
}
$sql .= " ref = '".$this->db->escape($num)."'";
$sql .= " WHERE rowid= ".$this->id;
$sql .= " WHERE rowid= ".((int) $this->id);
$this->db->begin();
@ -1937,7 +1937,7 @@ class Holiday extends CommonObject
*
* @param int $fk_user_action Id user creation
* @param int $fk_user_update Id user update
* @param string $label Label
* @param string $label Label (Example: 'Leave', 'Manual update', 'Leave request cancelation'...)
* @param int $new_solde New value
* @param int $fk_type Type of vacation
* @return int Id of record added, 0 if nothing done, < 0 if KO