X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=tofile.php;h=990b8a5552cf723fa6be08229eb189ef7564aa02;hb=54bb71ed8e6b7f79e3b26bc1c8a70a95793950c8;hp=07bbc11a67f1235804f958b5d3956bd33f1e9272;hpb=3297bc03f58074f5b688d867f3477e6af47d73de;p=timetracker.git diff --git a/tofile.php b/tofile.php index 07bbc11a..990b8a55 100644 --- a/tofile.php +++ b/tofile.php @@ -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 && defined('EXPORT_DECIMAL_DURATION') && 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 && defined('EXPORT_DECIMAL_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 && defined('EXPORT_DECIMAL_DURATION') && 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 && defined('EXPORT_DECIMAL_DURATION') && isTrue(EXPORT_DECIMAL_DURATION)) + if($val && isTrue(EXPORT_DECIMAL_DURATION)) $val = time_to_decimal($val); print ',"'.$val.'"'; }