$body .= '<body>';
// Output title.
- $body .= '<p style="'.$style_title.'">'.$i18n->getKey('form.mail.report_subject').': '.$totals['start_date'].' - '.$totals['end_date'].'</p>';
+ $body .= '<p style="'.$style_title.'">'.$i18n->get('form.mail.report_subject').': '.$totals['start_date'].' - '.$totals['end_date'].'</p>';
// Output comment.
if ($comment) $body .= '<p>'.htmlspecialchars($comment).'</p>';
$group_by_header = htmlspecialchars($custom_fields->fields[0]['label']);
else {
$key = 'label.'.$group_by;
- $group_by_header = $i18n->getKey($key);
+ $group_by_header = $i18n->get($key);
}
$body .= '<table border="0" cellpadding="4" cellspacing="0" width="100%">';
$body .= '<tr>';
$body .= '<td style="'.$tableHeader.'">'.$group_by_header.'</td>';
if ($bean->getAttribute('chduration'))
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.duration').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.duration').'</td>';
if ($bean->getAttribute('chcost'))
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.cost').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.cost').'</td>';
$body .= '</tr>';
foreach($subtotals as $subtotal) {
$body .= '<tr style="'.$rowSubtotal.'">';
// Print totals.
$body .= '<tr><td> </td></tr>';
$body .= '<tr style="'.$rowSubtotal.'">';
- $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->getKey('label.total').'</td>';
+ $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->get('label.total').'</td>';
if ($bean->getAttribute('chduration')) {
$body .= '<td style="'.$cellRightAlignedSubtotal.'">';
if ($totals['time'] <> '0:00') $body .= $totals['time'];
// Print table header.
$body .= '<table border="0" cellpadding="4" cellspacing="0" width="100%">';
$body .= '<tr>';
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.date').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.date').'</td>';
if ($canViewReports || $isClient)
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.user').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.user').'</td>';
if ($bean->getAttribute('chclient'))
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.client').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.client').'</td>';
if ($bean->getAttribute('chproject'))
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.project').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.project').'</td>';
if ($bean->getAttribute('chtask'))
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.task').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.task').'</td>';
if ($bean->getAttribute('chcf_1'))
$body .= '<td style="'.$tableHeader.'">'.htmlspecialchars($custom_fields->fields[0]['label']).'</td>';
if ($bean->getAttribute('chstart'))
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.start').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.start').'</td>';
if ($bean->getAttribute('chfinish'))
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.finish').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.finish').'</td>';
if ($bean->getAttribute('chduration'))
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.duration').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.duration').'</td>';
if ($bean->getAttribute('chnote'))
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.note').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.note').'</td>';
if ($bean->getAttribute('chcost'))
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.cost').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.cost').'</td>';
if ($bean->getAttribute('chpaid'))
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.paid').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.paid').'</td>';
if ($bean->getAttribute('chip'))
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.ip').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.ip').'</td>';
if ($bean->getAttribute('chinvoice'))
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.invoice').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.invoice').'</td>';
$body .= '</tr>';
// Initialize variables to print subtotals.
$cur_grouped_by = $record['grouped_by'];
if ($cur_grouped_by != $prev_grouped_by && !$first_pass) {
$body .= '<tr style="'.$rowSubtotal.'">';
- $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->getKey('label.subtotal').'</td>';
+ $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->get('label.subtotal').'</td>';
$subtotal_name = htmlspecialchars($subtotals[$prev_grouped_by]['name']);
if ($canViewReports || $isClient) $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.($group_by == 'user' ? $subtotal_name : '').'</td>';
if ($bean->getAttribute('chclient')) $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.($group_by == 'client' ? $subtotal_name : '').'</td>';
$body .= '<td style="'.$cellRightAligned.'">'.$record['cost'].'</td>';
if ($bean->getAttribute('chpaid')) {
$body .= '<td style="'.$cellRightAligned.'">';
- $body .= $record['paid'] == 1 ? $i18n->getKey('label.yes') : $i18n->getKey('label.no');
+ $body .= $record['paid'] == 1 ? $i18n->get('label.yes') : $i18n->get('label.no');
$body .= '</td>';
}
if ($bean->getAttribute('chip')) {
// Print a terminating subtotal.
if ($print_subtotals) {
$body .= '<tr style="'.$rowSubtotal.'">';
- $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->getKey('label.subtotal').'</td>';
+ $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->get('label.subtotal').'</td>';
$subtotal_name = htmlspecialchars($subtotals[$cur_grouped_by]['name']);
if ($canViewReports || $isClient) $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.($group_by == 'user' ? $subtotal_name : '').'</td>';
if ($bean->getAttribute('chclient')) $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.($group_by == 'client' ? $subtotal_name : '').'</td>';
// Print totals.
$body .= '<tr><td> </td></tr>';
$body .= '<tr style="'.$rowSubtotal.'">';
- $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->getKey('label.total').'</td>';
+ $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->get('label.total').'</td>';
if ($canViewReports || $isClient) $body .= '<td></td>';
if ($bean->getAttribute('chclient')) $body .= '<td></td>';
if ($bean->getAttribute('chproject')) $body .= '<td></td>';
// Output footer.
if (!defined('REPORT_FOOTER') || !(REPORT_FOOTER == false))
- $body .= '<p style="text-align: center;">'.$i18n->getKey('form.mail.footer').'</p>';
+ $body .= '<p style="text-align: center;">'.$i18n->get('form.mail.footer').'</p>';
// Finish creating email body.
$body .= '</body></html>';
$body .= '<body>';
// Output title.
- $body .= '<p style="'.$style_title.'">'.$i18n->getKey('form.mail.report_subject').': '.$totals['start_date'].' - '.$totals['end_date'].'</p>';
+ $body .= '<p style="'.$style_title.'">'.$i18n->get('form.mail.report_subject').': '.$totals['start_date'].' - '.$totals['end_date'].'</p>';
// Output comment.
// if ($comment) $body .= '<p>'.htmlspecialchars($comment).'</p>'; // No comment for fav. reports.
$group_by_header = htmlspecialchars($custom_fields->fields[0]['label']);
else {
$key = 'label.'.$group_by;
- $group_by_header = $i18n->getKey($key);
+ $group_by_header = $i18n->get($key);
}
$body .= '<table border="0" cellpadding="4" cellspacing="0" width="100%">';
$body .= '<tr>';
$body .= '<td style="'.$tableHeader.'">'.$group_by_header.'</td>';
if ($report['show_duration'])
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.duration').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.duration').'</td>';
if ($report['show_cost'])
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.cost').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.cost').'</td>';
$body .= '</tr>';
foreach($subtotals as $subtotal) {
$body .= '<tr style="'.$rowSubtotal.'">';
// Print totals.
$body .= '<tr><td> </td></tr>';
$body .= '<tr style="'.$rowSubtotal.'">';
- $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->getKey('label.total').'</td>';
+ $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->get('label.total').'</td>';
if ($report['show_duration']) {
$body .= '<td style="'.$cellRightAlignedSubtotal.'">';
if ($totals['time'] <> '0:00') $body .= $totals['time'];
// Print table header.
$body .= '<table border="0" cellpadding="4" cellspacing="0" width="100%">';
$body .= '<tr>';
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.date').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.date').'</td>';
if ($canViewReports || $isClient)
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.user').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.user').'</td>';
if ($report['show_client'])
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.client').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.client').'</td>';
if ($report['show_project'])
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.project').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.project').'</td>';
if ($report['show_task'])
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.task').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.task').'</td>';
if ($report['show_custom_field_1'])
$body .= '<td style="'.$tableHeader.'">'.htmlspecialchars($custom_fields->fields[0]['label']).'</td>';
if ($report['show_start'])
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.start').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.start').'</td>';
if ($report['show_end'])
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.finish').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.finish').'</td>';
if ($report['show_duration'])
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.duration').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.duration').'</td>';
if ($report['show_note'])
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.note').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.note').'</td>';
if ($report['show_cost'])
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.cost').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.cost').'</td>';
if ($report['show_paid'])
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.paid').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.paid').'</td>';
if ($report['show_ip'])
- $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.ip').'</td>';
+ $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->get('label.ip').'</td>';
if ($report['show_invoice'])
- $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.invoice').'</td>';
+ $body .= '<td style="'.$tableHeader.'">'.$i18n->get('label.invoice').'</td>';
$body .= '</tr>';
// Initialize variables to print subtotals.
$cur_grouped_by = $record['grouped_by'];
if ($cur_grouped_by != $prev_grouped_by && !$first_pass) {
$body .= '<tr style="'.$rowSubtotal.'">';
- $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->getKey('label.subtotal').'</td>';
+ $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->get('label.subtotal').'</td>';
$subtotal_name = htmlspecialchars($subtotals[$prev_grouped_by]['name']);
if ($canViewReports || $isClient) $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.($group_by == 'user' ? $subtotal_name : '').'</td>';
if ($report['show_client']) $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.($group_by == 'client' ? $subtotal_name : '').'</td>';
$body .= '<td style="'.$cellRightAligned.'">'.$record['cost'].'</td>';
if ($report['show_paid']) {
$body .= '<td style="'.$cellRightAligned.'">';
- $body .= $record['paid'] == 1 ? $i18n->getKey('label.yes') : $i18n->getKey('label.no');
+ $body .= $record['paid'] == 1 ? $i18n->get('label.yes') : $i18n->get('label.no');
$body .= '</td>';
}
if ($report['show_ip']) {
// Print a terminating subtotal.
if ($print_subtotals) {
$body .= '<tr style="'.$rowSubtotal.'">';
- $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->getKey('label.subtotal').'</td>';
+ $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->get('label.subtotal').'</td>';
$subtotal_name = htmlspecialchars($subtotals[$cur_grouped_by]['name']);
if ($canViewReports || $isClient) $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.($group_by == 'user' ? $subtotal_name : '').'</td>';
if ($report['show_client']) $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.($group_by == 'client' ? $subtotal_name : '').'</td>';
// Print totals.
$body .= '<tr><td> </td></tr>';
$body .= '<tr style="'.$rowSubtotal.'">';
- $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->getKey('label.total').'</td>';
+ $body .= '<td style="'.$cellLeftAlignedSubtotal.'">'.$i18n->get('label.total').'</td>';
if ($canViewReports || $isClient) $body .= '<td></td>';
if ($report['show_client']) $body .= '<td></td>';
if ($report['show_project']) $body .= '<td></td>';
// Output footer.
if (!defined('REPORT_FOOTER') || !(REPORT_FOOTER == false))
- $body .= '<p style="text-align: center;">'.$i18n->getKey('form.mail.footer').'</p>';
+ $body .= '<p style="text-align: center;">'.$i18n->get('form.mail.footer').'</p>';
// Finish creating email body.
$body .= '</body></html>';
$rights_manager = $rights_comanager.',manage_features,manage_basic_settings,manage_advanced_settings,manage_roles,export_data,manage_subgroups';
// Active roles.
- $name = $mdb2->quote($i18n->getKey('role.user.label'));
- $description = $mdb2->quote($i18n->getKey('role.user.description'));
+ $name = $mdb2->quote($i18n->get('role.user.label'));
+ $description = $mdb2->quote($i18n->get('role.user.description'));
$rights = $mdb2->quote($rights_user);
$sql = "insert into tt_roles (team_id, name, description, rank, rights, status) values($team_id, $name, $description, 4, $rights, 1)";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
return false;
- $name = $mdb2->quote($i18n->getKey('role.client.label'));
- $description = $mdb2->quote($i18n->getKey('role.client.description'));
+ $name = $mdb2->quote($i18n->get('role.client.label'));
+ $description = $mdb2->quote($i18n->get('role.client.description'));
$rights = $mdb2->quote($rights_client);
$sql = "insert into tt_roles (team_id, name, description, rank, rights, status) values($team_id, $name, $description, 16, $rights, 1)";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
return false;
- $name = $mdb2->quote($i18n->getKey('role.comanager.label'));
- $description = $mdb2->quote($i18n->getKey('role.comanager.description'));
+ $name = $mdb2->quote($i18n->get('role.comanager.label'));
+ $description = $mdb2->quote($i18n->get('role.comanager.description'));
$rights = $mdb2->quote($rights_comanager);
$sql = "insert into tt_roles (team_id, name, description, rank, rights, status) values($team_id, $name, $description, 68, $rights, 1)";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
return false;
- $name = $mdb2->quote($i18n->getKey('role.manager.label'));
- $description = $mdb2->quote($i18n->getKey('role.manager.description'));
+ $name = $mdb2->quote($i18n->get('role.manager.label'));
+ $description = $mdb2->quote($i18n->get('role.manager.description'));
$rights = $mdb2->quote($rights_manager);
$sql = "insert into tt_roles (team_id, name, description, rank, rights, status) values($team_id, $name, $description, 324, $rights, 1)";
$affected = $mdb2->exec($sql);
return false;
// Inactive roles.
- $name = $mdb2->quote($i18n->getKey('role.supervisor.label'));
- $description = $mdb2->quote($i18n->getKey('role.supervisor.description'));
+ $name = $mdb2->quote($i18n->get('role.supervisor.label'));
+ $description = $mdb2->quote($i18n->get('role.supervisor.description'));
$rights = $mdb2->quote($rights_supervisor);
$sql = "insert into tt_roles (team_id, name, description, rank, rights, status) values($team_id, $name, $description, 12, $rights, 0)";
$affected = $mdb2->exec($sql);
$rights_manager = $rights_comanager.',manage_features,manage_basic_settings,manage_advanced_settings,manage_roles,export_data,manage_subgroups';
// Active roles.
- $name = $mdb2->quote($i18n->getKey('role.user.label'));
- $description = $mdb2->quote($i18n->getKey('role.user.description'));
+ $name = $mdb2->quote($i18n->get('role.user.label'));
+ $description = $mdb2->quote($i18n->get('role.user.description'));
$rights = $mdb2->quote($rights_user);
$sql = "insert into tt_roles (team_id, name, description, rank, rights, status) values($user->team_id, $name, $description, 4, $rights, 1)";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
return false;
- $name = $mdb2->quote($i18n->getKey('role.client.label'));
- $description = $mdb2->quote($i18n->getKey('role.client.description'));
+ $name = $mdb2->quote($i18n->get('role.client.label'));
+ $description = $mdb2->quote($i18n->get('role.client.description'));
$rights = $mdb2->quote($rights_client);
$sql = "insert into tt_roles (team_id, name, description, rank, rights, status) values($user->team_id, $name, $description, 16, $rights, 1)";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
return false;
- $name = $mdb2->quote($i18n->getKey('role.comanager.label'));
- $description = $mdb2->quote($i18n->getKey('role.comanager.description'));
+ $name = $mdb2->quote($i18n->get('role.comanager.label'));
+ $description = $mdb2->quote($i18n->get('role.comanager.description'));
$rights = $mdb2->quote($rights_comanager);
$sql = "insert into tt_roles (team_id, name, description, rank, rights, status) values($user->team_id, $name, $description, 68, $rights, 1)";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
return false;
- $name = $mdb2->quote($i18n->getKey('role.manager.label'));
- $description = $mdb2->quote($i18n->getKey('role.manager.description'));
+ $name = $mdb2->quote($i18n->get('role.manager.label'));
+ $description = $mdb2->quote($i18n->get('role.manager.description'));
$rights = $mdb2->quote($rights_manager);
$sql = "insert into tt_roles (team_id, name, description, rank, rights, status) values($user->team_id, $name, $description, 324, $rights, 1)";
$affected = $mdb2->exec($sql);
return false;
// Inactive roles.
- $name = $mdb2->quote($i18n->getKey('role.supervisor.label'));
- $description = $mdb2->quote($i18n->getKey('role.supervisor.description'));
+ $name = $mdb2->quote($i18n->get('role.supervisor.label'));
+ $description = $mdb2->quote($i18n->get('role.supervisor.description'));
$rights = $mdb2->quote($rights_supervisor);
$sql = "insert into tt_roles (team_id, name, description, rank, rights, status) values($user->team_id, $name, $description, 12, $rights, 0)";
$affected = $mdb2->exec($sql);
while ($val = $res->fetchRow()) {
// Localize top manager role name, as it is not localized in db.
if ($val['rank'] == 512)
- $val['role_name'] = $i18n->getKey('role.top_manager.label');
+ $val['role_name'] = $i18n->get('role.top_manager.label');
$user_list[] = $val;
}
$dataArray = array();
// Construct the first row for a brand new entry.
- $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('form.week.new_entry').':'); // Insert row.
+ $dataArray[] = array('row_id' => null,'label' => $i18n->get('form.week.new_entry').':'); // Insert row.
// Insert empty cells with proper control ids.
for ($i = 0; $i < 7; $i++) {
$control_id = '0_'. $dayHeaders[$i];
}
if ($user->isPluginEnabled('wvns')) {
// Construct the second row for daily comments for a brand new entry.
- $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('label.notes').':'); // Insert row.
+ $dataArray[] = array('row_id' => null,'label' => $i18n->get('label.notes').':'); // Insert row.
// Insert empty cells with proper control ids.
for ($i = 0; $i < 7; $i++) {
$control_id = '1_'. $dayHeaders[$i];
}
// Insert row for comments.
if ($user->isPluginEnabled('wvns')) {
- $dataArray[] = array('row_id' => $row_id.'_notes','label' => $i18n->getKey('label.notes').':');
+ $dataArray[] = array('row_id' => $row_id.'_notes','label' => $i18n->get('label.notes').':');
$pos++;
// Insert empty cells with proper control ids.
for ($i = 0; $i < 7; $i++) {
}
// Construct the first row for a brand new entry.
- $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('form.week.new_entry').':'); // Insert row.
+ $dataArray[] = array('row_id' => null,'label' => $i18n->get('form.week.new_entry').':'); // Insert row.
// Insert empty cells with proper control ids.
for ($i = 0; $i < 7; $i++) {
$control_id = '0_'. $dayHeaders[$i];
$dataArray[0][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null);
}
// Construct the second row for daily comments for a brand new entry.
- $dataArray[] = array('row_id' => null,'label' => $i18n->getKey('label.notes').':'); // Insert row.
+ $dataArray[] = array('row_id' => null,'label' => $i18n->get('label.notes').':'); // Insert row.
// Insert empty cells with proper control ids.
for ($i = 0; $i < 7; $i++) {
$control_id = '1_'. $dayHeaders[$i];
$dataArray[$pos][$dayHeaders[$i]] = array('control_id' => $control_id, 'tt_log_id' => null,'duration' => null);
}
// Insert row for comments.
- $dataArray[] = array('row_id' => $row_id.'_notes','label' => $i18n->getKey('label.notes').':');
+ $dataArray[] = array('row_id' => $row_id.'_notes','label' => $i18n->get('label.notes').':');
$pos++;
// Insert empty cells with proper control ids.
for ($i = 0; $i < 7; $i++) {
// Insert label.
global $i18n;
- $dayTotals['label'] = $i18n->getKey('label.day_total').':';
+ $dayTotals['label'] = $i18n->get('label.day_total').':';
foreach ($dataArray as $row) {
foreach($dayHeaders as $dayHeader) {
if (!$user->future_entries && $fields['browser_today']) {
$objBrowserToday = new DateAndTime(DB_DATEFORMAT, $fields['browser_today']);
if ($objEntryDate->after($objBrowserToday)) {
- $err->add($i18n->getKey('error.future_date'));
+ $err->add($i18n->get('error.future_date'));
return false;
}
}
$res = $mdb2->query($sql);
if (!is_a($res, 'PEAR_Error')) {
if (!$res->numRows()) {
- $err->add($i18n->getKey('error.db')); // This is not expected.
+ $err->add($i18n->get('error.db')); // This is not expected.
return false;
}
$val = $res->fetchRow();
$newEndMinutes = $startMinutes + $newMinutes;
if ($newEndMinutes > 1440) {
// Invalid duration, as new duration puts the record beyond current day.
- $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration'));
+ $err->add($i18n->get('error.field'), $i18n->get('label.duration'));
return false;
}
$start = ttTimeHelper::toAbsDuration($startMinutes);
$finish = ttTimeHelper::toAbsDuration($newEndMinutes);
if (ttTimeHelper::overlaps($user_id, $date, $start, $finish, $tt_log_id)) {
- $err->add($i18n->getKey('error.overlap'));
+ $err->add($i18n->get('error.overlap'));
return false;
}
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.17.67.4142 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.17.67.4143 | 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>
require_once('initialize.php');
-$err->add($i18n->getKey('error.access_denied'));
+$err->add($i18n->get('error.access_denied'));
if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display.
-$smarty->assign('title', $i18n->getKey('label.error'));
+$smarty->assign('title', $i18n->get('label.error'));
$smarty->assign('content_page_name', 'access_denied.tpl');
$smarty->display('index.tpl');
$form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password2','value'=>$cl_password2));
}
$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email));
-$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getKey('button.submit')));
+$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.submit')));
if ($request->isPost()) {
// Create fields array for ttAdmin instance.
$smarty->assign('auth_external', $auth->isPasswordExternal());
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
-$smarty->assign('title', $i18n->getKey('title.options'));
+$smarty->assign('title', $i18n->get('title.options'));
$smarty->assign('content_page_name', 'admin_options.tpl');
$smarty->display('index.tpl');
$form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password2','value'=>$cl_password2));
}
$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_email','value'=>$cl_manager_email));
-$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getKey('button.submit')));
+$form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->get('button.submit')));
if ($request->isPost()) {
/*
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
$smarty->assign('onload', 'onLoad="document.teamForm.team.focus()"');
$smarty->assign('content_page_name', 'admin_team_add.tpl');
-$smarty->assign('title', $i18n->getKey('title.create_team'));
+$smarty->assign('title', $i18n->get('title.create_team'));
$smarty->display('index.tpl');
$form = new Form('teamForm');
$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$team_id));
-$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete')));
-$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getKey('button.cancel')));
+$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('label.delete')));
+$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel')));
if ($request->isPost()) {
if ($request->getParameter('btn_delete')) {
header('Location: admin_teams.php');
exit();
} else
- $err->add($i18n->getKey('error.db'));
+ $err->add($i18n->get('error.db'));
}
if ($request->getParameter('btn_cancel')) {
$smarty->assign('team_to_delete', $team_name);
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
-$smarty->assign('title', $i18n->getKey('title.delete_team'));
+$smarty->assign('title', $i18n->get('title.delete_team'));
$smarty->assign('content_page_name', 'admin_team_delete.tpl');
$smarty->display('index.tpl');
}
$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_email','value'=>$cl_manager_email));
$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$team_id));
-$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save')));
-$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getKey('button.cancel')));
+$form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save')));
+$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->get('button.cancel')));
if ($request->isPost()) {
if ($request->getParameter('btn_save')) {
$smarty->assign('auth_external', $auth->isPasswordExternal());
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
$smarty->assign('onload', 'onLoad="document.teamForm.manager_name.focus()"');
-$smarty->assign('title', $i18n->getKey('title.edit_team'));
+$smarty->assign('title', $i18n->get('title.edit_team'));
$smarty->assign('content_page_name', 'admin_team_edit.tpl');
$smarty->display('index.tpl');
}
$smarty->assign('teams', ttGroupHelper::getTopGroups());
-$smarty->assign('title', $i18n->getKey('title.teams'));
+$smarty->assign('title', $i18n->get('title.teams'));
$smarty->assign('content_page_name', 'admin_teams.tpl');
$smarty->display('index.tpl');
$form = new Form('fieldForm');
$form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>''));
$form->addInput(array('type'=>'combobox','name'=>'type',
- 'data'=>array(CustomFields::TYPE_TEXT=>$i18n->getKey('label.type_text'),
- CustomFields::TYPE_DROPDOWN=>$i18n->getKey('label.type_dropdown'))
+ 'data'=>array(CustomFields::TYPE_TEXT=>$i18n->get('label.type_text'),
+ CustomFields::TYPE_DROPDOWN=>$i18n->get('label.type_dropdown'))
));
$form->addInput(array('type'=>'checkbox','name'=>'required'));
-$form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->getKey('button.add')));
+$form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add')));
if ($request->isPost()) {
// Validate user input.
- if (!ttValidString($cl_field_name)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.thing_name'));
+ if (!ttValidString($cl_field_name)) $err->add($i18n->get('error.field'), $i18n->get('label.thing_name'));
if ($err->no()) {
$res = CustomFields::insertField($cl_field_name, $cl_field_type, $cl_required);
header('Location: cf_custom_fields.php');
exit();
} else
- $err->add($i18n->getKey('error.db'));
+ $err->add($i18n->get('error.db'));
}
} // isPost
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
$smarty->assign('onload', 'onLoad="document.fieldForm.name.focus()"');
-$smarty->assign('title', $i18n->getKey('title.cf_add_custom_field'));
+$smarty->assign('title', $i18n->get('title.cf_add_custom_field'));
$smarty->assign('content_page_name', 'cf_custom_field_add.tpl');
$smarty->display('index.tpl');