X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/7faef0e6d81444ad3ae10d1a2ce62fa753c80a9f..decf7058c3d2cc57fa2f814f33e7c09b264ff854:/tofile.php diff --git a/tofile.php b/tofile.php index 445b32d9..3ddce979 100644 --- a/tofile.php +++ b/tofile.php @@ -32,7 +32,7 @@ import('form.ActionForm'); import('ttReportHelper'); // Access checks. -if (!(ttAccessAllowed('view_own_reports') || ttAccessAllowed('view_reports'))) { +if (!(ttAccessAllowed('view_own_reports') || ttAccessAllowed('view_reports') || ttAccessAllowed('view_all_reports') || ttAccessAllowed('view_client_reports'))) { header('Location: access_denied.php'); exit(); } @@ -41,7 +41,7 @@ if (!(ttAccessAllowed('view_own_reports') || ttAccessAllowed('view_reports'))) { // Use custom fields plugin if it is enabled. if ($user->isPluginEnabled('cf')) { require_once('plugins/CustomFields.class.php'); - $custom_fields = new CustomFields($user->group_id); + $custom_fields = new CustomFields(); } // Report settings are stored in session bean before we get here. @@ -94,7 +94,7 @@ if ('xml' == $type) { print "\t<".$group_by_tag.">\n"; if ($bean->getAttribute('chduration')) { $val = $subtotal['time']; - if($val && isTrue(EXPORT_DECIMAL_DURATION)) + if($val && isTrue('EXPORT_DECIMAL_DURATION')) $val = time_to_decimal($val); print "\t\n"; } @@ -126,7 +126,7 @@ if ('xml' == $type) { if ($bean->getAttribute('chfinish')) print "\t\n"; if ($bean->getAttribute('chduration')) { $duration = $item['duration']; - if($duration && isTrue(EXPORT_DECIMAL_DURATION)) + if($duration && isTrue('EXPORT_DECIMAL_DURATION')) $duration = time_to_decimal($duration); print "\t\n"; } @@ -179,7 +179,7 @@ if ('csv' == $type) { print '"'.$subtotal['name'].'"'; if ($bean->getAttribute('chduration')) { $val = $subtotal['time']; - if($val && isTrue(EXPORT_DECIMAL_DURATION)) + if($val && isTrue('EXPORT_DECIMAL_DURATION')) $val = time_to_decimal($val); print ',"'.$val.'"'; } @@ -223,7 +223,7 @@ if ('csv' == $type) { if ($bean->getAttribute('chfinish')) print ',"'.$item['finish'].'"'; if ($bean->getAttribute('chduration')) { $val = $item['duration']; - if($val && isTrue(EXPORT_DECIMAL_DURATION)) + if($val && isTrue('EXPORT_DECIMAL_DURATION')) $val = time_to_decimal($val); print ',"'.$val.'"'; }