X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttTeamHelper.class.php;h=4c1af14ed9f9f8f4d4c8223ba320f226738d8e8d;hb=09bd3c14ba08e57c46fb53c66e9053d248682c06;hp=fa78590337485d5c46294df79fa124fe0bc37050;hpb=fa05834dbdd4f642cac9c83773cd755ab5791e25;p=timetracker.git diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index fa785903..4c1af14e 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -701,11 +701,20 @@ class ttTeamHelper { $record_type_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) + $workday_hours = $fields['workday_hours']; + if ($workday_hours !== null) { + $workday_hours_f = ', workday_hours'; + $workday_hours_v = ', ' . (int)$workday_hours; + } else { + $workday_hours_f = ''; + $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 $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)"; + "$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $record_type_v $workday_hours_v)"; $affected = $mdb2->exec($sql); if (!is_a($affected, 'PEAR_Error')) {