Skip to content

Commit

Permalink
Update holiday.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 30, 2019
1 parent 37ad530 commit ea92ba2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions htdocs/holiday/class/holiday.class.php
Expand Up @@ -1480,15 +1480,15 @@ function fetchUsers($stringlist=true, $type=true, $filters='')

$obj = $this->db->fetch_object($resql);

$tab_result[$i]['rowid'] = $obj->rowid;
$tab_result[$i]['rowid'] = $obj->rowid; // rowid of user
$tab_result[$i]['name'] = $obj->lastname; // deprecated
$tab_result[$i]['lastname'] = $obj->lastname;
$tab_result[$i]['firstname'] = $obj->firstname;
$tab_result[$i]['gender'] = $obj->gender;
$tab_result[$i]['status'] = $obj->statut;
$tab_result[$i]['employee'] = $obj->employee;
$tab_result[$i]['photo'] = $obj->photo;
$tab_result[$i]['fk_user'] = $obj->fk_user;
$tab_result[$i]['fk_user'] = $obj->fk_user; // rowid of manager
//$tab_result[$i]['type'] = $obj->type;
//$tab_result[$i]['nb_holiday'] = $obj->nb_holiday;

Expand All @@ -1507,7 +1507,7 @@ function fetchUsers($stringlist=true, $type=true, $filters='')
else
{
// List of vacation balance users
$sql = "SELECT cpu.fk_user, cpu.fk_type, cpu.nb_holiday, u.lastname, u.firstname, u.gender, u.photo, u.employee, u.statut, u.fk_user as manager";
$sql = "SELECT cpu.fk_user as rowid, cpu.fk_type, cpu.nb_holiday, u.lastname, u.firstname, u.gender, u.photo, u.employee, u.statut, u.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_users as cpu, ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE cpu.fk_user = u.rowid";
if ($filters) $sql.=$filters;
Expand All @@ -1526,15 +1526,15 @@ function fetchUsers($stringlist=true, $type=true, $filters='')
{
$obj = $this->db->fetch_object($resql);

$tab_result[$i]['rowid'] = $obj->fk_user;
$tab_result[$i]['rowid'] = $obj->rowid; // rowid of user
$tab_result[$i]['name'] = $obj->lastname; // deprecated
$tab_result[$i]['lastname'] = $obj->lastname;
$tab_result[$i]['firstname'] = $obj->firstname;
$tab_result[$i]['gender'] = $obj->gender;
$tab_result[$i]['status'] = $obj->statut;
$tab_result[$i]['employee'] = $obj->employee;
$tab_result[$i]['photo'] = $obj->photo;
$tab_result[$i]['fk_user'] = $obj->manager;
$tab_result[$i]['fk_user'] = $obj->fk_user; // rowid of manager

$tab_result[$i]['type'] = $obj->fk_type;
$tab_result[$i]['nb_holiday'] = $obj->nb_holiday;
Expand Down

0 comments on commit ea92ba2

Please sign in to comment.