]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttAdmin.class.php
Improved new export a bit by adding tasks to output.
[timetracker.git] / WEB-INF / lib / ttAdmin.class.php
index 30c78f94b8eb9b22b86d10a95b54045a1f3c5804..23d8480d746e9691d22f10a8d08b2cadd9341646 100644 (file)
@@ -41,7 +41,17 @@ class ttAdmin {
 
   // getSubgroups rerurns an array of subgroups for a group.
   function getSubgroups($group_id) {
-    return array(); // TODO: not yet implemented.
+    $mdb2 = getConnection();
+
+    $subgroups = array();
+    $sql =  "select id from tt_groups where parent_id = $group_id";
+    $res = $mdb2->query($sql);
+    if (!is_a($res, 'PEAR_Error')) {
+      while ($val = $res->fetchRow()) {
+        $subgroups[] = $val;
+      }
+    }
+    return $subgroups;
   }
 
   // getUsers obtains user ids in a group.