X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/8f4b1979cdee8d42f8098f80e79e8ca0509841fb..24364413261819a3a13dce97639fa6a3f670c4ca:/WEB-INF/lib/ttTeamHelper.class.php diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 1cf0d270..b30b9ccd 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -71,6 +71,7 @@ class ttTeamHelper { // The getActiveUsers obtains all active users in a given team. static function getActiveUsers($options = null) { global $user; + global $i18n; $mdb2 = getConnection(); if (isset($options['getAllFields'])) @@ -82,6 +83,9 @@ class ttTeamHelper { if (is_a($res, 'PEAR_Error')) return false; while ($val = $res->fetchRow()) { + // Localize top manager role name, as it is not localized in db. + if ($val['rank'] == 512) + $val['role_name'] = $i18n->getKey('role.top_manager.label'); $user_list[] = $val; } @@ -695,7 +699,6 @@ class ttTeamHelper { $result = array(); $mdb2 = getConnection(); - $role_manager = ROLE_MANAGER; $sql = "select t.name as team_name, u.id as manager_id, u.name as manager_name, u.login as manager_login, u.email as manager_email from tt_teams t inner join tt_users u on (u.team_id = t.id)