$mdb2 = getConnection();
$client_field = null;
- if (in_array('cl', explode(',', $user->plugins)))
+ if ($user->isPluginEnabled('cl'))
$client_field = ", c.name as client";
$left_joins = " left join tt_projects p on (l.project_id = p.id)".
" left join tt_tasks t on (l.task_id = t.id)";
- if (in_array('cl', explode(',', $user->plugins)))
+ if ($user->isPluginEnabled('cl'))
$left_joins .= " left join tt_clients c on (l.client_id = c.id)";
$sql = "select l.id as id, TIME_FORMAT(l.start, $sql_time_format) as start,
<td>
<table border='0' cellpadding='3' cellspacing='1' width="100%">
<tr>
-{if in_array('cl', explode(',', $user->plugins))}
+{if $user->isPluginEnabled('cl')}
<td class="tableHeader" align="center">{$i18n.label.client}</td>
{/if}
<td class="tableHeader" align="center">{$i18n.label.cost}</td>
</tr>
<tr bgcolor="{cycle values="#f5f5f5,#ccccce"}">
-{if in_array('cl', explode(',', $user->plugins))}
+{if $user->isPluginEnabled('cl')}
<td>{$expense_item.client_name|escape:'html'}</td>
{/if}
{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
<tr>
<td valign="top">
<table border="0">
-{if in_array('cl', explode(',', $user->plugins))}
+{if $user->isPluginEnabled('cl')}
<tr>
<td align="right">{$i18n.label.client} {if in_array('cm', explode(',', $user->plugins))}(*){/if}:</td>
<td>{$forms.expenseItemForm.client.control}</td>
<td>{$forms.expensesForm.onBehalfUser.control}</td>
</tr>
{/if}
-{if in_array('cl', explode(',', $user->plugins))}
+{if $user->isPluginEnabled('cl')}
<tr>
<td align="right">{$i18n.label.client}{if in_array('cm', explode(',', $user->plugins))} (*){/if}:</td>
<td>{$forms.expensesForm.client.control}</td>
{if $expense_items}
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
- {if in_array('cl', explode(',', $user->plugins))}
+ {if $user->isPluginEnabled('cl')}
<td width="20%" class="tableHeader">{$i18n.label.client}</td>
{/if}
{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
</tr>
{foreach $expense_items as $item}
<tr bgcolor="{cycle values="#f5f5f5,#ccccce"}">
- {if in_array('cl', explode(',', $user->plugins))}
+ {if $user->isPluginEnabled('cl')}
<td valign='top'>{$item.client|escape:'html'}</td>
{/if}
{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.9.20.3459 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.9.20.3460 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
<tr>
<td valign="top">
<table border="0">
-{if in_array('cl', explode(',', $user->plugins))}
+{if $user->isPluginEnabled('cl')}
<tr><td>{$i18n.label.client}:</td></tr>
<tr><td>{$forms.timeRecordForm.client.control}</td></tr>
{/if}
<tr>
<td valign="top">
<table border="0">
-{if in_array('cl', explode(',', $user->plugins))}
+{if $user->isPluginEnabled('cl')}
<tr><td>{$i18n.label.client}:</td></tr>
<tr><td>{$forms.timeRecordForm.client.control}</td></tr>
{/if}
<tr>
<td valign="top">
<table border="0">
-{if in_array('cl', explode(',', $user->plugins))}
+{if $user->isPluginEnabled('cl')}
<tr><td>{$i18n.label.client}:</td></tr>
<tr><td>{$forms.timerRecordForm.client.control}</td></tr>
{/if}
<tr>
<td valign="top" colspan="2" align="center">
<table border="0" cellpadding="3">
-{if ((in_array('cl', explode(',', $user->plugins)) && !($user->isClient() && $user->client_id)) || ($custom_fields && $custom_fields->fields[0] && $custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN))}
+{if (($user->isPluginEnabled('cl') && !($user->isClient() && $user->client_id)) || ($custom_fields && $custom_fields->fields[0] && $custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN))}
<tr>
- {if in_array('cl', explode(',', $user->plugins)) && !($user->isClient() && $user->client_id)}<td><b>{$i18n.label.client}</b></td>{else}<td> </td>{/if}
+ {if $user->isPluginEnabled('cl') && !($user->isClient() && $user->client_id)}<td><b>{$i18n.label.client}</b></td>{else}<td> </td>{/if}
<td> </td>
{if ($custom_fields && $custom_fields->fields[0] && $custom_fields->fields[0]['type'] == CustomFields::TYPE_DROPDOWN)}<td><b>{$i18n.label.option}</b></td>{else}<td> </td>{/if}
</tr>
<tr>
<td colspan="3">
<table border="0" width="100%">
-{if in_array('cl', explode(',', $user->plugins)) || in_array('iv', explode(',', $user->plugins))}
+{if $user->isPluginEnabled('cl') || in_array('iv', explode(',', $user->plugins))}
<tr>
- {if in_array('cl', explode(',', $user->plugins))}
+ {if $user->isPluginEnabled('cl')}
<td width="25%"><label>{$forms.reportForm.chclient.control} {$i18n.label.client}</label></td>
{/if}
{if ($user->canManageTeam() || $user->isClient()) && in_array('iv', explode(',', $user->plugins))}
die ($i18n->getKey('error.sys'));
}
-if (in_array('cl', explode(',', $user->plugins)))
+if ($user->isPluginEnabled('cl'))
$clients = ttTeamHelper::getActiveClients($user->team_id);
$projects = ttTeamHelper::getActiveProjects($user->team_id);
$roles[ROLE_USER] = $i18n->getKey('label.user');
$roles[ROLE_COMANAGER] = $i18n->getKey('form.users.comanager');
-if (in_array('cl', explode(',', $user->plugins)))
+if ($user->isPluginEnabled('cl'))
$roles[ROLE_CLIENT] = $i18n->getKey('label.client');
$form->addInput(array('type'=>'combobox','onchange'=>'handleClientControl()','name'=>'role','value'=>$cl_role,'data'=>$roles));
-if (in_array('cl', explode(',', $user->plugins)))
+if ($user->isPluginEnabled('cl'))
$form->addInput(array('type'=>'combobox','name'=>'client','value'=>$cl_client_id,'data'=>$clients,'datakeys'=>array('id', 'name'),'empty'=>array(''=>$i18n->getKey('dropdown.select'))));
$form->addInput(array('type'=>'combobox','name'=>'status','value'=>$cl_status,