X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/dfc50841cd4b60eb8f2172044d6dd08785fe3df4..82113b6a111dc3f716c71fb8fb55b11845cbd697:/WEB-INF/lib/ttGroupHelper.class.php 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')) {