Fixed export-import for task required option.
authoranuko <support@anuko.com>
Sat, 6 May 2017 18:45:01 +0000 (18:45 +0000)
committeranuko <support@anuko.com>
Sat, 6 May 2017 18:45:01 +0000 (18:45 +0000)
WEB-INF/lib/ttExportHelper.class.php
WEB-INF/lib/ttImportHelper.class.php
WEB-INF/lib/ttTeamHelper.class.php
WEB-INF/templates/footer.tpl

index 7fbab19..61de42c 100644 (file)
@@ -64,7 +64,8 @@ class ttExportHelper {
     fwrite($file, "<team currency=\"".$user->currency."\" lock_spec=\"".$user->lock_spec."\" lang=\"".$user->lang.
       "\" decimal_mark=\"".$user->decimal_mark."\" date_format=\"".$user->date_format."\" time_format=\"".$user->time_format.
       "\" week_start=\"".$user->week_start."\" workday_hours=\"".$user->workday_hours.
-      "\" plugins=\"".$user->plugins."\" tracking_mode=\"".$user->tracking_mode."\" record_type=\"".$user->record_type."\">\n");
+      "\" plugins=\"".$user->plugins."\" tracking_mode=\"".$user->tracking_mode."\" task_required=\"".$user->task_required.
+      "\" record_type=\"".$user->record_type."\">\n");
     fwrite($file, "  <name><![CDATA[".$user->team."]]></name>\n");
     fwrite($file, "  <address><![CDATA[".$user->address."]]></address>\n");
     fwrite($file, "</team>\n");
index 26cdfac..f7be431 100644 (file)
@@ -127,6 +127,7 @@ class ttImportHelper {
           'week_start' => $this->teamData['WEEK_START'],
           'plugins' => $this->teamData['PLUGINS'],
           'tracking_mode' => $this->teamData['TRACKING_MODE'],
+          'task_required' => $this->teamData['TASK_REQUIRED'],
           'record_type' => $this->teamData['RECORD_TYPE']));
         if ($team_id) {
           $this->team_id = $team_id;
index 2f0c7cc..3804b52 100644 (file)
@@ -709,6 +709,15 @@ class ttTeamHelper {
       $tracking_mode_v = '';
     }
 
+    $task_required = $fields['task_required'];
+    if ($task_required !== null) {
+      $task_required_f = ', task_required';
+      $task_required_v = ', ' . (int)$task_required;
+    } else {
+      $task_required_f = '';
+      $task_required_v = '';
+    }
+
     $record_type = $fields['record_type'];
     if ($record_type !== null) {
       $record_type_f = ', record_type';
@@ -736,11 +745,11 @@ class ttTeamHelper {
       $workday_hours_v = '';
     }
 
-    $sql = "insert into tt_teams (name, address, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $record_type_f $uncompleted_indicators_f $workday_hours_f)
+    $sql = "insert into tt_teams (name, address, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $task_required_f $record_type_f $uncompleted_indicators_f $workday_hours_f)
       values(".$mdb2->quote(trim($fields['name'])).
       ", ".$mdb2->quote(trim($fields['address'])).
       ", ".$mdb2->quote(trim($fields['currency']))." $lockspec_v, ".$mdb2->quote($lang).
-      "$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $record_type_v $uncompleted_indicators_v $workday_hours_v)";
+      "$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $task_required_v $record_type_v $uncompleted_indicators_v $workday_hours_v)";
     $affected = $mdb2->exec($sql);
 
     if (!is_a($affected, 'PEAR_Error')) {
index 468e622..c2784da 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.11.43.3631 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.11.43.3632 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>