X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2FttReportHelper.class.php;h=67f1da26326a0d0668ead26aad202c3afe28ddf0;hb=e304b6c8564a6c3f2a3c6e68a0f5e9c7db817a65;hp=af8549de3a63f054ced2d7505d51b507c6238e20;hpb=aad7651dc744e59b94b14c7e2d5626bbcc713569;p=timetracker.git diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index af8549de..67f1da26 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -257,7 +257,7 @@ class ttReportHelper { // Add custom field. $include_cf_1 = $bean->getAttribute('chcf_1') || 'cf_1' == $group_by_option; if ($include_cf_1) { - $custom_fields = new CustomFields($user->team_id); + $custom_fields = new CustomFields($user->group_id); $cf_1_type = $custom_fields->fields[0]['type']; if ($cf_1_type == CustomFields::TYPE_TEXT) { array_push($fields, 'cfl.value as cf_1'); @@ -522,7 +522,7 @@ class ttReportHelper { // Add custom field. $include_cf_1 = $report['show_custom_field_1'] || 'cf_1' == $group_by_option; if ($include_cf_1) { - $custom_fields = new CustomFields($user->team_id); + $custom_fields = new CustomFields($user->group_id); $cf_1_type = $custom_fields->fields[0]['type']; if ($cf_1_type == CustomFields::TYPE_TEXT) { array_push($fields, 'cfl.value as cf_1'); @@ -756,7 +756,7 @@ class ttReportHelper { break; case 'cf_1': $group_field = 'cfo.value'; - $custom_fields = new CustomFields($user->team_id); + $custom_fields = new CustomFields($user->group_id); if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) $group_join = 'left join tt_custom_field_log cfl on (l.id = cfl.log_id and cfl.status = 1) left join tt_custom_field_options cfo on (cfl.value = cfo.id) '; elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) @@ -884,7 +884,7 @@ class ttReportHelper { break; case 'cf_1': $group_field = 'cfo.value'; - $custom_fields = new CustomFields($user->team_id); + $custom_fields = new CustomFields($user->group_id); if ($custom_fields->fields[0]['type'] == CustomFields::TYPE_TEXT) $group_join = 'left join tt_custom_field_log cfl on (l.id = cfl.log_id and cfl.status = 1) left join tt_custom_field_options cfo on (cfl.value = cfo.id) '; elseif ($custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN) @@ -1168,7 +1168,7 @@ class ttReportHelper { // Use custom fields plugin if it is enabled. if ($user->isPluginEnabled('cf')) - $custom_fields = new CustomFields($user->team_id); + $custom_fields = new CustomFields($user->group_id); // Define some styles to use in email. $style_title = 'text-align: center; font-size: 15pt; font-family: Arial, Helvetica, sans-serif;'; @@ -1188,7 +1188,7 @@ class ttReportHelper { $body .= '
'; // Output title. - $body .= ''.$i18n->getKey('form.mail.report_subject').': '.$totals['start_date'].' - '.$totals['end_date'].'
'; + $body .= ''.$i18n->get('form.mail.report_subject').': '.$totals['start_date'].' - '.$totals['end_date'].'
'; // Output comment. if ($comment) $body .= ''.htmlspecialchars($comment).'
'; @@ -1201,16 +1201,16 @@ class ttReportHelper { $group_by_header = htmlspecialchars($custom_fields->fields[0]['label']); else { $key = 'label.'.$group_by; - $group_by_header = $i18n->getKey($key); + $group_by_header = $i18n->get($key); } $body .= ''.$group_by_header.' | '; if ($bean->getAttribute('chduration')) - $body .= ''.$i18n->getKey('label.duration').' | '; + $body .= ''.$i18n->get('label.duration').' | '; if ($bean->getAttribute('chcost')) - $body .= ''.$i18n->getKey('label.cost').' | '; + $body .= ''.$i18n->get('label.cost').' | '; $body .= '|||||||||||||||||||||||||||||||||||||||||
'.$i18n->getKey('label.total').' | '; + $body .= ''.$i18n->get('label.total').' | '; if ($bean->getAttribute('chduration')) { $body .= '';
if ($totals['time'] <> '0:00') $body .= $totals['time'];
@@ -1251,33 +1251,33 @@ class ttReportHelper {
// Print table header.
$body .= '
|