From: anuko Date: Sat, 6 May 2017 18:45:01 +0000 (+0000) Subject: Fixed export-import for task required option. X-Git-Tag: timetracker_1.19-1~1518 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=08fce9c0cac0bbd8596632f3a3fc1f5f3da20992;p=timetracker.git Fixed export-import for task required option. --- diff --git a/WEB-INF/lib/ttExportHelper.class.php b/WEB-INF/lib/ttExportHelper.class.php index 7fbab198..61de42c6 100644 --- a/WEB-INF/lib/ttExportHelper.class.php +++ b/WEB-INF/lib/ttExportHelper.class.php @@ -64,7 +64,8 @@ class ttExportHelper { fwrite($file, "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, " team."]]>\n"); fwrite($file, "
address."]]>
\n"); fwrite($file, "
\n"); diff --git a/WEB-INF/lib/ttImportHelper.class.php b/WEB-INF/lib/ttImportHelper.class.php index 26cdfac1..f7be431f 100644 --- a/WEB-INF/lib/ttImportHelper.class.php +++ b/WEB-INF/lib/ttImportHelper.class.php @@ -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; diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 2f0c7ccd..3804b527 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -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')) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 468e6226..c2784da2 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.11.43.3631 | Copyright © Anuko | +  Anuko Time Tracker 1.11.43.3632 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}