X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttTeamHelper.class.php;h=fb74d8e10d7f45db50911e06ee02a28404857042;hb=2f5b2dc68a73954b497c7aaa3223be7f3db1d117;hp=de034794f38fd2ef6c6cdcd88a0ba2fce8730de8;hpb=a8334a66f49ce583f575ec1b4a71c7d746a1bcdc;p=timetracker.git diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index de034794..fb74d8e1 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -108,6 +108,7 @@ class ttTeamHelper { global $user; $mdb2 = getConnection(); + // Obtain role id for the user we are swapping ourselves with. $sql = "select u.id, u.role_id from tt_users u left join tt_roles r on (u.role_id = r.id) where u.id = $user_id and u.team_id = $user->team_id and u.status = 1 and r.rank < $user->rank"; $res = $mdb2->query($sql); if (is_a($res, 'PEAR_Error')) @@ -143,7 +144,7 @@ class ttTeamHelper { if (is_a($res, 'PEAR_Error')) return false; while ($val = $res->fetchRow()) { - $isClient = in_array('track_own_time', explode(',', $val['rights'])) ? 0 : 1; // Clients do not have data entry right. + $isClient = in_array('track_own_time', explode(',', $val['rights'])) ? 0 : 1; // Clients do not have track_own_time right. if ($isClient) continue; // Skip adding clients. $user_list[] = $val;