$admin->error(lang::p('error_invalid_id'));
}
- $admin->page_confirm('Are you sure you want to delete this action?', "autoaction.php?do=kill&actionid=$action[actionid]");
+ $admin->page_confirm(lang::r('Are you sure you want to delete this action?'), "autoaction.php?do=kill&actionid=$action[actionid]");
}
// ###################################################################
{
if (empty($bugsys->in['name']))
{
- $admin->error('You need to specify a name for this action.');
+ $admin->error(lang::r('You need to specify a name for this action.'));
}
foreach ($bugsys->in['fields'] AS $key => $value)
if (count($deltas['custom']) < 1 AND count($deltas['builtin']) < 1)
{
- $admin->error('You need to specify some fields to change.');
+ $admin->error(lang::r('You need to specify some fields to change.'));
}
if ($_POST['do'] == 'insert')
$action['fields'] = unserialize($action['fieldchanges']);
}
- $admin->page_start((($add) ? 'New Automatic Action' : 'Edit Auto Action'));
+ $admin->page_start(lang::r((($add) ? 'New Automatic Action' : 'Edit Auto Action')));
$admin->form_start('autoaction.php', (($add) ? 'insert' : 'update'));
}
$admin->table_start();
- $admin->table_head((($add) ? 'New Automatic Action' : 'Edit Auto Action'));
+ $admin->table_head(lang::r((($add) ? 'New Automatic Action' : 'Edit Auto Action')));
- $admin->row_input('Name', 'name', $action['name']);
- $admin->row_textarea('Description', 'description', $action['description']);
- $admin->row_textarea('Add Comment', 'comment', $action['comment']);
+ $admin->row_input(lang::r('Name'), 'name', $action['name']);
+ $admin->row_textarea(lang::r('Description'), 'description', $action['description']);
+ $admin->row_textarea(lang::r('Add Comment'), 'comment', $action['comment']);
$admin->row_span('Field Changes', 'thead', 'center');
// -------------------------------------------------------------------
// built-in fields
construct_datastore_select('severity', 'severity', 'severityid', $action['fields']['builtin']['severity'], true, true);
- $admin->row_list('Severity', 'fields[severity]');
+ $admin->row_list(lang::r('Severity'), 'fields[severity]');
construct_datastore_select('priority', 'priority', 'priorityid', $action['fields']['builtin']['priority'], true, true);
- $admin->row_list('Priority', 'fields[priority]');
+ $admin->row_list(lang::r('Priority'), 'fields[priority]');
construct_datastore_select('status', 'status', 'statusid', $action['fields']['builtin']['status'], true, true);
- $admin->row_list('Status', 'fields[status]');
+ $admin->row_list(lang::r('Status'), 'fields[status]');
construct_datastore_select('resolution', 'resolution', 'resolutionid', $action['fields']['builtin']['resolution'], true, true);
- $admin->row_list('Resolution', 'fields[resolution]');
+ $admin->row_list(lang::r('Resolution'), 'fields[resolution]');
$admin->row_span('', 'tcat', 'center');
case 'input_checkbox':
$admin->list_item('', 0, ((!$action['fields']['custom']["$field[fieldid]"]) ? true : false));
- $admin->list_item('Checked', 1, (($action['fields']['custom']["$field[fieldid]"] == 1) ? true : false));
- $admin->list_item('Un-Checked', 2, (($action['fields']['custom']["$field[fieldid]"] == 2) ? true : false));
+ $admin->list_item(lang::r('Checked'), 1, (($action['fields']['custom']["$field[fieldid]"] == 1) ? true : false));
+ $admin->list_item(lang::r('Un-Checked'), 2, (($action['fields']['custom']["$field[fieldid]"] == 2) ? true : false));
$admin->row_list($field['name'], "fields[custom][$field[fieldid]]");
break;
if ($_REQUEST['do'] == 'modify')
{
- $admin->page_start('Automatic Actions');
+ $admin->page_start(lang::r('Automatic Actions'));
$admin->table_start();
- $admin->table_head('Automatic Actions');
+ $admin->table_head(lang::r('Automatic Actions'));
$actions = $db->query("SELECT * FROM " . TABLE_PREFIX . "autoaction ORDER BY name ASC");
while ($action = $db->fetch_array($actions))
{
- $admin->row_text($action['name'] . "\n<div class=\"smallfont\">$action[description]</div>", "<a href=\"autoaction.php?do=edit&actionid=$action[actionid]\">[Edit]</a> <a href=\"autoaction.php?do=delete&actionid=$action[actionid]\">[Delete]</a>");
+ $admin->row_text($action['name'] . "\n<div class=\"smallfont\">$action[description]</div>", "<a href=\"autoaction.php?do=edit&actionid=$action[actionid]\">[" . lang::r('Edit') . "]</a> <a href=\"autoaction.php?do=delete&actionid=$action[actionid]\">[" . lang::r('Delete') . "]</a>");
}
- $admin->row_span('<a href="autoaction.php?do=add">[Add New Action]</a>', 'tfoot', 'center', 3);
+ $admin->row_span('<a href="autoaction.php?do=add">[' . lang::r('Add New Action') . ']</a>', 'tfoot', 'center', 3);
$admin->table_end();
$admin->page_end();
}
$TYPES = array(
- 'input_text' => 'Single-Line Text Box',
- 'input_checkbox' => 'Checkbox Flag',
- 'select_single' => 'Drop-Down Menu',
+ 'input_text' => lang::r('Single-Line Text Box'),
+ 'input_checkbox' => lang::r('Checkbox Flag'),
+ 'select_single' => lang::r('Drop-Down Menu'),
);
// ###################################################################
$db->query("ALTER TABLE " . TABLE_PREFIX . "bugvaluefill DROP field$field[fieldid]");
$db->query("OPTIMIZE TABLE " . TABLE_PREFIX . "bugvaluefill");
- $admin->redirect('field.php?do=modify', 'The field has been successfully removed from the system.');
+ $admin->redirect('field.php?do=modify', lang::r('The field has been successfully removed from the system.'));
}
// ###################################################################
$admin->error(lang::p('error_invalid_id'));
}
- $admin->page_confirm('Are you sure you want to delete this bug field? Doing so will remove everything for this field and it cannot be undone!', "field.php?do=kill&fieldid=$field[fieldid]");
+ $admin->page_confirm(lang::r('Are you sure you want to delete this bug field? Doing so will remove everything for this field and it cannot be undone!'), "field.php?do=kill&fieldid=$field[fieldid]");
}
// ###################################################################
if (empty($bugsys->in['name']))
{
- $admin->error('You must specify a display name.');
+ $admin->error(lang::r('You must specify a display name.'));
}
if (!isset($TYPES["$type"]) AND $add)
{
- $admin->error('Invalid field type specified.');
+ $admin->error(lang::r('Invalid field type specified.'));
}
switch ($type)
array_walk($selects, 'trim');
if (count($selects) < 1)
{
- $admin->error('You need to specify some select values.');
+ $admin->error(lang::r('You need to specify some select values.'));
}
$extradata = "'" . $bugsys->escape(serialize($selects)) . "', " . intval($bugsys->in['usedefault']);
);
}
- $admin->redirect('field.php?do=modify', (($add) ? 'The custom bug field has been added.' : 'The bug field has been updated.'));
+ $admin->redirect('field.php?do=modify', lang::r((($add) ? 'The custom bug field has been added.' : 'The bug field has been updated.')));
}
// ###################################################################
{
$admin->form_hidden_field('step', 1);
$admin->table_start(true, '40%');
- $admin->table_head('Select Type');
+ $admin->table_head(lang::r('Select Type'));
}
else
{
}
// global fields
- $admin->row_span('Global Fields', 'thead', 'center');
- $admin->row_text('Field Type', $TYPES["$type"]);
- $admin->row_input('Display Name', 'name', $field['name']);
- $admin->row_textarea('Description', 'description', $field['description']);
- $admin->row_yesno('Required', 'required', $field['required']);
- $admin->row_yesno('Can Be Searched', 'cansearch', ((isset($field['cansearch'])) ? $field['cansearch'] : true));
+ $admin->row_span(lang::r('Global Fields'), 'thead', 'center');
+ $admin->row_text(lang::r('Field Type'), $TYPES["$type"]);
+ $admin->row_input(lang::r('Display Name'), 'name', $field['name']);
+ $admin->row_textarea(lang::r('Description'), 'description', $field['description']);
+ $admin->row_yesno(lang::r('Required'), 'required', $field['required']);
+ $admin->row_yesno(lang::r('Can Be Searched'), 'cansearch', ((isset($field['cansearch'])) ? $field['cansearch'] : true));
// type-specific fields
- $admin->row_span('Type-Specific Fields', 'thead', 'center');
+ $admin->row_span(lang::r('Type-Specific Fields'), 'thead', 'center');
switch ($type)
{
case 'input_text':
- $admin->row_input('Default Value', 'defaultvalue', $field['defaultvalue']);
- $admin->row_input('Regular Expression Match', 'regexmatch', $field['regexmatch']);
- $admin->row_input('Maximum Length', 'maxlength', $field['maxlength'], 2, 10);
+ $admin->row_input(lang::r('Default Value'), 'defaultvalue', $field['defaultvalue']);
+ $admin->row_input(lang::r('Regular Expression Match'), 'regexmatch', $field['regexmatch']);
+ $admin->row_input(lang::r('Maximum Length'), 'maxlength', $field['maxlength'], 2, 10);
break;
case 'input_checkbox':
- $admin->row_yesno('Checked By Default', 'defaultvalue', $field['defaultvalue']);
+ $admin->row_yesno(lang::r('Checked By Default'), 'defaultvalue', $field['defaultvalue']);
break;
case 'select_single':
- $admin->row_textarea('Selection Values', 'selects', stripslashes(implode("\n", unserialize($field['selects']))));
- $admin->row_yesno('Make the First Option Default', 'usedefault', $field['usedefault']);
+ $admin->row_textarea(lang::r('Selection Values'), 'selects', stripslashes(implode("\n", unserialize($field['selects']))));
+ $admin->row_yesno(lang::r('Make the First Option Default'), 'usedefault', $field['usedefault']);
break;
}
// end table
- $admin->row_submit((($edit) ? '<a href="field.php?do=delete&fieldid=' . $field['fieldid'] . '">[Delete Field]</a>' : ''));
+ $admin->row_submit((($edit) ? '<a href="field.php?do=delete&fieldid=' . $field['fieldid'] . '">[' . lang::r('Delete Field') . ']</a>' : ''));
$admin->table_end();
$admin->form_end();
}
$admin->table_start();
$admin->table_head(lang::p('additional_bug_fields'), 3);
- $admin->table_column_head(array('Display Name/Description', 'Field ID', 'Actions'));
+ $admin->table_column_head(array(lang::r('Display Name/Description'), lang::r('Field ID'), lang::r('Actions')));
$fields = $db->query("SELECT * FROM " . TABLE_PREFIX . "bugfield ORDER BY fieldid ASC");
while ($field = $db->fetch_array($fields))
array(
"$field[name]<div class=\"smallfont\"><em>$field[description]</em></div>" => 'l',
"(fieldid: $field[fieldid])" => 'c',
- "<a href=\"field.php?do=edit&fieldid=$field[fieldid]\">[Edit]</a> <a href=\"field.php?do=delete&fieldid=$field[fieldid]\">[Delete]</a>" => 'c'
+ "<a href=\"field.php?do=edit&fieldid=$field[fieldid]\">[" . lang::r('Edit') . "]</a> <a href=\"field.php?do=delete&fieldid=$field[fieldid]\">[" . lang::r('Delete') . "]</a>" => 'c'
)
);
}
// admin navigation
$globalnav = array(
- 'Admin Locations' => array(
- 'Home' => 'index.php',
- 'Logout' => '../login.php?do=cplogout'
+ lang::r('Admin Locations') => array(
+ lang::r('Home') => 'index.php',
+ lang::r('Logout') => '../login.php?do=cplogout'
),
- 'Options' => array(
- 'BugStrike Settings' => 'setting.php',
+ lang::r('Options') => array(
+ lang::r('BugStrike Settings') => 'setting.php',
//'Manage Languages' => 'language.php'
),
- 'Bug Fields' => array(
- 'Products / Versions / Components' => 'product.php',
- 'Priorities' => 'priority.php',
- 'Resolutions' => 'resolution.php',
- 'Severities' => 'severity.php',
- 'Statuses' => 'status.php',
- 'Custom Bug Fields' => 'field.php',
- 'Automatic Actions' => 'autoaction.php'
+ lang::r('Bug Fields') => array(
+ lang::r('Products / Versions / Components') => 'product.php',
+ lang::r('Priorities') => 'priority.php',
+ lang::r('Resolutions') => 'resolution.php',
+ lang::r('Severities') => 'severity.php',
+ lang::r('Statuses') => 'status.php',
+ lang::r('Custom Bug Fields') => 'field.php',
+ lang::r('Automatic Actions') => 'autoaction.php'
),
- 'User Management' => array(
- 'Usergroups' => 'usergroup.php'
+ lang::r('User Management') => array(
+ lang::r('Usergroups') => 'usergroup.php'
)
);
$admin->page_start('Index');
$admin->table_start(true, '25%');
-$admin->table_head('BugStrike Administration Menu');
+$admin->table_head(lang::r('BugStrike Administration Menu'));
$navdata = '<ul>';
foreach ($globalnav AS $group => $links)
if ($bugsys->in['jumplocation'] == -1)
{
- $admin->error('Please select a location to jump to. Your selection is invalid.');
+ $admin->error(lang::r('Please select a location to jump to. Your selection is invalid.'));
}
header("Location: " . $bugsys->in['jumplocation']);
$admin->error(lang::p('error_invalid_id'));
}
- $admin->page_start("Edit Language");
+ $admin->page_start(lang::r('Edit Language'));
$admin->form_start('language.php', 'update');
$admin->table_start();
- $admin->table_head('Edit Language - ' . $language['title']);
+ $admin->table_head(lang::r('Edit Language - ' . $language['title']));
- $admin->row_input('Title', 'title', $language['title']);
- $admin->row_input('Character Set', 'charset', $language['charset']);
- $admin->list_item('Left-to-Right', 'ltr', (($language['direction'] == 'ltr') ? true : false));
- $admin->list_item('Right-to-Left', 'rtl', (($language['direction'] == 'rtl') ? true : false));
- $admin->row_list('Direction', 'direction');
+ $admin->row_input(lang::r('Title'), 'title', $language['title']);
+ $admin->row_input(lang::r('Character Set'), 'charset', $language['charset']);
+ $admin->list_item(lang::r('Left-to-Right'), 'ltr', (($language['direction'] == 'ltr') ? true : false));
+ $admin->list_item(lang::r('Right-to-Left'), 'rtl', (($language['direction'] == 'rtl') ? true : false));
+ $admin->row_list(lang::r('Direction'), 'direction');
$admin->row_submit();
$admin->table_end();
if ($_REQUEST['do'] == 'modify')
{
- $admin->page_start('Manage Languages');
+ $admin->page_start(lang::r('Manage Languages'));
$admin->table_start();
- $admin->table_head('Manage Languages', 4);
+ $admin->table_head(lang::r('Manage Languages'), 4);
- $admin->table_column_head(array('Title', 'Charset', 'Options', 'Actions'));
+ $admin->table_column_head(array(lang::r('Title'), lang::r('Charset'), lang::r('Options'), lang::r('Actions')));
$languages = $db->query("SELECT * FROM " . TABLE_PREFIX . "language ORDER BY languageid ASC");
while ($language = $db->fetch_array($languages))
$admin->row_multi_item(array(
$language['title'] => 'l',
$language['charset'] => 'c',
- (($language['default']) ? '<strong>DEFAULT LANGUAGE</strong> / ' : '') . (($language['userselect']) ? 'User Selectable' : 'Private Language') => 'c',
- "<a href=\"language.php?do=edit&languageid=$language[languageid]\">[Edit Settings]</a> <a href=\"phrase.php?languageid=$language[languageid]\">[Manage Phrases]</a>" => 'c'
+ (($language['default']) ? '<strong>' . lang::r('DEFAULT LANGUAGE') . '</strong> / ' : '') . (($language['userselect']) ? lang::r('User Selectable') : lang::r('Private Language')) => 'c',
+ "<a href=\"language.php?do=edit&languageid=$language[languageid]\">[" . lang::r('Edit Settings') . "]</a> <a href=\"phrase.php?languageid=$language[languageid]\">[" . lang::r('Manage Phrases') . "]</a>" => 'c'
));
}
- $admin->row_span('<a href="language.php?do=add">[Add New Language]</a>', 'tfoot', 'center', 4);
+ $admin->row_span('<a href="language.php?do=add">[' . lang::r('Add New Language') . ']</a>', 'tfoot', 'center', 4);
$admin->table_end();
$admin->page_end();
if ($edit)
{
- $opt .= '<option value="product.php?do=edit' . $type . '&' . $type_action . '=' . $id . '">Edit ' . $type_display . '</option>';
+ $opt .= '<option value="product.php?do=edit' . $type . '&' . $type_action . '=' . $id . '">' . lang::r('Edit') . ' ' . $type_display . '</option>';
}
if ($delete)
{
- $opt .= '<option value="product.php?do=delete' . $type . '&' . $type_action . '=' . $id . '">Delete ' . $type_display . '</option>';
+ $opt .= '<option value="product.php?do=delete' . $type . '&' . $type_action . '=' . $id . '">' . lang::r('Delete') . ' ' . $type_display . '</option>';
}
if ($addcomponent)
if ($_REQUEST['do'] == 'modify')
{
- $admin->page_start('Settings');
+ $admin->page_start(lang::r('Settings'));
$admin->form_start('setting.php', 'update');
if ($_REQUEST['do'] == 'modify')
{
- $admin->page_start('Severity Manager');
+ $admin->page_start(lang::r('Severity Manager'));
$severities = $db->query("SELECT * FROM " . TABLE_PREFIX . "severity ORDER BY displayorder");
$admin->form_start('severity.php', 'null');
$admin->table_start();
- $admin->table_head('Severity Manager');
+ $admin->table_head(lang::r('Severity Manager'));
while ($severity = $db->fetch_array($severities))
{
if ($_REQUEST['do'] == 'modify')
{
- $admin->page_start('Status Manager');
+ $admin->page_start(lang::r('Status Manager'));
$statuses = $db->query("SELECT * FROM " . TABLE_PREFIX . "status");
$admin->form_start('status.php', 'null');
$admin->table_start();
- $admin->table_head('Status Manager');
+ $admin->table_head(lang::r('Status Manager'));
while ($status = $db->fetch_array($statuses))
{
// custom field permissions
$admin->table_start();
- $admin->table_head('Custom Field Permissions');
+ $admin->table_head(lang::r('Custom Field Permissions'));
if ($edit)
{
while ($field = $db->fetch_array($fields))
{
unset($listitem);
- $admin->list_item('No Permission', 0, $permissions["$field[fieldid]"] == 0);
- $admin->list_item('Can View Field', 1, $permissions["$field[fieldid]"] == 1);
- $admin->list_item('Can View, Edit Field', 2, $permissions["$field[fieldid]"] == 2);
+ $admin->list_item(lang::r('No Permission'), 0, $permissions["$field[fieldid]"] == 0);
+ $admin->list_item(lang::r('Can View Field'), 1, $permissions["$field[fieldid]"] == 1);
+ $admin->list_item(lang::r('Can View, Edit Field'), 2, $permissions["$field[fieldid]"] == 2);
$admin->row_list($field['name'], "custom[$field[fieldid]]");
}
$attachment = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "attachment WHERE attachmentid = " . intval($bugsys->in['attachmentid']));
if (!$attachment)
{
- $message->error('alert: bad attachment');
+ $message->error(lang::r('alert: bad attachment'));
}
}
$bug = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = " . (($attachment['attachmentid']) ? $attachment['bugid'] : intval($bugsys->in['bugid'])));
if (!$bug)
{
- $message->error('alert: bad bug');
+ $message->error(lang::r('alert: bad bug'));
}
// setup logging
$log->allowempty = true;
$log->log();
- $message->redirect('attachment removed', "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(lang::r('attachment removed'), "showreport.php?bugid=$bug[bugid]");
}
// ###################################################################
$message->error_permission();
}
- echo "are you sure you want to delete this attachment? <a href=\"attachment.php?do=kill&attachmentid=$attachment[attachmentid]\">yes</a>";
+ $message->message(lang::r("are you sure you want to delete this attachment? <a href=\"attachment.php?do=kill&attachmentid=$attachment[attachmentid]\">yes</a>"));
}
// ###################################################################
switch ($FILE['error'])
{
case 0: break;
- case 1: $message->error('PHP said the file you uploaded was too big.'); break;
- case 2: $message->error('The file exceeds the allowed upload size.'); break;
- case 3: $message->error('The file was only partially uploaded.'); break;
- case 4: $message->error('The file was not uploaded at all.'); break;
- case 6: $message->error('PHP could not find the /tmp directory.'); break;
+ case 1: $message->error(lang::r('PHP said the file you uploaded was too big.')); break;
+ case 2: $message->error(lang::r('The file exceeds the allowed upload size.')); break;
+ case 3: $message->error(lang::r('The file was only partially uploaded.')); break;
+ case 4: $message->error(lang::r('The file was not uploaded at all.')); break;
+ case 6: $message->error(lang::r('PHP could not find the /tmp directory.')); break;
}
// did it upload?
if (!is_uploaded_file($FILE['tmp_name']))
{
- $message->error('The file you specified did not upload.');
+ $message->error(lang::r('The file you specified did not upload.'));
}
// #*# put some MIME-type validation here
if (!$bugsys->in['description'])
{
- $message->error('you need a file description!');
+ $message->error(lang::r('you need a file description!'));
}
$filedata = $bugsys->escape(file_get_contents($FILE['tmp_name']), true, true);
$log->language = 'log_mark_obsoletes';
$log->arguments = array($attachmentid, $FILE['name'], implode(', ', $obsoletes));
- $log->log($log->diff('obsoleted attachments', '', implode(', ', $obsoletes)));
+ $log->log($log->diff(lang::r('obsoleted attachments'), '', implode(', ', $obsoletes)));
}
// handle comment stuff
// update the last post data
$db->query("UPDATE " . TABLE_PREFIX . "bug SET lastposttime = $time, lastpostby = " . $bugsys->userinfo['userid'] . " WHERE bugid = $bug[bugid]");
- $message->redirect('attachment added', "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(lang::r('attachment added'), "showreport.php?bugid=$bug[bugid]");
}
// ###################################################################
$log->log($log->diff('description', $diff[0]['description'], $diff[1]['description']));
$log->log($log->diff('obsolete', $diff[0]['obsolete'], $diff[1]['obsolete']));
- echo "<a href=\"showreport.php?bugid=$bug[bugid]\">attachment updated</a>";
+ $message->redirect(lang::r('attachment updated'), "showreport.php?bugid=$bug[bugid]");
}
// ###################################################################
if (!$comment)
{
- $message->error('alert: bad comment');
+ $message->error(lang::r('alert: bad comment'));
}
$bug = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = $comment[bugid]");
{
if (!$bugsys->in['comment'])
{
- $message->error('you need to enter some text');
+ $message->error(lang::r('you need to enter some text'));
}
$bugsys->in['comment_parsed'] = $bugsys->in['comment'];
WHERE bugid = $bug[bugid]"
);
- $message->redirect('comment saved', "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(lang::r('comment saved'), "showreport.php?bugid=$bug[bugid]");
}
// ###################################################################
if (!$bugsys->in['summary'])
{
- $message->error('you need to enter a summary');
+ $message->error(lang::r('you need to enter a summary'));
}
if (!$pcv)
{
- $message->error('invalid product/component/version');
+ $message->error(lang::r('invalid product/component/version'));
}
$hist[0] = (array)$db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = $bug[bugid]");
}
- $message->redirect('done with update bug', "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(lang::r('done with update bug'), "showreport.php?bugid=$bug[bugid]");
}
/*=====================================================================*\
if ($db->query_first("SELECT * FROM " . TABLE_PREFIX . "favourite WHERE userid = " . $bugsys->userinfo['userid'] . " AND bugid = " . intval($bugsys->in['bugid'])))
{
$db->query("DELETE FROM " . TABLE_PREFIX . "favourite WHERE userid = " . $bugsys->userinfo['userid'] . " AND bugid = " . intval($bugsys->in['bugid']));
- $message->redirect('Favourite removed', "showreport.php?bugid=" . intval($bugsys->in['bugid']));
+ $message->redirect(lang::r('Favourite removed'), "showreport.php?bugid=" . intval($bugsys->in['bugid']));
}
else
{
$db->query("INSERT INTO " . TABLE_PREFIX . "favourite (userid, bugid) VALUES (" . $bugsys->userinfo['userid'] . ", " . intval($bugsys->in['bugid']) . ")");
- $message->redirect('Favourite added', "showreport.php?bugid=" . intval($bugsys->in['bugid']));
+ $message->redirect(lang::r('Favourite added'), "showreport.php?bugid=" . intval($bugsys->in['bugid']));
}
}
if ($bugsys->userinfo['userid'] AND $_REQUEST['do'] != 'logout' AND $_POST['do'] != 'cplogin' AND $_REQUEST['do'] != 'cplogout')
{
- $message->error('You are already logged in.');
+ $message->error(lang::r('You are already logged in.'));
}
// ###################################################################
$funct->cookie(COOKIE_PREFIX . 'authkey');
}
- $message->error('Invalid email or password.');
+ $message->error(lang::r('Invalid email or password.'));
}
- $message->redirect('You are now logged in :-)', $url);
+ $message->redirect(lang::r('You are now logged in :-)'), $url);
}
// ###################################################################
}
else
{
- $message->error('You need to be logged in!');
+ $message->error(lang::r('You need to be logged in!'));
}
}
if ($_COOKIE[COOKIE_PREFIX . 'adminsession'])
{
$funct->cookie(COOKIE_PREFIX . 'adminsession');
- $message->redirect('logged out', 'admin/');
+ $message->redirect(lang::r('logged out'), 'admin/');
}
else
{
- $message->error('you are not logged in');
+ $message->error(lang::r('you are not logged in'));
}
}
$log->arguments = array($commentid);
$log->log();
- $message->redirect('comment inesrted', "showreport.php?bugid=" . intval($bugsys->in['bugid']));
+ $message->redirect(lang::r('comment inesrted'), "showreport.php?bugid=" . intval($bugsys->in['bugid']));
}
/*=====================================================================*\
// sanity checks
if (!$pcv)
{
- $message->error('there was a problem selecting the product, component, or version');
+ $message->error(lang::r('there was a problem selecting the product, component, or version'));
}
if (!$bugsys->in['summary'])
{
- $message->error('please enter a bug title');
+ $message->error(lang::r('please enter a bug title'));
}
if (!$bugsys->in['comment'])
{
- $message->error('please enter a bug description');
+ $message->error(lang::r('please enter a bug description'));
}
// -------------------------------------------------------------------
$db->query("INSERT INTO " . TABLE_PREFIX . "vote (bugid, votefor, voteagainst) VALUES ($bugid, 0, 0)");
- $message->redirect('bug is done!', "showreport.php?bugid=$bugid");
+ $message->redirect(lang::r('bug is done!'), "showreport.php?bugid=$bugid");
}
// ###################################################################
{
if ($bugsys->userinfo['userid'])
{
- $message->error('Sorry, you are already registered!');
+ $message->error(lang::r('Sorry, you are already registered!'));
}
if (!$bugsys->options['allownewreg'])
{
- $message->error('Sorry, we don\'t allow new registrations!');
+ $message->error(lang::r('Sorry, we don\'t allow new registrations!'));
}
foreach ($bugsys->datastore['language'] AS $value => $temp)
{
if ($bugsys->userinfo['userid'])
{
- $message->error('Sorry, you are already registered!');
+ $message->error(lang::r('Sorry, you are already registered!'));
}
if (!$bugsys->options['allownewreg'])
{
- $message->error('Sorry, we don\'t allow new registrations!');
+ $message->error(lang::r('Sorry, we don\'t allow new registrations!'));
}
if ($bugsys->in['email'] != $bugsys->in['confirmemail'])
$db->query("INSERT INTO " . TABLE_PREFIX . "useractivation (userid, activator, dateline, usergroupid) VALUES ($userid, '$activationid', " . TIMENOW . ", 2)");
$mail->to = $bugsys->in['email'];
- $mail->subject = 'Welcome to ' . $bugsys->options['trackertitle'];
- $mail->body = "Hi " . $bugsys->in['displayname'] . " you need to activate your account: http://devbox/bugtraq/register.php?do=activate&userid=" . $userid . "&activator=" . $activationid;
+ $mail->subject = lang::r('Welcome to ' . $bugsys->options['trackertitle']);
+ $mail->body = lang::r("Hi " . $bugsys->in['displayname'] . " you need to activate your account: http://devbox/bugtraq/register.php?do=activate&userid=" . $userid . "&activator=" . $activationid);
$mail->send();
- $message->message('You now need to activate your account via email.');
+ $message->message(lang::r('You now need to activate your account via email.'));
}
else if ($usergroupid == 4 OR $usergroupid == 2)
{
if ($bugsys->options['sendwelcomemail'])
{
$mail->to = $bugsys->in['email'];
- $mail->subject = 'Welcome to ' . $bugsys->options['trackertitle'];
- $mail->body = "Hi " . $bugsys->in['displayname'] . " and welcome to the " . $bugsys->options['trackertitle'] . " bug tracker! Thanks for registering.";
+ $mail->subject = lang::r('Welcome to ' . $bugsys->options['trackertitle']);
+ $mail->body = lang::r("Hi " . $bugsys->in['displayname'] . " and welcome to the " . $bugsys->options['trackertitle'] . " bug tracker! Thanks for registering.");
$mail->send();
}
if ($usergroupid == 4)
{
- $message->message('Your account is pending approval.');
+ $message->message(lang::r('Your account is pending approval.'));
}
else
{
- $message->message('Registration complete!');
+ $message->message(lang::r('Registration complete!'));
}
}
}
if ($bugsys->options['sendwelcomemail'])
{
$mail->to = $user['email'];
- $mail->subject = 'Welcome to ' . $bugsys->options['trackertitle'];
- $mail->body = "Hi " . $user['displayname'] . " and welcome to the " . $bugsys->options['trackertitle'] . " bug tracker! Thanks for registering.";
+ $mail->subject = lang::r('Welcome to ' . $bugsys->options['trackertitle']);
+ $mail->body = lang::r("Hi " . $user['displayname'] . " and welcome to the " . $bugsys->options['trackertitle'] . " bug tracker! Thanks for registering.");
$mail->send();
}
- $message->message('your account is now activated and you can now login');
+ $message->message(lang::r('your account is now activated and you can now login'));
}
else
{
- $message->error('we could not match your registration string. please make sure you entered the correct url');
+ $message->error(lang::r('we could not match your registration string. please make sure you entered the correct url'));
}
}
// have to search something
if (count($querybuild) < 1)
{
- $message->error('you need to search for something!');
+ $message->error(lang::r('you need to search for something!'));
}
// -------------------------------------------------------------------
if ($numrows < 1)
{
- $message->error('no results found');
+ $message->error(lang::r('no results found'));
}
while ($result = $db->fetch_array($search))
$bug = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = " . intval($bugsys->in['bugid']));
if (!$bug)
{
- $message->error('alert: bad bug');
+ $message->error(lang::r('alert: bad bug'));
}
if ($bug['hidden'] AND !can_perform('canviewhidden'))
// global display items
$favourite = (bool)$db->query_first("SELECT * FROM " . TABLE_PREFIX . "favourite WHERE bugid = $bug[bugid] AND userid = " . $bugsys->userinfo['userid']);
-$favouritetext = (($favourite) ? 'Remove from Favourites' : 'Add to Favourites');
+$favouritetext = (($favourite) ? lang::r('Remove from Favourites') : lang::r('Add to Favourites'));
$bug['userinfo'] = construct_user_display($bug);
$bug['datetime'] = $datef->format($bugsys->options['dateformat'], $bug['dateline']);
$attachment = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "attachment WHERE attachmentid = " . intval($bugsys->in['attachmentid']));
if (!$attachment)
{
- $message->error('alert: bad attachment');
+ $message->error(lang::r('alert: bad attachment'));
}
if (!can_perform('cangetattach') AND !can_perform('caneditattach'))
if ($vote['uservote'])
{
- $message->error('you have already voted on this bug');
+ $message->error(lang::r('you have already voted on this bug'));
}
// handle userids
$db->query("UPDATE " . TABLE_PREFIX . "vote SET userids = '$userids', votefor = $votefor, voteagainst = $voteagainst WHERE bugid = $bug[bugid]");
- $message->redirect('your vote has been added', "showreport.php?bugid=$bug[bugid]");
+ $message->redirect(lang::r('your vote has been added'), "showreport.php?bugid=$bug[bugid]");
}
/*=====================================================================*\