Skip to content

Commit 05b0f8e

Browse files
committed
Refactoring, finished replacing with ttUser::isPluginEnabled().
1 parent 0dfc4dd commit 05b0f8e

11 files changed

Lines changed: 12 additions & 12 deletions

File tree

WEB-INF/lib/ttReportHelper.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ static function prepareReportBody($bean, $comment)
10551055
$totals = ttReportHelper::getTotals($bean);
10561056

10571057
// Use custom fields plugin if it is enabled.
1058-
if (in_array('cf', explode(',', $user->plugins)))
1058+
if ($user->isPluginEnabled('cf'))
10591059
$custom_fields = new CustomFields($user->team_id);
10601060

10611061
// Define some styles to use in email.
@@ -1313,7 +1313,7 @@ static function prepareFavReportBody($report)
13131313
$totals = ttReportHelper::getFavTotals($report);
13141314

13151315
// Use custom fields plugin if it is enabled.
1316-
if (in_array('cf', explode(',', $user->plugins)))
1316+
if ($user->isPluginEnabled('cf'))
13171317
$custom_fields = new CustomFields($user->team_id);
13181318

13191319
// Define some styles to use in email.

WEB-INF/templates/footer.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<br>
1313
<table cellspacing="0" cellpadding="4" width="100%" border="0">
1414
<tr>
15-
<td align="center">&nbsp;Anuko Time Tracker 1.9.20.3461 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
15+
<td align="center">&nbsp;Anuko Time Tracker 1.9.20.3462 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
1616
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
1717
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
1818
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>

invoice_view.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
foreach($invoice_items as $item)
5353
$subtotal += $item['cost'];
5454
if ($tax_percent) {
55-
$tax_expenses = in_array('et', explode(',', $user->plugins));
55+
$tax_expenses = $user->isPluginEnabled('et');
5656
foreach($invoice_items as $item) {
5757
if ($item['type'] == 2 && !$tax_expenses)
5858
continue;

mobile/time.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
$next_date = date('Y-m-d', strtotime('+1 day', strtotime($cl_date)));
5555

5656
// Use custom fields plugin if it is enabled.
57-
if (in_array('cf', explode(',', $user->plugins))) {
57+
if ($user->isPluginEnabled('cf')) {
5858
require_once('../plugins/CustomFields.class.php');
5959
$custom_fields = new CustomFields($user->team_id);
6060
$smarty->assign('custom_fields', $custom_fields);

mobile/time_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
}
4242

4343
// Use custom fields plugin if it is enabled.
44-
if (in_array('cf', explode(',', $user->plugins))) {
44+
if ($user->isPluginEnabled('cf')) {
4545
require_once('../plugins/CustomFields.class.php');
4646
$custom_fields = new CustomFields($user->team_id);
4747
$smarty->assign('custom_fields', $custom_fields);

mobile/timer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
// TODO: for time page we may limit the day to today only.
5252

5353
// Use custom fields plugin if it is enabled.
54-
if (in_array('cf', explode(',', $user->plugins))) {
54+
if ($user->isPluginEnabled('cf')) {
5555
require_once('../plugins/CustomFields.class.php');
5656
$custom_fields = new CustomFields($user->team_id);
5757
$smarty->assign('custom_fields', $custom_fields);

report.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
}
4040

4141
// Use custom fields plugin if it is enabled.
42-
if (in_array('cf', explode(',', $user->plugins))) {
42+
if ($user->isPluginEnabled('cf')) {
4343
require_once('plugins/CustomFields.class.php');
4444
$custom_fields = new CustomFields($user->team_id);
4545
$smarty->assign('custom_fields', $custom_fields);

reports.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
}
4444

4545
// Use custom fields plugin if it is enabled.
46-
if (in_array('cf', explode(',', $user->plugins))) {
46+
if ($user->isPluginEnabled('cf')) {
4747
require_once('plugins/CustomFields.class.php');
4848
$custom_fields = new CustomFields($user->team_id);
4949
$smarty->assign('custom_fields', $custom_fields);

time_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
}
4242

4343
// Use custom fields plugin if it is enabled.
44-
if (in_array('cf', explode(',', $user->plugins))) {
44+
if ($user->isPluginEnabled('cf')) {
4545
require_once('plugins/CustomFields.class.php');
4646
$custom_fields = new CustomFields($user->team_id);
4747
$smarty->assign('custom_fields', $custom_fields);

tofile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939

4040
// Use custom fields plugin if it is enabled.
41-
if (in_array('cf', explode(',', $user->plugins))) {
41+
if ($user->isPluginEnabled('cf')) {
4242
require_once('plugins/CustomFields.class.php');
4343
$custom_fields = new CustomFields($user->team_id);
4444
}

0 commit comments

Comments
 (0)