X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/2dbf96e395377914a401aa3a635fce1120780b8f..a46ca9f2c279305fc8a6c7456e23f4ef46fd6fe4:/WEB-INF/lib/ttTeamHelper.class.php diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index e306ced8..2344fe32 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -269,7 +269,7 @@ class ttTeamHelper { $result = array(); $mdb2 = getConnection(); - $sql = "select id, name, description from tt_roles where team_id = $team_id and status = 1 order by upper(name)"; + $sql = "select id, name, rank, description from tt_roles where team_id = $team_id and status = 1 order by rank"; $res = $mdb2->query($sql); $result = array(); if (!is_a($res, 'PEAR_Error')) { @@ -286,8 +286,8 @@ class ttTeamHelper { $result = array(); $mdb2 = getConnection(); - $sql = "select id, name, description from tt_roles - where team_id = $team_id and status = 0 order by upper(name)"; + $sql = "select id, name, rank, description from tt_roles + where team_id = $team_id and status = 0 order by rank"; $res = $mdb2->query($sql); $result = array(); if (!is_a($res, 'PEAR_Error')) { @@ -298,6 +298,23 @@ class ttTeamHelper { return $result; } + // getAllRoles - obtains all roles defined for team. + static function getAllRoles($team_id) { + $mdb2 = getConnection(); + + $result = array(); + $sql = "select * from tt_roles where team_id = $team_id"; + $res = $mdb2->query($sql); + $result = array(); + if (!is_a($res, 'PEAR_Error')) { + while ($val = $res->fetchRow()) { + $result[] = $val; + } + return $result; + } + return false; + } + // The getActiveClients returns an array of active clients for team. static function getActiveClients($team_id, $all_fields = false) { @@ -520,23 +537,6 @@ class ttTeamHelper { return false; } - // getRoles - obtains all roles defined for team. - static function getRoles($team_id) { - $mdb2 = getConnection(); - - $result = array(); - $sql = "select * from tt_roles where team_id = $team_id"; - $res = $mdb2->query($sql); - $result = array(); - if (!is_a($res, 'PEAR_Error')) { - while ($val = $res->fetchRow()) { - $result[] = $val; - } - return $result; - } - return false; - } - // getExpenseItems - obtains all expense items for all users in team. static function getExpenseItems($team_id) { $mdb2 = getConnection();