Some refactoring for subgroup support.
[timetracker.git] / WEB-INF / lib / ttGroupHelper.class.php
index 128650c..6ddffaa 100644 (file)
 // This is a planned replacement for ttTeamHelper as we move forward with subgroups.
 class ttGroupHelper {
 
-  // The getTopGroups function returns an array of all active top groups on the server.
-  static function getTopGroups() {
-    $result = array();
-    $mdb2 = getConnection();
-
-    $sql =  "select id, name, created, lang from tt_groups".
-            " where status = 1 and org_id = id order by id desc";
-    $res = $mdb2->query($sql);
-    $result = array();
-    if (!is_a($res, 'PEAR_Error')) {
-      while ($val = $res->fetchRow()) {
-        $val['date'] = substr($val['created'], 0, 10); // Strip the time.
-        $result[] = $val;
-      }
-      return $result;
-    }
-    return false;
-  }
-
   // The getGroupName function returns group name.
   static function getGroupName($group_id) {
     $mdb2 = getConnection();