Extended the Locking plugin with cron specification fo locks.
[timetracker.git] / WEB-INF / lib / ttTeamHelper.class.php
index 1cf71d8..8cc9660 100644 (file)
@@ -723,6 +723,7 @@ class ttTeamHelper {
     $tracking_mode_part = '';
     $record_type_part = '';
     $plugins_part = '';
+    $lock_spec_part = '';
     
     if (isset($fields['address'])) $addr_part = ', address = '.$mdb2->quote($fields['address']);
     if (isset($fields['currency'])) $currency_part = ', currency = '.$mdb2->quote($fields['currency']);
@@ -735,9 +736,11 @@ class ttTeamHelper {
     if (isset($fields['tracking_mode'])) $tracking_mode_part = ', tracking_mode = '.intval($fields['tracking_mode']);
     if (isset($fields['record_type'])) $record_type_part = ', record_type = '.intval($fields['record_type']);
     if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']);
+    if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']);
 
     $sql = "update tt_teams set $name_part $addr_part $currency_part $locktime_part $lang_part $decimal_mark_part
-      $date_format_part $time_format_part $week_start_part $tracking_mode_part $record_type_part $plugins_part where id = $team_id";
+      $date_format_part $time_format_part $week_start_part $tracking_mode_part $record_type_part
+      $plugins_part $lock_spec_part where id = $team_id";
     $affected = $mdb2->exec($sql);
     
     if (is_a($affected, 'PEAR_Error')) {