X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/9a23a8c0a51b7ec38a96f525484134f3cb85dc7e..c9ab2e84d7c459e4d5e8e946be78c2e49533796e:/WEB-INF/lib/ttExpenseHelper.class.php diff --git a/WEB-INF/lib/ttExpenseHelper.class.php b/WEB-INF/lib/ttExpenseHelper.class.php index b73208ac..86ccbcd8 100644 --- a/WEB-INF/lib/ttExpenseHelper.class.php +++ b/WEB-INF/lib/ttExpenseHelper.class.php @@ -114,12 +114,12 @@ class ttExpenseHelper { $mdb2 = getConnection(); $client_field = null; - if (in_array('cl', explode(',', $user->plugins))) + if (ttPluginEnabled('cl')) $client_field = ", c.name as client_name"; $left_joins = ""; $left_joins = " left join tt_projects p on (ei.project_id = p.id)"; - if (in_array('cl', explode(',', $user->plugins))) + if (ttPluginEnabled('cl')) $left_joins .= " left join tt_clients c on (ei.client_id = c.id)"; $sql = "select ei.id, ei.date, ei.client_id, ei.project_id, ei.name, ei.cost, ei.invoice_id $client_field, p.name as project_name @@ -165,12 +165,12 @@ class ttExpenseHelper { $mdb2 = getConnection(); $client_field = null; - if (in_array('cl', explode(',', $user->plugins))) + if (ttPluginEnabled('cl')) $client_field = ", c.name as client"; $left_joins = ""; $left_joins = " left join tt_projects p on (ei.project_id = p.id)"; - if (in_array('cl', explode(',', $user->plugins))) + if (ttPluginEnabled('cl')) $left_joins .= " left join tt_clients c on (ei.client_id = c.id)"; $sql = "select ei.id as id $client_field, p.name as project, ei.name as item, ei.cost as cost, @@ -190,4 +190,3 @@ class ttExpenseHelper { return $result; } } -?> \ No newline at end of file