X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/6753e281196a94e8a50d9c98d5195093e61fcefb..25d6ffc5f17d0e016c2ebb5b51a222665834e9e4:/WEB-INF/lib/ttGroupHelper.class.php?ds=sidebyside diff --git a/WEB-INF/lib/ttGroupHelper.class.php b/WEB-INF/lib/ttGroupHelper.class.php index 9fcb8443..6ffa6b21 100644 --- a/WEB-INF/lib/ttGroupHelper.class.php +++ b/WEB-INF/lib/ttGroupHelper.class.php @@ -35,8 +35,8 @@ class ttGroupHelper { $result = array(); $mdb2 = getConnection(); - // TODO: when we have subgroups, improve the query to return only top groups. - $sql = "select id, name, created, lang from tt_teams where status = 1 order by id desc"; + $sql = "select id, name, created, lang from tt_groups". + " where status = 1 and org_id is NULL order by id desc"; $res = $mdb2->query($sql); $result = array(); if (!is_a($res, 'PEAR_Error')) {