Removed commented out lines.
[timetracker.git] / WEB-INF / lib / ttTeamHelper.class.php
index b27e04d..3dba92a 100644 (file)
@@ -498,6 +498,23 @@ class ttTeamHelper {
     return false;
   }
 
+  // getPredefinedExpenses - obtains predefined expenses for team.
+  static function getPredefinedExpenses($team_id) {
+    $mdb2 = getConnection();
+
+    $result = array();
+    $sql = "select id, name, cost from tt_predefined_expenses where team_id = $team_id";
+    $res = $mdb2->query($sql);
+    $result = array();
+    if (!is_a($res, 'PEAR_Error')) {
+      while ($val = $res->fetchRow()) {
+        $result[] = $val;
+      }
+      return $result;
+    }
+    return false;
+  }
+
   // getNotifications - obtains notification descriptions for team.
   static function getNotifications($team_id) {
     $mdb2 = getConnection();
@@ -517,7 +534,7 @@ class ttTeamHelper {
     return false;
   }
 
-    // getNotifications - obtains monthly quotas for team.
+  // getMonthlyQuotas - obtains monthly quotas for team.
   static function getMonthlyQuotas($team_id) {
     $mdb2 = getConnection();
 
@@ -737,9 +754,6 @@ class ttTeamHelper {
   // The update function updates team information.
   static function update($team_id, $fields)
   {
-    // We'll require team name to be always set.
-    if (!isset($fields['name']) || $fields['name'] == "") return false;
-
     $mdb2 = getConnection();
     $name_part = 'name = '.$mdb2->quote($fields['name']);
     $currency_part = '';