$time_a = explode(':', $value);
if ($time_a[0] > 12)
$res = (string)((int)$time_a[0] - 12).':'.$time_a[1].' PM';
- else if ($time_a[0] == 12)
+ elseif ($time_a[0] == 12)
$res = $value.' PM';
- else if ($time_a[0] == 0)
+ elseif ($time_a[0] == 0)
$res = '12:'.$time_a[1].' AM';
else
$res = $value.' AM';
$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,