From 6526cd413e898fb96246726ee708aaa9e3cd6932 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Aug 2022 23:36:17 +0200 Subject: [PATCH] Clean code --- htdocs/holiday/class/holiday.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 806f899df36..6e01f6fd767 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -59,12 +59,6 @@ class Holiday extends CommonObject */ public $picto = 'holiday'; - /** - * @deprecated - * @see $id - */ - public $rowid; - /** * @var int User ID */ @@ -525,6 +519,7 @@ class Holiday extends CommonObject $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; + $tab_result[$i]['id'] = $obj->rowid; $tab_result[$i]['ref'] = ($obj->ref ? $obj->ref : $obj->rowid); $tab_result[$i]['fk_user'] = $obj->fk_user; @@ -649,7 +644,9 @@ class Holiday extends CommonObject $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; + $tab_result[$i]['id'] = $obj->rowid; $tab_result[$i]['ref'] = ($obj->ref ? $obj->ref : $obj->rowid); + $tab_result[$i]['fk_user'] = $obj->fk_user; $tab_result[$i]['fk_type'] = $obj->fk_type; $tab_result[$i]['date_create'] = $this->db->jdate($obj->date_create); @@ -1855,6 +1852,7 @@ class Holiday extends CommonObject $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; // rowid of user + $tab_result[$i]['id'] = $obj->rowid; // id of user $tab_result[$i]['name'] = $obj->lastname; // deprecated $tab_result[$i]['lastname'] = $obj->lastname; $tab_result[$i]['firstname'] = $obj->firstname; @@ -1897,6 +1895,7 @@ class Holiday extends CommonObject $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; // rowid of user + $tab_result[$i]['id'] = $obj->rowid; // id of user $tab_result[$i]['name'] = $obj->lastname; // deprecated $tab_result[$i]['lastname'] = $obj->lastname; $tab_result[$i]['firstname'] = $obj->firstname; @@ -2131,6 +2130,7 @@ class Holiday extends CommonObject $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; + $tab_result[$i]['id'] = $obj->rowid; $tab_result[$i]['date_action'] = $obj->date_action; $tab_result[$i]['fk_user_action'] = $obj->fk_user_action; $tab_result[$i]['fk_user_update'] = $obj->fk_user_update; @@ -2179,7 +2179,7 @@ class Holiday extends CommonObject $num = $this->db->num_rows($result); if ($num) { while ($obj = $this->db->fetch_object($result)) { - $types[$obj->rowid] = array('rowid'=> $obj->rowid, 'code'=> $obj->code, 'label'=>$obj->label, 'affect'=>$obj->affect, 'delay'=>$obj->delay, 'newbymonth'=>$obj->newbymonth); + $types[$obj->rowid] = array('id'=> $obj->rowid, 'rowid'=> $obj->rowid, 'code'=> $obj->code, 'label'=>$obj->label, 'affect'=>$obj->affect, 'delay'=>$obj->delay, 'newbymonth'=>$obj->newbymonth); } return $types;