From a9b4e0f92d764733ea222a4bf2d77e2096a7853d Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 18 Aug 2008 12:24:49 -0400 Subject: [PATCH] Change $bugsys->in[] to $input->in[] --- admin/automation.php | 24 ++--- admin/field.php | 46 ++++----- admin/language.php | 28 +++--- admin/permission.php | 22 ++--- admin/priority.php | 16 ++-- admin/product.php | 32 +++---- admin/resolution.php | 16 ++-- admin/setting.php | 2 +- admin/severity.php | 16 ++-- admin/status.php | 20 ++-- admin/user.php | 76 +++++++-------- admin/usergroup.php | 38 ++++---- admin/userhelp.php | 12 +-- attachment.php | 24 ++--- editcomment.php | 14 +-- editreport.php | 42 ++++---- favorite.php | 12 +-- help.php | 4 +- install/convert_database_charset.php | 6 +- install/global.php | 2 +- install/install.php | 24 ++--- install/upgrade.php | 6 +- install/upgrade1.php | 4 +- install/upgrade10.php | 4 +- install/upgrade11.php | 12 +-- install/upgrade12.php | 6 +- install/upgrade13.php | 6 +- install/upgrade14.php | 4 +- install/upgrade15.php | 4 +- install/upgrade16.php | 4 +- install/upgrade17.php | 4 +- install/upgrade2.php | 16 ++-- install/upgrade3.php | 10 +- install/upgrade4.php | 4 +- install/upgrade5.php | 6 +- install/upgrade6.php | 4 +- install/upgrade7.php | 4 +- install/upgrade8.php | 4 +- install/upgrade9.php | 6 +- locale/en_US/emails/activateaccount.xml.tpl | 2 +- login.php | 10 +- newreport.php | 38 ++++---- register.php | 34 +++---- search.php | 100 ++++++++++---------- showreport.php | 2 +- templates/lostpassword.tpl | 2 +- templates/newattach.tpl | 4 +- templates/newreport.tpl | 10 +- templates/register.tpl | 8 +- templates/search_save.tpl | 4 +- templates/showreport.tpl | 2 +- userctrl.php | 80 ++++++++-------- 52 files changed, 440 insertions(+), 440 deletions(-) diff --git a/admin/automation.php b/admin/automation.php index 3f6509b..bfd2fee 100644 --- a/admin/automation.php +++ b/admin/automation.php @@ -45,7 +45,7 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'kill') { $action = new AutomationAPI($bugsys); - $action->set('actionid', $bugsys->in['actionid']); + $action->set('actionid', $input->in['actionid']); $action->set_condition(); $action->delete(); @@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill') if ($_REQUEST['do'] == 'delete') { - $admin->page_confirm(T('Are you sure you want to delete this automation?'), 'automation.php', 'kill', array('actionid' => $bugsys->in['actionid'])); + $admin->page_confirm(T('Are you sure you want to delete this automation?'), 'automation.php', 'kill', array('actionid' => $input->in['actionid'])); } // ################################################################### @@ -65,9 +65,9 @@ if ($_POST['do'] == 'insert' OR $_POST['do'] == 'update') { $deltas = array('builtin' => array(), 'custom' => array()); - if (is_array($bugsys->in['fields'])) + if (is_array($input->in['fields'])) { - foreach ($bugsys->in['fields'] AS $key => $value) + foreach ($input->in['fields'] AS $key => $value) { if (!empty($value) AND $value != -1 AND !is_array($value)) { @@ -76,9 +76,9 @@ if ($_POST['do'] == 'insert' OR $_POST['do'] == 'update') } } - if (is_array($bugsys->in['fields']['custom'])) + if (is_array($input->in['fields']['custom'])) { - foreach ($bugsys->in['fields']['custom'] AS $key => $value) + foreach ($input->in['fields']['custom'] AS $key => $value) { if ($value != '' AND $value != -1) { @@ -88,10 +88,10 @@ if ($_POST['do'] == 'insert' OR $_POST['do'] == 'update') } $action = new AutomationAPI($bugsys); - $action->set('name', $bugsys->in['name']); - $action->set('description', $bugsys->in['description']); + $action->set('name', $input->in['name']); + $action->set('description', $input->in['description']); $action->set('fieldchanges', $deltas); - $action->set('comment', $bugsys->in['comment']); + $action->set('comment', $input->in['comment']); if ($_POST['do'] == 'insert') { @@ -101,7 +101,7 @@ if ($_POST['do'] == 'insert' OR $_POST['do'] == 'update') } else { - $action->set('actionid', $bugsys->in['actionid']); + $action->set('actionid', $input->in['actionid']); $action->set_condition(); $action->update(); @@ -118,11 +118,11 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') if ($edit) { - NavLinks::automationsEdit($bugsys->in['actionid']); + NavLinks::automationsEdit($input->in['actionid']); $navigator->set_focus('link', 'fields-pages-automations', 'fields-pages'); $action = new AutomationAPI($bugsys); - $action->set('actionid', $bugsys->in['actionid']); + $action->set('actionid', $input->in['actionid']); $action->set_condition(); $action->fetch(); $action->objdata['fields'] = unserialize($action->objdata['fieldchanges']); diff --git a/admin/field.php b/admin/field.php index e2ed38f..b07b033 100644 --- a/admin/field.php +++ b/admin/field.php @@ -45,7 +45,7 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'kill') { $field = new FieldAPI($bugsys); - $field->set('fieldid', $bugsys->in['fieldid']); + $field->set('fieldid', $input->in['fieldid']); $field->set_condition(); $field->delete(); @@ -56,7 +56,7 @@ if ($_REQUEST['do'] == 'kill') if ($_REQUEST['do'] == 'delete') { - $admin->page_confirm(T('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', 'kill', array('fieldid' => $bugsys->in['fieldid'])); + $admin->page_confirm(T('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', 'kill', array('fieldid' => $input->in['fieldid'])); } // ################################################################### @@ -66,13 +66,13 @@ if ($_REQUEST['do'] == 'update') $edit = false; $add = true; - $type = $bugsys->in['type']; + $type = $input->in['type']; $field = new FieldAPI($bugsys); - if ($bugsys->in['fieldid']) + if ($input->in['fieldid']) { - $field->set('fieldid', $bugsys->in['fieldid']); + $field->set('fieldid', $input->in['fieldid']); $field->set_condition(); $field->fetch(); @@ -88,25 +88,25 @@ if ($_REQUEST['do'] == 'update') switch ($type) { case 'input_text': - $field->set('defaultvalue', $bugsys->in['defaultvalue']); - $field->set('regexmatch', $bugsys->in['regexmatch']); - $field->set('maxlength', $bugsys->in['maxlength']); + $field->set('defaultvalue', $input->in['defaultvalue']); + $field->set('regexmatch', $input->in['regexmatch']); + $field->set('maxlength', $input->in['maxlength']); break; case 'input_checkbox': - $field->set('defaultvalue', $bugsys->in['defaultvalue']); + $field->set('defaultvalue', $input->in['defaultvalue']); break; case 'select_single': - $field->set('selects', $bugsys->in['selects']); - $field->set('usedefault', $bugsys->in['usedefault']); + $field->set('selects', $input->in['selects']); + $field->set('usedefault', $input->in['usedefault']); break; } - $field->set('name', $bugsys->in['name']); - $field->set('description', $bugsys->in['description']); - $field->set('required', $bugsys->in['required']); - $field->set('cansearch', $bugsys->in['cansearch']); + $field->set('name', $input->in['name']); + $field->set('description', $input->in['description']); + $field->set('required', $input->in['required']); + $field->set('cansearch', $input->in['cansearch']); if ($add) { @@ -123,7 +123,7 @@ if ($_REQUEST['do'] == 'update') } $input->inputClean('custom', TYPE_UINT); - foreach ($bugsys->in['custom'] AS $usergroupid => $mask) + foreach ($input->in['custom'] AS $usergroupid => $mask) { $values[] = $bugsys->clean($usergroupid, TYPE_UINT) . ", $fieldid, " . $mask; } @@ -145,7 +145,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') $field = new FieldAPI($bugsys); $add = (($_REQUEST['do'] == 'add') ? true : false); - $typeselect = (($add AND empty($bugsys->in['step'])) ? true : false); + $typeselect = (($add AND empty($input->in['step'])) ? true : false); $edit = (($add) ? false : true); if ($add) @@ -155,7 +155,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') } else { - NavLinks::fieldsEdit($bugsys->in['fieldid']); + NavLinks::fieldsEdit($input->in['fieldid']); $navigator->set_focus('link', 'fields-pages-fields', 'fields-pages'); } @@ -163,7 +163,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') $admin->form_start('field.php', ($typeselect ? 'add' : 'update')); if ($add AND !$typeselect) { - $admin->form_hidden_field('type', $bugsys->in['type']); + $admin->form_hidden_field('type', $input->in['type']); } if ($typeselect) { @@ -174,12 +174,12 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') else { $admin->table_start(); - $admin->table_head(($add ? T('Add New Bug Field') . ' - ' . FieldAPI::field_types($bugsys->in['type']) : T('Edit Field'))); + $admin->table_head(($add ? T('Add New Bug Field') . ' - ' . FieldAPI::field_types($input->in['type']) : T('Edit Field'))); } if ($edit) { - $field->set('fieldid', $bugsys->in['fieldid']); + $field->set('fieldid', $input->in['fieldid']); $field->set_condition(); $field->fetch(); @@ -188,11 +188,11 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') if (!$typeselect) { - $type = (($add) ? $bugsys->in['type'] : $field->objdata['type']); + $type = (($add) ? $input->in['type'] : $field->objdata['type']); } // show type selector - if (empty($bugsys->in['step']) AND $add) + if (empty($input->in['step']) AND $add) { foreach (FieldAPI::field_types() AS $name => $description) { diff --git a/admin/language.php b/admin/language.php index 7fb56d0..9967cec 100644 --- a/admin/language.php +++ b/admin/language.php @@ -45,7 +45,7 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'kill') { $language = new LanguageAPI($bugsys); - $language->set('languageid', $bugsys->in['languageid']); + $language->set('languageid', $input->in['languageid']); $language->set_condition(); $language->delete(); @@ -64,11 +64,11 @@ if ($_REQUEST['do'] == 'delete') if ($_POST['do'] == 'insert') { $language = new LanguageAPI($bugsys); - $language->set('title', $bugsys->in['title']); - $language->set('charset', $bugsys->in['charset']); - $language->set('direction', $bugsys->in['direction']); - $language->set('userselect', $bugsys->in['userselect']); - $language->set('langcode', $bugsys->in['langcode']); + $language->set('title', $input->in['title']); + $language->set('charset', $input->in['charset']); + $language->set('direction', $input->in['direction']); + $language->set('userselect', $input->in['userselect']); + $language->set('langcode', $input->in['langcode']); $language->insert(); $admin->redirect('language.php?do=modify'); @@ -107,13 +107,13 @@ if ($_REQUEST['do'] == 'add') if ($_POST['do'] == 'update') { $language = new LanguageAPI($bugsys); - $language->set('languageid', $bugsys->in['languageid']); + $language->set('languageid', $input->in['languageid']); $language->set_condition(); - $language->set('title', $bugsys->in['title']); - $language->set('charset', $bugsys->in['charset']); - $language->set('direction', $bugsys->in['direction']); - $language->set('userselect', $bugsys->in['userselect']); - $language->set('langcode', $bugsys->in['langcode']); + $language->set('title', $input->in['title']); + $language->set('charset', $input->in['charset']); + $language->set('direction', $input->in['direction']); + $language->set('userselect', $input->in['userselect']); + $language->set('langcode', $input->in['langcode']); $language->update(); $admin->redirect('language.php?do=modify'); @@ -123,11 +123,11 @@ if ($_POST['do'] == 'update') if ($_REQUEST['do'] == 'edit') { - NavLinks::languagesEdit($bugsys->in['languageid']); + NavLinks::languagesEdit($input->in['languageid']); $navigator->set_focus('link', 'options-languages-edit', 'options-languages'); $languageapi = new LanguageAPI($bugsys); - $languageapi->set('languageid', $bugsys->in['languageid']); + $languageapi->set('languageid', $input->in['languageid']); $languageapi->set_condition(); $languageapi->fetch(); diff --git a/admin/permission.php b/admin/permission.php index 512edb6..aab83df 100755 --- a/admin/permission.php +++ b/admin/permission.php @@ -76,11 +76,11 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'kill') { $input->inputClean('usergroupid', TYPE_UINT); - $db->query("DELETE FROM " . TABLE_PREFIX . "permission WHERE usergroupid = " . $bugsys->in['usergroupid'] . " AND productid = " . $input->inputClean('productid', TYPE_UINT)); + $db->query("DELETE FROM " . TABLE_PREFIX . "permission WHERE usergroupid = " . $input->in['usergroupid'] . " AND productid = " . $input->inputClean('productid', TYPE_UINT)); build_permissions(); - $admin->redirect('permission.php?do=modify&usergroupid=' . $bugsys->in['usergroupid']); + $admin->redirect('permission.php?do=modify&usergroupid=' . $input->in['usergroupid']); } // ################################################################### @@ -98,9 +98,9 @@ if ($_REQUEST['do'] == 'edit') 'usergroupid' => TYPE_UINT, 'productid' => TYPE_UINT )); - $perm = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "permission WHERE usergroupid = " . $bugsys->in['usergroupid'] . " AND productid = " . $bugsys->in['productid']); - $usergroup = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "usergroup WHERE usergroupid = " . $bugsys->in['usergroupid']); - $product = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "product WHERE productid = " . $bugsys->in['productid']); + $perm = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "permission WHERE usergroupid = " . $input->in['usergroupid'] . " AND productid = " . $input->in['productid']); + $usergroup = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "usergroup WHERE usergroupid = " . $input->in['usergroupid']); + $product = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "product WHERE productid = " . $input->in['productid']); if (!$usergroup OR !$product) { @@ -151,7 +151,7 @@ if ($_POST['do'] == 'update') 'usergroupid' => TYPE_UINT, 'productid' => TYPE_UINT )); - foreach ($bugsys->in['perm'] AS $permtitle => $binaryswitch) + foreach ($input->in['perm'] AS $permtitle => $binaryswitch) { $permissionvalue += $bugsys->permissions["$permtitle"] * $binaryswitch; } @@ -160,15 +160,15 @@ if ($_POST['do'] == 'update') REPLACE INTO " . TABLE_PREFIX . "permission (usergroupid, productid, mask) VALUES - (" . $bugsys->in['usergroupid'] . ", - " . $bugsys->in['productid'] . ", + (" . $input->in['usergroupid'] . ", + " . $input->in['productid'] . ", $permissionvalue )" ); build_permissions(); - $admin->redirect('permission.php?do=modify&usergroupid=' . $bugsys->in['usergroupid']); + $admin->redirect('permission.php?do=modify&usergroupid=' . $input->in['usergroupid']); } // ################################################################### @@ -189,9 +189,9 @@ if ($_REQUEST['do'] == 'modify') foreach ($usergroups AS $group) { - $admin->row_text($group['title'], ($bugsys->in['usergroupid'] != $group['usergroupid'] ? "[" . T('Expand') . "]" : ''), 'top', 2, 'alt3'); + $admin->row_text($group['title'], ($input->in['usergroupid'] != $group['usergroupid'] ? "[" . T('Expand') . "]" : ''), 'top', 2, 'alt3'); - if ($bugsys->in['usergroupid'] == $group['usergroupid']) + if ($input->in['usergroupid'] == $group['usergroupid']) { $permissions_fetch = $db->query("SELECT * FROM " . TABLE_PREFIX . "permission WHERE usergroupid = $group[usergroupid]"); foreach ($permissions_fetch as $permission) diff --git a/admin/priority.php b/admin/priority.php index c84cbbb..5883b2f 100755 --- a/admin/priority.php +++ b/admin/priority.php @@ -45,7 +45,7 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'kill') { $priority = new PriorityAPI($bugsys); - $priority->set('priorityid', $bugsys->in['priorityid']); + $priority->set('priorityid', $input->in['priorityid']); $priority->set_condition(); $priority->delete(); @@ -64,8 +64,8 @@ if ($_REQUEST['do'] == 'delete') if ($_POST['do'] == 'insert') { $priority = new PriorityAPI($bugsys); - $priority->set('priority', $bugsys->in['priority']); - $priority->set('displayorder', $bugsys->in['displayorder']); + $priority->set('priority', $input->in['priority']); + $priority->set('displayorder', $input->in['displayorder']); $priority->insert(); $admin->redirect('priority.php?do=modify'); @@ -97,10 +97,10 @@ if ($_REQUEST['do'] == 'add') if ($_POST['do'] == 'update') { $priority = new PriorityAPI($bugsys); - $priority->set('priorityid', $bugsys->in['priorityid']); + $priority->set('priorityid', $input->in['priorityid']); $priority->set_condition(); - $priority->set('priority', $bugsys->in['priority']); - $priority->set('displayorder', $bugsys->in['displayorder']); + $priority->set('priority', $input->in['priority']); + $priority->set('displayorder', $input->in['displayorder']); $priority->update(); $admin->redirect('priority.php?do=modify'); @@ -110,11 +110,11 @@ if ($_POST['do'] == 'update') if ($_REQUEST['do'] == 'edit') { - NavLinks::prioritiesEdit($bugsys->in['priorityid']); + NavLinks::prioritiesEdit($input->in['priorityid']); $navigator->set_focus('link', 'fields-pages-priorities', 'fields-pages'); $priority = new PriorityAPI($bugsys); - $priority->set('priorityid', $bugsys->in['priorityid']); + $priority->set('priorityid', $input->in['priorityid']); $priority->set_condition(); $priority->fetch(); diff --git a/admin/product.php b/admin/product.php index 7efc13e..d9bc75c 100755 --- a/admin/product.php +++ b/admin/product.php @@ -80,8 +80,8 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'killversion') { $input->inputClean('versionid', TYPE_UINT); - $db->query("DELETE FROM " . TABLE_PREFIX . "version WHERE versionid = " . $bugsys->in['versionid']); - $db->query("DELETE FROM " . TABLE_PREFIX . "bug WHERE version = " . $bugsys->in['versionid']); + $db->query("DELETE FROM " . TABLE_PREFIX . "version WHERE versionid = " . $input->in['versionid']); + $db->query("DELETE FROM " . TABLE_PREFIX . "bug WHERE version = " . $input->in['versionid']); build_versions(); @@ -111,9 +111,9 @@ if ($_REQUEST['do'] == 'addversion') NavLinks::productsEdit($input->inputClean('productid', TYPE_UINT)); $navigator->set_focus('link', 'products-edit-version', 'products-edit'); - if ($bugsys->in['productid'] != -1) + if ($input->in['productid'] != -1) { - $product = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "product WHERE productid = " . $bugsys->in['productid']); + $product = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "product WHERE productid = " . $input->in['productid']); if (!is_array($product)) { $admin->error(L_INVALID_ID); @@ -121,13 +121,13 @@ if ($_REQUEST['do'] == 'addversion') } else { - $bugsys->in['productid'] = 0; + $input->in['productid'] = 0; } $admin->page_start(T('Add Version')); $admin->form_start('product.php', 'insertversion'); - $admin->form_hidden_field('productid', $bugsys->in['productid']); + $admin->form_hidden_field('productid', $input->in['productid']); $admin->table_start(); $admin->table_head(T('Add New Version')); $admin->row_input(T('Version Number
This is the version string for this product.
'), 'version'); @@ -144,7 +144,7 @@ if ($_REQUEST['do'] == 'addversion') if ($_REQUEST['do'] == 'updateversion') { - if (empty($bugsys->in['version'])) + if (empty($input->in['version'])) { $admin->error(T('Please fill in a version number.')); } @@ -186,7 +186,7 @@ if ($_REQUEST['do'] == 'editversion') if ($_REQUEST['do'] == 'killproduct') { $input->inputClean('productid', TYPE_UINT); - $allprods = $db->query("SELECT * FROM " . TABLE_PREFIX . "product WHERE productid = " . $bugsys->in['productid'] . " OR parentid = " . $bugsys->in['productid']); + $allprods = $db->query("SELECT * FROM " . TABLE_PREFIX . "product WHERE productid = " . $input->in['productid'] . " OR parentid = " . $input->in['productid']); foreach ($allprods as $prod) { $list[] = $prod['productid']; @@ -212,7 +212,7 @@ if ($_REQUEST['do'] == 'deleteproduct') if ($_REQUEST['do'] == 'insertproduct') { - if (empty($bugsys->in['title'])) + if (empty($input->in['title'])) { $admin->error(T('Please go back and fill in the title field.')); } @@ -236,7 +236,7 @@ if ($_REQUEST['do'] == 'addproduct') { if ($input->inputClean('productid', TYPE_UINT)) { - NavLinks::productsEdit($bugsys->in['productid']); + NavLinks::productsEdit($input->in['productid']); } else { @@ -247,7 +247,7 @@ if ($_REQUEST['do'] == 'addproduct') $admin->page_start(T('Add New Product')); $admin->form_start('product.php', 'insertproduct'); - $admin->form_hidden_field('parentid', $bugsys->in['productid']); + $admin->form_hidden_field('parentid', $input->in['productid']); $admin->table_start(); $admin->table_head(T('Add Product')); $admin->row_input(T('Title'), 'title'); @@ -264,12 +264,12 @@ if ($_REQUEST['do'] == 'addproduct') if ($_REQUEST['do'] == 'updateproduct') { - if (empty($bugsys->in['title'])) + if (empty($input->in['title'])) { $admin->error(T('Please go back and fill in the title field.')); } - if (empty($bugsys->in['productid'])) + if (empty($input->in['productid'])) { $admin->error(L_INVALID_ID); } @@ -289,7 +289,7 @@ if ($_REQUEST['do'] == 'editproduct') $admin->page_start(T('Edit Product')); - $product = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "product WHERE productid = " . $bugsys->in['productid']); + $product = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "product WHERE productid = " . $input->in['productid']); if (!is_array($product)) { $admin->error(L_INVALID_ID); @@ -314,9 +314,9 @@ if ($_REQUEST['do'] == 'editproduct') if ($_POST['do'] == 'displayorder') { $input->inputClean('displayorder', TYPE_UINT); - if (is_array($bugsys->in['displayorder'])) + if (is_array($input->in['displayorder'])) { - foreach ($bugsys->in['displayorder'] AS $namebit => $displayorder) + foreach ($input->in['displayorder'] AS $namebit => $displayorder) { $name = explode('_', $namebit); if ($name[0] == 'product' OR $name[0] == 'version') diff --git a/admin/resolution.php b/admin/resolution.php index 18c827b..0c7fe3f 100755 --- a/admin/resolution.php +++ b/admin/resolution.php @@ -45,7 +45,7 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'kill') { $resolution = new ResolutionAPI($bugsys); - $resolution->set('resolutionid', $bugsys->in['resolutionid']); + $resolution->set('resolutionid', $input->in['resolutionid']); $resolution->set_condition(); $resolution->delete(); @@ -64,8 +64,8 @@ if ($_REQUEST['do'] == 'delete') if ($_POST['do'] == 'insert') { $resolution = new ResolutionAPI($bugsys); - $resolution->set('resolution', $bugsys->in['resolution']); - $resolution->set('displayorder', $bugsys->in['displayorder']); + $resolution->set('resolution', $input->in['resolution']); + $resolution->set('displayorder', $input->in['displayorder']); $resolution->insert(); $admin->redirect('resolution.php?do=modify'); @@ -97,10 +97,10 @@ if ($_REQUEST['do'] == 'add') if ($_POST['do'] == 'update') { $resolution = new ResolutionAPI($bugsys); - $resolution->set('resolutionid', $bugsys->in['resolutionid']); + $resolution->set('resolutionid', $input->in['resolutionid']); $resolution->set_condition(); - $resolution->set('resolution', $bugsys->in['resolution']); - $resolution->set('displayorder', $bugsys->in['displayorder']); + $resolution->set('resolution', $input->in['resolution']); + $resolution->set('displayorder', $input->in['displayorder']); $resolution->update(); $admin->redirect('resolution.php?do=modify'); @@ -110,11 +110,11 @@ if ($_POST['do'] == 'update') if ($_REQUEST['do'] == 'edit') { - NavLinks::resolutionsEdit($bugsys->in['resolutionid']); + NavLinks::resolutionsEdit($input->in['resolutionid']); $navigator->set_focus('link', 'fields-pages-resolutions', 'fields-pages'); $resolution = new ResolutionAPI($bugsys); - $resolution->set('resolutionid', $bugsys->in['resolutionid']); + $resolution->set('resolutionid', $input->in['resolutionid']); $resolution->set_condition(); $resolution->fetch(); diff --git a/admin/setting.php b/admin/setting.php index 72f7b30..a2ed836 100755 --- a/admin/setting.php +++ b/admin/setting.php @@ -44,7 +44,7 @@ if (empty($_REQUEST['do'])) if ($_POST['do'] == 'update') { $updates = array(); - foreach ($bugsys->in['setting'] AS $varname => $value) + foreach ($input->in['setting'] AS $varname => $value) { if (is_array($value)) { diff --git a/admin/severity.php b/admin/severity.php index 50876ef..290b078 100755 --- a/admin/severity.php +++ b/admin/severity.php @@ -45,7 +45,7 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'kill') { $severity = new SeverityAPI($bugsys); - $severity->set('severityid', $bugsys->in['severityid']); + $severity->set('severityid', $input->in['severityid']); $severity->set_condition(); $severity->delete(); @@ -64,8 +64,8 @@ if ($_REQUEST['do'] == 'delete') if ($_POST['do'] == 'insert') { $severity = new SeverityAPI($bugsys); - $severity->set('severity', $bugsys->in['severity']); - $severity->set('displayorder', $bugsys->in['displayorder']); + $severity->set('severity', $input->in['severity']); + $severity->set('displayorder', $input->in['displayorder']); $severity->insert(); $admin->redirect('severity.php?do=modify'); @@ -97,10 +97,10 @@ if ($_REQUEST['do'] == 'add') if ($_POST['do'] == 'update') { $severity = new SeverityAPI($bugsys); - $severity->set('severityid', $bugsys->in['severityid']); + $severity->set('severityid', $input->in['severityid']); $severity->set_condition(); - $severity->set('severity', $bugsys->in['severity']); - $severity->set('displayorder', $bugsys->in['displayorder']); + $severity->set('severity', $input->in['severity']); + $severity->set('displayorder', $input->in['displayorder']); $severity->update(); $admin->redirect('severity.php?do=modify'); @@ -110,11 +110,11 @@ if ($_POST['do'] == 'update') if ($_REQUEST['do'] == 'edit') { - NavLinks::severitiesEdit($bugsys->in['severityid']); + NavLinks::severitiesEdit($input->in['severityid']); $navigator->set_focus('link', 'fields-pages-severities', 'fields-pages'); $severity = new SeverityAPI($bugsys); - $severity->set('severityid', $bugsys->in['severityid']); + $severity->set('severityid', $input->in['severityid']); $severity->set_condition(); $severity->fetch(); diff --git a/admin/status.php b/admin/status.php index 26b04da..5a81e07 100755 --- a/admin/status.php +++ b/admin/status.php @@ -45,7 +45,7 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'kill') { $status = new StatusAPI($bugsys); - $status->set('statusid', $bugsys->in['statusid']); + $status->set('statusid', $input->in['statusid']); $status->set_condition(); $status->delete(); @@ -64,9 +64,9 @@ if ($_REQUEST['do'] == 'delete') if ($_POST['do'] == 'insert') { $status = new StatusAPI($bugsys); - $status->set('status', $bugsys->in['status']); - $status->set('color', $bugsys->in['color']); - $status->set('displayorder', $bugsys->in['displayorder']); + $status->set('status', $input->in['status']); + $status->set('color', $input->in['color']); + $status->set('displayorder', $input->in['displayorder']); $status->insert(); $admin->redirect('status.php?do=modify'); @@ -99,11 +99,11 @@ if ($_REQUEST['do'] == 'add') if ($_POST['do'] == 'update') { $status = new StatusAPI($bugsys); - $status->set('statusid', $bugsys->in['statusid']); + $status->set('statusid', $input->in['statusid']); $status->set_condition(); - $status->set('status', $bugsys->in['status']); - $status->set('color', $bugsys->in['color']); - $status->set('displayorder', $bugsys->in['displayorder']); + $status->set('status', $input->in['status']); + $status->set('color', $input->in['color']); + $status->set('displayorder', $input->in['displayorder']); $status->update(); $admin->redirect('status.php?do=modify'); @@ -113,11 +113,11 @@ if ($_POST['do'] == 'update') if ($_REQUEST['do'] == 'edit') { - NavLinks::statusesEdit($bugsys->in['statusid']); + NavLinks::statusesEdit($input->in['statusid']); $navigator->set_focus('link', 'fields-pages-statuses', 'fields-pages'); $status = new StatusAPI($bugsys); - $status->set('statusid', $bugsys->in['statusid']); + $status->set('statusid', $input->in['statusid']); $status->set_condition(); $status->fetch(); diff --git a/admin/user.php b/admin/user.php index 26ba541..5e82fec 100644 --- a/admin/user.php +++ b/admin/user.php @@ -62,7 +62,7 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'kill') { $user = new UserAPI($bugsys); - $user->set('userid', $bugsys->in['userid']); + $user->set('userid', $input->in['userid']); $user->set_condition(); $user->delete(); @@ -81,28 +81,28 @@ if ($_REQUEST['do'] == 'delete') if ($_POST['do'] == 'insert') { $user = new UserAPI($bugsys); - $user->set('displayname', $bugsys->in['displayname']); - $user->set('email', $bugsys->in['email']); - $user->set('showemail', $bugsys->in['showemail']); - $user->set('showcolors', $bugsys->in['showcolors']); - $user->set('usergroupid', $bugsys->in['usergroupid']); - $user->set('groupids', $bugsys->in['groupids']); - $user->set('languageid', $bugsys->in['languageid']); - $user->set('timezone', $bugsys->in['timezone']); - $user->set('usedst', $bugsys->in['usedst']); - $user->set('password', $bugsys->in['password']); - $user->set('hidestatuses', $bugsys->in['hidestatuses']); - $user->set('defaultsortkey', $bugsys->in['defaultsortkey']); - $user->set('defaultsortas', $bugsys->in['defaultsortas']); + $user->set('displayname', $input->in['displayname']); + $user->set('email', $input->in['email']); + $user->set('showemail', $input->in['showemail']); + $user->set('showcolors', $input->in['showcolors']); + $user->set('usergroupid', $input->in['usergroupid']); + $user->set('groupids', $input->in['groupids']); + $user->set('languageid', $input->in['languageid']); + $user->set('timezone', $input->in['timezone']); + $user->set('usedst', $input->in['usedst']); + $user->set('password', $input->in['password']); + $user->set('hidestatuses', $input->in['hidestatuses']); + $user->set('defaultsortkey', $input->in['defaultsortkey']); + $user->set('defaultsortas', $input->in['defaultsortas']); $user->insert(); // post_insert will set the email options... so we now have to dump them $db->query("DELETE FROM " . TABLE_PREFIX . "useremail WHERE userid = " . $user->insertid); $input->inputClean('emailopts', TYPE_INT); - if (is_array($bugsys->in['emailopts'])) + if (is_array($input->in['emailopts'])) { - foreach ($bugsys->in['emailopts'] AS $relation => $bitarr) + foreach ($input->in['emailopts'] AS $relation => $bitarr) { $bitmask = 0; foreach ($bitarr AS $option => $yes) @@ -121,28 +121,28 @@ if ($_POST['do'] == 'insert') if ($_POST['do'] == 'update') { $user = new UserAPI($bugsys); - $user->set('userid', $bugsys->in['userid']); + $user->set('userid', $input->in['userid']); $user->set_condition(); - $user->set('displayname', $bugsys->in['displayname']); - $user->set('email', $bugsys->in['email']); - $user->set('showemail', $bugsys->in['showemail']); - $user->set('showcolors', $bugsys->in['showcolors']); - $user->set('usergroupid', $bugsys->in['usergroupid']); - $user->set('groupids', $bugsys->in['groupids']); - $user->set('languageid', $bugsys->in['languageid']); - $user->set('timezone', $bugsys->in['timezone']); - $user->set('usedst', $bugsys->in['usedst']); - $user->set('password', $bugsys->in['password']); - $user->set('hidestatuses', $bugsys->in['hidestatuses']); - $user->set('defaultsortkey', $bugsys->in['defaultsortkey']); - $user->set('defaultsortas', $bugsys->in['defaultsortas']); + $user->set('displayname', $input->in['displayname']); + $user->set('email', $input->in['email']); + $user->set('showemail', $input->in['showemail']); + $user->set('showcolors', $input->in['showcolors']); + $user->set('usergroupid', $input->in['usergroupid']); + $user->set('groupids', $input->in['groupids']); + $user->set('languageid', $input->in['languageid']); + $user->set('timezone', $input->in['timezone']); + $user->set('usedst', $input->in['usedst']); + $user->set('password', $input->in['password']); + $user->set('hidestatuses', $input->in['hidestatuses']); + $user->set('defaultsortkey', $input->in['defaultsortkey']); + $user->set('defaultsortas', $input->in['defaultsortas']); $user->update(); $db->query("DELETE FROM " . TABLE_PREFIX . "useremail WHERE userid = " . $user->values['userid']); $input->inputClean('emailopts', TYPE_INT); - if (is_array($bugsys->in['emailopts'])) + if (is_array($input->in['emailopts'])) { - foreach ($bugsys->in['emailopts'] AS $relation => $bitarr) + foreach ($input->in['emailopts'] AS $relation => $bitarr) { $bitmask = 0; foreach ($bitarr AS $option => $yes) @@ -165,11 +165,11 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add') if ($edit) { - NavLinks::usersEdit($bugsys->in['userid']); + NavLinks::usersEdit($input->in['userid']); $navigator->set_focus('link', 'users-pages-users', 'users-pages'); $user = new UserAPI($bugsys); - $user->set('userid', $bugsys->in['userid']); + $user->set('userid', $input->in['userid']); $user->set_condition(); $user->fetch(); } @@ -328,12 +328,12 @@ if ($_REQUEST['do'] == 'search') NavLinks::usersAdd(); $navigator->set_focus('link', 'users-pages-users', 'users-pages'); - if (is_numeric($bugsys->in['userdata'])) + if (is_numeric($input->in['userdata'])) { $input->inputClean('userdata', TYPE_UINT); - if ($db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = " . $bugsys->in['userdata'])) + if ($db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = " . $input->in['userdata'])) { - header('Location: user.php?do=edit&userid=' . $bugsys->in['userdata']); + header('Location: user.php?do=edit&userid=' . $input->in['userdata']); } else { @@ -342,7 +342,7 @@ if ($_REQUEST['do'] == 'search') } else { - $bugsys->in['userdata'] = str_replace('%', '\%', $bugsys->in['userdata']); + $input->in['userdata'] = str_replace('%', '\%', $input->in['userdata']); $results = $db->query("SELECT * FROM " . TABLE_PREFIX . "user WHERE email LIKE '%" . $bugsys->input_escape('userdata') . "%' OR displayname LIKE '%" . $bugsys->input_escape('userdata') . "%'"); if ($db->num_rows($results) < 1) diff --git a/admin/usergroup.php b/admin/usergroup.php index 9ad4975..6818c92 100755 --- a/admin/usergroup.php +++ b/admin/usergroup.php @@ -88,7 +88,7 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'kill') { $usergroup = new UsergroupAPI($bugsys); - $usergroup->set('usergroupid', $bugsys->in['usergroupid']); + $usergroup->set('usergroupid', $input->in['usergroupid']); $usergroup->set_condition(); $usergroup->delete(); @@ -99,12 +99,12 @@ if ($_REQUEST['do'] == 'kill') if ($_REQUEST['do'] == 'delete') { - if ($bugsys->in['usergroupid'] < 7) + if ($input->in['usergroupid'] < 7) { $admin->error(T('You can\'t delete a default usergroup.')); } - $admin->page_confirm(T('Are you sure you want to delete this usergroup? All users in this group will be set back to the default registered usergroup (id: 2).'), 'usergroup.php', 'kill', array('usergroupid' => $bugsys->in['usergroupid'])); + $admin->page_confirm(T('Are you sure you want to delete this usergroup? All users in this group will be set back to the default registered usergroup (id: 2).'), 'usergroup.php', 'kill', array('usergroupid' => $input->in['usergroupid'])); } // ################################################################### @@ -117,7 +117,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == if ($edit) { - NavLinks::usergroupsEdit($bugsys->in['usergroupid']); + NavLinks::usergroupsEdit($input->in['usergroupid']); $navigator->set_focus('link', 'users-pages-usergroups', 'users-pages'); } else @@ -133,7 +133,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == if ($edit OR $clone) { $usergroup = new UsergroupAPI($bugsys); - $usergroup->set('usergroupid', $bugsys->in['usergroupid']); + $usergroup->set('usergroupid', $input->in['usergroupid']); $usergroup->set_condition(); $usergroup->fetch(); @@ -214,21 +214,21 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == if ($_POST['do'] == 'insert') { $input->inputClean('perm', TYPE_UINT); - foreach ($bugsys->in['perm'] AS $permtitle => $binaryswitch) + foreach ($input->in['perm'] AS $permtitle => $binaryswitch) { $permissionvalue += $bugsys->permissions["$permtitle"] * $binaryswitch; } $usergroup = new UsergroupAPI($bugsys); - $usergroup->set('title', $bugsys->in['title']); - $usergroup->set('displaytitle', $bugsys->in['displaytitle']); + $usergroup->set('title', $input->in['title']); + $usergroup->set('displaytitle', $input->in['displaytitle']); $usergroup->set('permissions', $permissionvalue); $usergroup->insert(); $input->inputClean('custom', TYPE_UINT); - if (is_array($bugsys->in['custom'])) + if (is_array($input->in['custom'])) { - foreach ($bugsys->in['custom'] AS $fieldid => $mask) + foreach ($input->in['custom'] AS $fieldid => $mask) { $values[] = $usergroup->insertid . ", " . $bugsys->clean($fieldid, TYPE_UINT) . ", " . $mask; } @@ -248,7 +248,7 @@ if ($_POST['do'] == 'insert') // copy product permissions from cloning if ($input->inputClean('cloneid', TYPE_UINT)) { - $prodperms = $db->query("SELECT * FROM " . TABLE_PREFIX . "permission WHERE usergroupid = " . $bugsys->in['cloneid']); + $prodperms = $db->query("SELECT * FROM " . TABLE_PREFIX . "permission WHERE usergroupid = " . $input->in['cloneid']); foreach ($prodperms as $prod) { $db->query("INSERT INTO " . TABLE_PREFIX . "permission (usergroupid, productid, mask) VALUES (" . $usergroup->insertid . ", $prod[productid], $prod[mask])"); @@ -269,23 +269,23 @@ if ($_POST['do'] == 'update') 'custom' => TYPE_UINT )); $input->inputClean('perm', TYPE_UINT); - foreach ($bugsys->in['perm'] AS $permtitle => $binaryswitch) + foreach ($input->in['perm'] AS $permtitle => $binaryswitch) { $permissionvalue += $bugsys->permissions["$permtitle"] * $binaryswitch; } $usergroup = new UsergroupAPI($bugsys); - $usergroup->set('usergroupid', $bugsys->in['usergroupid']); + $usergroup->set('usergroupid', $input->in['usergroupid']); $usergroup->set_condition(); - $usergroup->set('title', $bugsys->in['title']); - $usergroup->set('displaytitle', $bugsys->in['displaytitle']); + $usergroup->set('title', $input->in['title']); + $usergroup->set('displaytitle', $input->in['displaytitle']); $usergroup->set('permissions', $permissionvalue); $usergroup->update(); $input->inputClean('custom', TYPE_UINT); - if (is_array($bugsys->in['custom'])) + if (is_array($input->in['custom'])) { - foreach ($bugsys->in['custom'] AS $fieldid => $mask) + foreach ($input->in['custom'] AS $fieldid => $mask) { $values[] = $usergroup->values['usergroupid'] . ", " . $bugsys->clean($fieldid, TYPE_UINT) . ", " . $mask; } @@ -312,9 +312,9 @@ if ($_POST['do'] == 'doapprove') $input->inputClean('approve', TYPE_UINT); $idlist = array(); - if (is_array($bugsys->in['approve'])) + if (is_array($input->in['approve'])) { - foreach ($bugsys->in['approve'] AS $id => $yesno) + foreach ($input->in['approve'] AS $id => $yesno) { if ($yesno > 0) { diff --git a/admin/userhelp.php b/admin/userhelp.php index b7c5b81..4b227ce 100755 --- a/admin/userhelp.php +++ b/admin/userhelp.php @@ -47,7 +47,7 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'kill') { $help = new UserHelpAPI($bugsys); - $help->set('keystring', $bugsys->in['keystring']); + $help->set('keystring', $input->in['keystring']); $help->delete(); build_user_help(); @@ -59,7 +59,7 @@ if ($_REQUEST['do'] == 'kill') if ($_REQUEST['do'] == 'delete') { - $admin->page_confirm(T('Are you sure you want to delete help text?'), 'userhelp.php', 'kill', array('keystring' => $bugsys->in['keystring'])); + $admin->page_confirm(T('Are you sure you want to delete help text?'), 'userhelp.php', 'kill', array('keystring' => $input->in['keystring'])); } // ################################################################### @@ -67,9 +67,9 @@ if ($_REQUEST['do'] == 'delete') if ($_POST['do'] == 'insert') { $help = new UserHelpAPI($bugsys); - $help->set('keystring', $bugsys->in['keystring']); - $help->set('title', $bugsys->in['title']); - $help->set('body', $bugsys->in['body']); + $help->set('keystring', $input->in['keystring']); + $help->set('title', $input->in['title']); + $help->set('body', $input->in['body']); $help->insert(); $admin->redirect('userhelp.php?do=modify'); @@ -105,7 +105,7 @@ if ($_REQUEST['do'] == 'add') if ($_POST['do'] == 'update') { - foreach ($bugsys->in['help'] AS $keystring => $fields) + foreach ($input->in['help'] AS $keystring => $fields) { $help = new UserHelpAPI($bugsys); $help->norunners = array('post_update'); diff --git a/attachment.php b/attachment.php index f2f38fb..97c2bcc 100755 --- a/attachment.php +++ b/attachment.php @@ -36,7 +36,7 @@ require_once('./includes/api_comment.php'); APIError(array(new API_Error_Handler($message), 'user_cumulative')); -if (isset($bugsys->in['attachmentid'])) +if (isset($input->in['attachmentid'])) { $attachment = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "attachment WHERE attachmentid = " . $input->inputClean('attachmentid', TYPE_UINT)); if (!$attachment) @@ -66,7 +66,7 @@ $notif->set_bug_data($bug); if ($_POST['do'] == 'insert') { $attachapi = new AttachmentAPI($bugsys); - $attachapi->set('bugid', $bugsys->in['bugid']); + $attachapi->set('bugid', $input->in['bugid']); if (!can_perform('canputattach', $bug['product'])) { @@ -108,7 +108,7 @@ if ($_POST['do'] == 'insert') $attachapi->set('filename', $FILE['name']); $attachapi->set('mimetype', $FILE['type']); $attachapi->set('filesize', $FILE['size']); - $attachapi->set('description', $bugsys->in['description']); + $attachapi->set('description', $input->in['description']); $attachapi->set('userid', bugdar::$userinfo['userid']); // insert an attachment @@ -137,12 +137,12 @@ if ($_POST['do'] == 'insert') } // handle comment stuff - if (can_perform('canpostcomments', $bug['product']) AND trim($bugsys->in['comment'])) + if (can_perform('canpostcomments', $bug['product']) AND trim($input->in['comment'])) { $comment = new CommentAPI($bugsys); - $comment->set('bugid', $bugsys->in['bugid']); + $comment->set('bugid', $input->in['bugid']); $comment->set('userid', bugdar::$userinfo['userid']); - $comment->set('comment', $bugsys->in['comment']); + $comment->set('comment', $input->in['comment']); $comment->set('dateline', $attachapi->values['dateline']); $comment->insert(); @@ -182,7 +182,7 @@ if ($_REQUEST['do'] == 'add') foreach ($obsoletes_fetch as $obsolete) { $show['obsoletes'] = true; - $obsoletes .= "
in['obsoletes']) AND in_array($obsolete['attachmentid'], $bugsys->in['obsoletes']) ? ' checked="checked"' : '') . " /> $obsolete[filename]" . ($obsolete['description'] ? " [$obsolete[description]]" : '') . "
\n"; + $obsoletes .= "
in['obsoletes']) AND in_array($obsolete['attachmentid'], $input->in['obsoletes']) ? ' checked="checked"' : '') . " /> $obsolete[filename]" . ($obsolete['description'] ? " [$obsolete[description]]" : '') . "
\n"; } eval('$template->flush("' . $template->fetch('newattach') . '");'); @@ -198,11 +198,11 @@ if ($_POST['do'] == 'update') } $attachapi = new AttachmentAPI($bugsys); - $attachapi->set('attachmentid', $bugsys->in['attachmentid']); + $attachapi->set('attachmentid', $input->in['attachmentid']); $attachapi->dorelations = array(); $attachapi->set_condition(); - if ($bugsys->in['__delete__'] != '') + if ($input->in['__delete__'] != '') { if (!(can_perform('caneditattach', $bug['product']) AND can_perform('candeletedata', $bug['productid']))) { @@ -217,14 +217,14 @@ if ($_POST['do'] == 'update') { $log = new Logging; $log->set_bugid($bug['bugid']); - $log->set_attachmentid($bugsys->in['attachmentid']); + $log->set_attachmentid($input->in['attachmentid']); $attachapi->fetch(); $log->add_data(true, $attachapi->objdata, array('attachment'), true, 'attachment'); - $attachapi->set('description', $bugsys->in['description']); - $attachapi->set('obsolete', $bugsys->in['obsolete']); + $attachapi->set('description', $input->in['description']); + $attachapi->set('obsolete', $input->in['obsolete']); $attachapi->update(); $log->add_data(false, $attachapi->values, array('attachment'), true, 'attachment'); diff --git a/editcomment.php b/editcomment.php index 4ebaa25..8480833 100644 --- a/editcomment.php +++ b/editcomment.php @@ -34,7 +34,7 @@ require_once('./includes/class_api_error.php'); APIError(array(new API_Error_Handler($message), 'user_cumulative')); $commentapi = new CommentAPI($bugsys); -$commentapi->set('commentid', $bugsys->in['commentid']); +$commentapi->set('commentid', $input->in['commentid']); $commentapi->set_condition(); $commentapi->fetch(); @@ -128,11 +128,11 @@ if ($_POST['do'] == 'update') $message->errorPermission(); } - $commentapi->set('comment', $bugsys->in['comment']); - $commentapi->set('parselinks', $bugsys->in['parselinks']); - $commentapi->set('hidden', $bugsys->in['hidden']); + $commentapi->set('comment', $input->in['comment']); + $commentapi->set('parselinks', $input->in['parselinks']); + $commentapi->set('hidden', $input->in['hidden']); - if ($bugsys->in['commentid'] == $bug['initialreport'] AND $bugsys->in['hidden']) + if ($input->in['commentid'] == $bug['initialreport'] AND $input->in['hidden']) { $message->addError(T('You cannot hide the first comment/initial report of a bug. Instead, hide the entire bug.')); } @@ -174,8 +174,8 @@ if ($_POST['do'] == 'update') { $show['errors'] = true; $_REQUEST['do'] = 'edit'; - $comment['comment'] = $bugsys->in['comment']; - $comment['hidden'] = $bugsys->in['hidden']; + $comment['comment'] = $input->in['comment']; + $comment['hidden'] = $input->in['hidden']; } } diff --git a/editreport.php b/editreport.php index 432723b..4f9b38f 100644 --- a/editreport.php +++ b/editreport.php @@ -58,7 +58,7 @@ $log->set_bugid($bug['bugid']); $notif = new NotificationCenter; $bugapi = new BugAPI($bugsys); -$bugapi->set('bugid', $bugsys->in['bugid']); +$bugapi->set('bugid', $input->in['bugid']); $bugapi->set_condition(); $bugapi->dorelations = array(); $bugapi->fetch(); @@ -102,7 +102,7 @@ if ($_POST['do'] == 'update') // ------------------------------------------------------------------- // handle automations - if ($bugsys->in['automation']) + if ($input->in['automation']) { $automation = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "automation WHERE actionid = " . $input->inputClean('automation', TYPE_UINT)); if ($automation) @@ -113,7 +113,7 @@ if ($_POST['do'] == 'update') { foreach ($automation['fields']['builtin'] AS $field => $value) { - $bugsys->in["$field"] = $value; + $input->in["$field"] = $value; } } @@ -121,7 +121,7 @@ if ($_POST['do'] == 'update') { foreach ($automation['fields']['custom'] AS $field => $value) { - $bugsys->in["custom$field"] = $value; + $input->in["custom$field"] = $value; } } } @@ -129,26 +129,26 @@ if ($_POST['do'] == 'update') // ------------------------------------------------------------------- // process comment stuff - if ($bugsys->in['comment'] OR $automation['comment']) + if ($input->in['comment'] OR $automation['comment']) { - if (!empty($bugsys->in['comment']) AND $automation['comment']) + if (!empty($input->in['comment']) AND $automation['comment']) { - $commenttext = $bugsys->in['comment'] . "\n\n" . T('--------------- AUTOMATIC RESPONSE ---------------') . "\n" . $automation['comment']; + $commenttext = $input->in['comment'] . "\n\n" . T('--------------- AUTOMATIC RESPONSE ---------------') . "\n" . $automation['comment']; } - else if (empty($bugsys->in['comment']) AND $automation['comment']) + else if (empty($input->in['comment']) AND $automation['comment']) { $commenttext = $automation['comment']; } else { - $commenttext = $bugsys->in['comment']; + $commenttext = $input->in['comment']; } $comment = new CommentAPI($bugsys); - $comment->set('bugid', $bugsys->in['bugid']); + $comment->set('bugid', $input->in['bugid']); $comment->set('userid', bugdar::$userinfo['userid']); $comment->set('comment', $commenttext); - $comment->set('parselinks', $bugsys->in['parselinks']); + $comment->set('parselinks', $input->in['parselinks']); $comment->insert(); // we redefine the bug data later, but it needs to be here in order to generate the user list @@ -172,18 +172,18 @@ if ($_POST['do'] == 'update') // ------------------------------------------------------------------- // do update stuff - $dependencies = preg_split('#([^0-9].*?)#', $bugsys->in['dependency'], -1, PREG_SPLIT_NO_EMPTY); + $dependencies = preg_split('#([^0-9].*?)#', $input->in['dependency'], -1, PREG_SPLIT_NO_EMPTY); $dependencies = ((sizeof($dependencies) < 1) ? '' : implode(', ', $dependencies)); if ((can_perform('caneditown', $bug['product']) AND bugdar::$userinfo['userid'] == $bug['userid']) OR (can_perform('caneditother', $bug['product']) AND bugdar::$userinfo['userid'] != $bug['userid'])) { - $bugapi->set('summary', $bugsys->in['summary']); - $bugapi->set('severity', $bugsys->in['severity']); - $bugapi->set('duplicateof', $bugsys->in['duplicateof']); + $bugapi->set('summary', $input->in['summary']); + $bugapi->set('severity', $input->in['severity']); + $bugapi->set('duplicateof', $input->in['duplicateof']); $bugapi->set('dependency', $dependencies); - $bugapi->set('hidden', $bugsys->in['hidden']); + $bugapi->set('hidden', $input->in['hidden']); - $product = explode(',', $bugsys->in['product']); + $product = explode(',', $input->in['product']); $bugapi->set('product', $product[0]); $bugapi->set('component', $product[1]); $bugapi->set('version', $product[2]); @@ -191,13 +191,13 @@ if ($_POST['do'] == 'update') if (can_perform('canchangestatus', $bug['product'])) { - $bugapi->set('priority', $bugsys->in['priority']); - $bugapi->set('status', $bugsys->in['status']); - $bugapi->set('resolution', $bugsys->in['resolution']); + $bugapi->set('priority', $input->in['priority']); + $bugapi->set('status', $input->in['status']); + $bugapi->set('resolution', $input->in['resolution']); } if (can_perform('canassign', $bug['product'])) { - $bugapi->set('assignedto', $bugsys->in['assignedto']); + $bugapi->set('assignedto', $input->in['assignedto']); } process_custom_fields($bugapi, $message, false); diff --git a/favorite.php b/favorite.php index a4943d4..aed29dd 100644 --- a/favorite.php +++ b/favorite.php @@ -42,7 +42,7 @@ require_once('./includes/class_sort.php'); if ($_REQUEST['do'] == 'handle') { $input->inputClean('bugid', TYPE_UINT); - $bug = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = " . $bugsys->in['bugid']); + $bug = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = " . $input->in['bugid']); if (!check_bug_permissions($bug)) { $message->errorPermission(); @@ -53,15 +53,15 @@ if ($_REQUEST['do'] == 'handle') $message->errorPermission(); } - if ($db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "favorite WHERE userid = " . bugdar::$userinfo['userid'] . " AND bugid = " . $bugsys->in['bugid'])) + if ($db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "favorite WHERE userid = " . bugdar::$userinfo['userid'] . " AND bugid = " . $input->in['bugid'])) { - $db->query("DELETE FROM " . TABLE_PREFIX . "favorite WHERE userid = " . bugdar::$userinfo['userid'] . " AND bugid = " . $bugsys->in['bugid']); - $message->redirect(T('This bug has been removed from your favorites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']); + $db->query("DELETE FROM " . TABLE_PREFIX . "favorite WHERE userid = " . bugdar::$userinfo['userid'] . " AND bugid = " . $input->in['bugid']); + $message->redirect(T('This bug has been removed from your favorites list.'), "showreport.php?bugid=" . $input->in['bugid']); } else { - $db->query("INSERT INTO " . TABLE_PREFIX . "favorite (userid, bugid) VALUES (" . bugdar::$userinfo['userid'] . ", " . $bugsys->in['bugid'] . ")"); - $message->redirect(T('This bug has been added to your favorites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']); + $db->query("INSERT INTO " . TABLE_PREFIX . "favorite (userid, bugid) VALUES (" . bugdar::$userinfo['userid'] . ", " . $input->in['bugid'] . ")"); + $message->redirect(T('This bug has been added to your favorites list.'), "showreport.php?bugid=" . $input->in['bugid']); } } diff --git a/help.php b/help.php index def80dc..edad789 100644 --- a/help.php +++ b/help.php @@ -27,14 +27,14 @@ define('SVN', '$Id$'); require_once('./global.php'); -if (!$bugsys->in['topic'] OR !isset(bugdar::$datastore['help'][ $bugsys->in['topic'] ])) +if (!$input->in['topic'] OR !isset(bugdar::$datastore['help'][ $input->in['topic'] ])) { $topic['title'] = T('Invalid'); $topic['body'] = T('That help topic does not exist in the system.'); } else { - $topic = bugdar::$datastore['help'][ $bugsys->in['topic'] ]; + $topic = bugdar::$datastore['help'][ $input->in['topic'] ]; $topic['body'] = nl2br($topic['body']); } diff --git a/install/convert_database_charset.php b/install/convert_database_charset.php index 99683f4..36075a9 100644 --- a/install/convert_database_charset.php +++ b/install/convert_database_charset.php @@ -56,7 +56,7 @@ $admin->page_start('Convert Database Character Set'); // ################################################################### -if ($bugsys->in['step'] == 0) +if ($input->in['step'] == 0) { $collation = $db->queryFirst("SHOW VARIABLES LIKE 'collation_database'"); @@ -70,7 +70,7 @@ if ($bugsys->in['step'] == 0) // ################################################################### -else if ($bugsys->in['step'] == 1) +else if ($input->in['step'] == 1) { echo '

Preserve Existing Data

'; echo '

This converts all the table columns that are stored with a character set to a BLOB type to ensure there are no problems with the target character set.

'; @@ -163,7 +163,7 @@ else if ($bugsys->in['step'] == 1) // ################################################################### -else if ($bugsys->in['step'] == 2) +else if ($input->in['step'] == 2) { echo '

Conversion Complete

'; echo '

Your database has now been converted to the ' . TARGET . ' collation. Congratulations. Please check that everything is operating correctly.

'; diff --git a/install/global.php b/install/global.php index 6f20ef2..4dc90cb 100644 --- a/install/global.php +++ b/install/global.php @@ -106,7 +106,7 @@ $bugsys->load('installer', null); $input->inputClean('mark', TYPE_UINT); -if ($bugsys->in['mark'] == STOP_MARK) +if ($input->in['mark'] == STOP_MARK) { if (!preg_match('#^upgrade([0-9]*)\.php$#i', ACTIVE_SITE, $matches)) { diff --git a/install/install.php b/install/install.php index b7c5b6d..3f11e7c 100644 --- a/install/install.php +++ b/install/install.php @@ -31,7 +31,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -46,7 +46,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Installation Check

@@ -115,7 +115,7 @@ if ($bugsys->in['mark'] == 1) // ################################################################### -if ($bugsys->in['mark'] == 2) +if ($input->in['mark'] == 2) { ?>

Initializing Database

@@ -138,7 +138,7 @@ if ($bugsys->in['mark'] == 2) // ################################################################### -if ($bugsys->in['mark'] == 3) +if ($input->in['mark'] == 3) { ?>

Loading Default Data

@@ -172,7 +172,7 @@ if ($bugsys->in['mark'] == 3) // ################################################################### -if ($bugsys->in['mark'] == 4) +if ($input->in['mark'] == 4) { ?>

Loading Settings

@@ -194,7 +194,7 @@ if ($bugsys->in['mark'] == 4) // ################################################################### -if ($bugsys->in['mark'] == 5) +if ($input->in['mark'] == 5) { ?>

Cache Data

@@ -240,7 +240,7 @@ if ($bugsys->in['mark'] == 5) // ################################################################### -if ($bugsys->in['mark'] == 6) +if ($input->in['mark'] == 6) { $value = 'http' . ($_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '') . str_replace('/install/install.php', '', $_SERVER['SCRIPT_NAME']); ?> @@ -266,7 +266,7 @@ if ($bugsys->in['mark'] == 6) // ################################################################### -if ($bugsys->in['mark'] == 7) +if ($input->in['mark'] == 7) { ?>

New Administrator

@@ -296,7 +296,7 @@ if ($bugsys->in['mark'] == 7) // ################################################################### -if ($bugsys->in['mark'] == 8) +if ($input->in['mark'] == 8) { ?>

User Added

@@ -311,9 +311,9 @@ if ($bugsys->in['mark'] == 8) build_usergroups(); $user = new UserAPI($bugsys); - $user->set('email', $bugsys->in['email']); - $user->set('displayname', $bugsys->in['displayname']); - $user->set('password', $bugsys->in['password']); + $user->set('email', $input->in['email']); + $user->set('displayname', $input->in['displayname']); + $user->set('password', $input->in['password']); $user->set('showcolors', 1); $user->set('usergroupid', 6, true, false); // don't verify because we haven't cached usergroups yet $user->insert(); diff --git a/install/upgrade.php b/install/upgrade.php index 567af00..9069edc 100644 --- a/install/upgrade.php +++ b/install/upgrade.php @@ -23,7 +23,7 @@ require_once('./global.php'); // ################################################################### -if (!isset($bugsys->in['next'])) +if (!isset($input->in['next'])) { $db->showerrors = false; @@ -63,12 +63,12 @@ if (!isset($bugsys->in['next'])) else { - if ($bugsys->versions[ $bugsys->in['next'] ] == -1) + if ($bugsys->versions[ $input->in['next'] ] == -1) { die('Bugdar is up-to-date already'); } - header("Location: upgrade" . $bugsys->versions[ $bugsys->in['next'] ] . ".php"); + header("Location: upgrade" . $bugsys->versions[ $input->in['next'] ] . ".php"); } /*=====================================================================*\ diff --git a/install/upgrade1.php b/install/upgrade1.php index 0d335af..e5f6974 100644 --- a/install/upgrade1.php +++ b/install/upgrade1.php @@ -28,7 +28,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -43,7 +43,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Version Number Change

diff --git a/install/upgrade10.php b/install/upgrade10.php index a571d9f..2c8d733 100644 --- a/install/upgrade10.php +++ b/install/upgrade10.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -42,7 +42,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Version Number Change

diff --git a/install/upgrade11.php b/install/upgrade11.php index 167eeb2..c5ed5fb 100644 --- a/install/upgrade11.php +++ b/install/upgrade11.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -42,7 +42,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Minor Database Table Changes

@@ -70,7 +70,7 @@ if ($bugsys->in['mark'] == 1) // ################################################################### -if ($bugsys->in['mark'] == 2) +if ($input->in['mark'] == 2) { ?>

Search Table Changes

@@ -95,7 +95,7 @@ if ($bugsys->in['mark'] == 2) // ################################################################### -if ($bugsys->in['mark'] == 3) +if ($input->in['mark'] == 3) { ?>

Custom Field Updates

@@ -126,7 +126,7 @@ if ($bugsys->in['mark'] == 3) // ################################################################### -if ($bugsys->in['mark'] == 4) +if ($input->in['mark'] == 4) { ?>

Database Table Changes

@@ -175,7 +175,7 @@ if ($bugsys->in['mark'] == 4) // ################################################################### -if ($bugsys->in['mark'] == 5) +if ($input->in['mark'] == 5) { ?>

Version Number Change

diff --git a/install/upgrade12.php b/install/upgrade12.php index a5a19f0..5b64562 100644 --- a/install/upgrade12.php +++ b/install/upgrade12.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -42,7 +42,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Schema Updates

@@ -55,7 +55,7 @@ if ($bugsys->in['mark'] == 1) // ################################################################### -if ($bugsys->in['mark'] == 2) +if ($input->in['mark'] == 2) { ?>

Version Number Change

diff --git a/install/upgrade13.php b/install/upgrade13.php index 8815b37..f8da550 100644 --- a/install/upgrade13.php +++ b/install/upgrade13.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -42,7 +42,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Potential Schema Updates

@@ -77,7 +77,7 @@ if ($bugsys->in['mark'] == 1) // ################################################################### -if ($bugsys->in['mark'] == 2) +if ($input->in['mark'] == 2) { ?>

Version Number Change

diff --git a/install/upgrade14.php b/install/upgrade14.php index 1644e66..803e0e2 100644 --- a/install/upgrade14.php +++ b/install/upgrade14.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -42,7 +42,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Version Number Change

diff --git a/install/upgrade15.php b/install/upgrade15.php index b8e38fc..3e2c7eb 100644 --- a/install/upgrade15.php +++ b/install/upgrade15.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -42,7 +42,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Version Number Change

diff --git a/install/upgrade16.php b/install/upgrade16.php index 010e105..388784b 100644 --- a/install/upgrade16.php +++ b/install/upgrade16.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -42,7 +42,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Version Number Change

diff --git a/install/upgrade17.php b/install/upgrade17.php index 76a8c4f..b6a61cd 100644 --- a/install/upgrade17.php +++ b/install/upgrade17.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -42,7 +42,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Version Number Change

diff --git a/install/upgrade2.php b/install/upgrade2.php index e7542a5..ff6f5d7 100644 --- a/install/upgrade2.php +++ b/install/upgrade2.php @@ -28,7 +28,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -43,7 +43,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Major Table Changes

@@ -69,7 +69,7 @@ if ($bugsys->in['mark'] == 1) // ################################################################### -if ($bugsys->in['mark'] == 2) +if ($input->in['mark'] == 2) { ?>

User Table Changes

@@ -93,7 +93,7 @@ if ($bugsys->in['mark'] == 2) // ################################################################### -if ($bugsys->in['mark'] == 3) +if ($input->in['mark'] == 3) { ?>

Minor Table Changes

@@ -124,7 +124,7 @@ if ($bugsys->in['mark'] == 3) // ################################################################### -if ($bugsys->in['mark'] == 4) +if ($input->in['mark'] == 4) { ?>

Caching User Data in Bug Table

@@ -165,7 +165,7 @@ if ($bugsys->in['mark'] == 4) // ################################################################### -if ($bugsys->in['mark'] == 5) +if ($input->in['mark'] == 5) { ?>

Updating Old History Items

@@ -214,7 +214,7 @@ if ($bugsys->in['mark'] == 5) // ################################################################### -if ($bugsys->in['mark'] == 6) +if ($input->in['mark'] == 6) { ?>

Adding User Email Options

@@ -247,7 +247,7 @@ if ($bugsys->in['mark'] == 6) // ################################################################### -if ($bugsys->in['mark'] == 7) +if ($input->in['mark'] == 7) { ?>

Version Number Change

diff --git a/install/upgrade3.php b/install/upgrade3.php index 4f9cd4c..bae507a 100644 --- a/install/upgrade3.php +++ b/install/upgrade3.php @@ -28,7 +28,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -43,7 +43,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Language System Updates

@@ -74,7 +74,7 @@ if ($bugsys->in['mark'] == 1) // ################################################################### -if ($bugsys->in['mark'] == 2) +if ($input->in['mark'] == 2) { ?>

English US Changes

@@ -93,7 +93,7 @@ if ($bugsys->in['mark'] == 2) // ################################################################### -if ($bugsys->in['mark'] == 3) +if ($input->in['mark'] == 3) { ?>

Adding New Permission Mask

@@ -108,7 +108,7 @@ if ($bugsys->in['mark'] == 3) // ################################################################### -if ($bugsys->in['mark'] == 4) +if ($input->in['mark'] == 4) { ?>

Version Number Change

diff --git a/install/upgrade4.php b/install/upgrade4.php index 8384670..e6ced0f 100644 --- a/install/upgrade4.php +++ b/install/upgrade4.php @@ -28,7 +28,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -43,7 +43,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Version Number Change

diff --git a/install/upgrade5.php b/install/upgrade5.php index 5fa4021..a96a922 100644 --- a/install/upgrade5.php +++ b/install/upgrade5.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -44,7 +44,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Rename Automatic Actions

@@ -77,7 +77,7 @@ The \"Automation\" drop-down next to this box (which may be hidden) will allow y // ################################################################### -if ($bugsys->in['mark'] == 2) +if ($input->in['mark'] == 2) { ?>

Version Number Change

diff --git a/install/upgrade6.php b/install/upgrade6.php index 2e34f45..9e703f5 100644 --- a/install/upgrade6.php +++ b/install/upgrade6.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -44,7 +44,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Version Number Change

diff --git a/install/upgrade7.php b/install/upgrade7.php index 07c0afd..e5a9d78 100644 --- a/install/upgrade7.php +++ b/install/upgrade7.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -44,7 +44,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Version Number Change

diff --git a/install/upgrade8.php b/install/upgrade8.php index fea0985..66415b8 100644 --- a/install/upgrade8.php +++ b/install/upgrade8.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -44,7 +44,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Version Number Change

diff --git a/install/upgrade9.php b/install/upgrade9.php index 062edaf..96deb99 100644 --- a/install/upgrade9.php +++ b/install/upgrade9.php @@ -29,7 +29,7 @@ page_start(); // ################################################################### -if ($bugsys->in['mark'] == 0) +if ($input->in['mark'] == 0) { ?>

Welcome to Bugdar

@@ -42,7 +42,7 @@ if ($bugsys->in['mark'] == 0) // ################################################################### -if ($bugsys->in['mark'] == 1) +if ($input->in['mark'] == 1) { ?>

Schema Changes

@@ -57,7 +57,7 @@ if ($bugsys->in['mark'] == 1) // ################################################################### -if ($bugsys->in['mark'] == 2) +if ($input->in['mark'] == 2) { ?>

Version Number Change

diff --git a/locale/en_US/emails/activateaccount.xml.tpl b/locale/en_US/emails/activateaccount.xml.tpl index 1ff638d..f542d29 100644 --- a/locale/en_US/emails/activateaccount.xml.tpl +++ b/locale/en_US/emails/activateaccount.xml.tpl @@ -1,6 +1,6 @@ Welcome to {bugdar::$options['trackertitle']} - Hi {$bugsys->in['displayname']}, + Hi {$input->in['displayname']}, Welcome to the {bugdar::$options['trackertitle']} tracker. Before you can begin posting bug reports, you'll need to activate your account. To do this, please click this link: diff --git a/login.php b/login.php index 89270da..1e77a3c 100755 --- a/login.php +++ b/login.php @@ -66,7 +66,7 @@ if ($_POST['do'] == 'login' OR $_POST['do'] == 'cplogin') $url = 'index.php'; } - if ($auth->authenticateLogin($bugsys->in['email'], $bugsys->in['password'], $keeplogin)) + if ($auth->authenticateLogin($input->in['email'], $input->in['password'], $keeplogin)) { if ($_POST['do'] == 'cplogin') { @@ -105,7 +105,7 @@ if ($_REQUEST['do'] == 'logout') if ($_POST['do'] == 'sendpw') { $user = new UserAPI($bugsys); - $user->set('email', $bugsys->in['email'], true, false); // don't verify so we don't get errors about existing emails + $user->set('email', $input->in['email'], true, false); // don't verify so we don't get errors about existing emails $user->set_condition(array('email')); $user->fetch(); @@ -156,16 +156,16 @@ if ($_POST['do'] == 'resetpw') $user->set('userid', $activation['userid']); $user->set_condition(); - if ($bugsys->in['fix_password'] != $bugsys->in['confirm_password']) + if ($input->in['fix_password'] != $input->in['confirm_password']) { $message->addError(T('The passwords you entered do not patch.')); } - if (empty($bugsys->in['fix_password'])) + if (empty($input->in['fix_password'])) { $message->addError(T('Your new password cannot be empty.')); } - $user->set('password', $bugsys->in['fix_password']); + $user->set('password', $input->in['fix_password']); if (!$message->hasErrors()) { diff --git a/newreport.php b/newreport.php index 0b02ecc..5a2e7af 100755 --- a/newreport.php +++ b/newreport.php @@ -35,7 +35,7 @@ require_once('./includes/api_comment.php'); require_once('./includes/class_api_error.php'); -$product = explode(',', $bugsys->in['product']); +$product = explode(',', $input->in['product']); if (!can_perform('cansubmitbugs', $product[0])) { $message->errorPermission(); @@ -59,16 +59,16 @@ if ($_POST['do'] == 'insert') $bug->set('userid', bugdar::$userinfo['userid']); $bug->set('username', bugdar::$userinfo['displayname']); - $bug->set('summary', $bugsys->in['summary']); - $bug->set('severity', $bugsys->in['severity']); + $bug->set('summary', $input->in['summary']); + $bug->set('severity', $input->in['severity']); $comment->set('userid', bugdar::$userinfo['userid']); - $comment->set('comment', $bugsys->in['comment']); - $comment->set('parselinks', $bugsys->in['parselinks']); + $comment->set('comment', $input->in['comment']); + $comment->set('parselinks', $input->in['parselinks']); // ------------------------------------------------------------------- // check permissions on various input values - if (!can_perform('canchangestatus', $bugsys->in['product'])) + if (!can_perform('canchangestatus', $input->in['product'])) { $bug->set('priority', bugdar::$options['defaultpriority']); $bug->set('status', bugdar::$options['defaultstatus']); @@ -76,21 +76,21 @@ if ($_POST['do'] == 'insert') } else { - $bug->set('priority', $bugsys->in['priority']); - $bug->set('status', $bugsys->in['status']); - $bug->set('resolution', $bugsys->in['resolution']); + $bug->set('priority', $input->in['priority']); + $bug->set('status', $input->in['status']); + $bug->set('resolution', $input->in['resolution']); } - if (!can_perform('canassign', $bugsys->in['product'])) + if (!can_perform('canassign', $input->in['product'])) { $bug->set('assignedto', bugdar::$options['defaultassign']); } else { // assigned person is not a dev or a valid user - $bug->set('assignedto', $bugsys->in['assignedto']); + $bug->set('assignedto', $input->in['assignedto']); } - $product = explode(',', $bugsys->in['product']); + $product = explode(',', $input->in['product']); $bug->set('product', $product[0]); $bug->set('component', $product[1]); $bug->set('version', $product[2]); @@ -125,7 +125,7 @@ if ($_POST['do'] == 'insert') $notif->finalize(); - $message->redirect(T('The bug has been added to the database.'), ($bugsys->in['submit_reload'] == '' ? "showreport.php?bugid=" . $bug->values['bugid'] : 'newreport.php')); + $message->redirect(T('The bug has been added to the database.'), ($input->in['submit_reload'] == '' ? "showreport.php?bugid=" . $bug->values['bugid'] : 'newreport.php')); } else { @@ -147,15 +147,15 @@ if ($_REQUEST['do'] == 'add') $message->error(T('No versions have been setup underneath your product(s), therefore no bugs can be added.')); } - $select['severity'] = construct_datastore_select('severity', 'severity', 'severityid', ($bugsys->in['severity'] ? $bugsys->in['severity'] : bugdar::$options['defaultseverity'])); + $select['severity'] = construct_datastore_select('severity', 'severity', 'severityid', ($input->in['severity'] ? $input->in['severity'] : bugdar::$options['defaultseverity'])); $show['changestatus'] = can_perform('canchangestatus'); if (can_perform('canchangestatus')) { - $select['priority'] = construct_datastore_select('priority', 'priority', 'priorityid', ($bugsys->in['priority'] ? $bugsys->in['priority'] : bugdar::$options['defaultpriority'])); - $select['status'] = construct_datastore_select('status', 'status', 'statusid', ($bugsys->in['status'] ? $bugsys->in['status'] : bugdar::$options['defaultstatus'])); - $select['resolution'] = construct_datastore_select('resolution', 'resolution', 'resolutionid', ($bugsys->in['resolution'] ? $bugsys->in['resolution'] : bugdar::$options['defaultresolve'])); + $select['priority'] = construct_datastore_select('priority', 'priority', 'priorityid', ($input->in['priority'] ? $input->in['priority'] : bugdar::$options['defaultpriority'])); + $select['status'] = construct_datastore_select('status', 'status', 'statusid', ($input->in['status'] ? $input->in['status'] : bugdar::$options['defaultstatus'])); + $select['resolution'] = construct_datastore_select('resolution', 'resolution', 'resolutionid', ($input->in['resolution'] ? $input->in['resolution'] : bugdar::$options['defaultresolve'])); } $show['assign'] = can_perform('canassign'); @@ -166,7 +166,7 @@ if ($_REQUEST['do'] == 'add') { $value = $dev['userid']; $label = construct_user_display($dev, false); - $selected = ($bugsys->in['assignedto'] ? ($bugsys->in['assignedto'] == $dev['userid']) : ($dev['userid'] == bugdar::$options['defaultassign'])); + $selected = ($input->in['assignedto'] ? ($input->in['assignedto'] == $dev['userid']) : ($dev['userid'] == bugdar::$options['defaultassign'])); eval('$select[dev] .= "' . $template->fetch('selectoption') . '";'); } } @@ -190,7 +190,7 @@ if ($_REQUEST['do'] == 'add') $tpl = new BSTemplate('newreport'); $tpl->vars = array( 'reporter' => construct_user_display(bugdar::$userinfo), - 'productSelect' => ConstructProductSelect('cansubmitbugs', $bugsys->in['product'], false), + 'productSelect' => ConstructProductSelect('cansubmitbugs', $input->in['product'], false), 'select' => $select, 'customfields' => $customfields ); diff --git a/register.php b/register.php index 05c3a58..04e04dc 100755 --- a/register.php +++ b/register.php @@ -47,12 +47,12 @@ if ($_POST['do'] == 'insert') $message->error(T('Sorry, we don\'t allow new registrations.')); } - if ($bugsys->in['email'] != $bugsys->in['confirmemail']) + if ($input->in['email'] != $input->in['confirmemail']) { $message->addError(T('The emails you entered do not match.')); } - if ($bugsys->in['password'] != $bugsys->in['confirmpassword']) + if ($input->in['password'] != $input->in['confirmpassword']) { $message->addError(T('The passwords you entered did not match.')); } @@ -74,12 +74,12 @@ if ($_POST['do'] == 'insert') } $user = new UserAPI($bugsys); - $user->set('email', $bugsys->in['email']); - $user->set('displayname', $bugsys->in['displayname']); - $user->set('password', $bugsys->in['password']); - $user->set('showemail', $bugsys->in['showemail']); + $user->set('email', $input->in['email']); + $user->set('displayname', $input->in['displayname']); + $user->set('password', $input->in['password']); + $user->set('showemail', $input->in['showemail']); $user->set('showcolors', 1); - $user->set('languageid', $bugsys->in['languageid']); + $user->set('languageid', $input->in['languageid']); $user->set('timezone', bugdar::$options['defaulttimezone']); $user->set('usergroupid', $usergroupid); @@ -96,12 +96,12 @@ if ($_POST['do'] == 'insert') $db->query("INSERT INTO " . TABLE_PREFIX . "useractivation (userid, activator, dateline, usergroupid) VALUES ($userid, '$activationid', " . TIMENOW . ", 2)"); - eval('$email = "' . $template->fetch(FetchEmailPath('activateaccount.xml', bugdar::$datastore['language'][$bugsys->in['languageid']]['langcode'])) . '";'); + eval('$email = "' . $template->fetch(FetchEmailPath('activateaccount.xml', bugdar::$datastore['language'][$input->in['languageid']]['langcode'])) . '";'); $email = $bugsys->xml->parse($email); $mail->setSubject($email['email']['subject']['value']); $mail->setBodyText($email['email']['bodyText']['value']); - $mail->send($bugsys->in['email'], $bugsys->in['displayname']); + $mail->send($input->in['email'], $input->in['displayname']); $message->message(T('You now need to activate your account via email.')); } @@ -109,12 +109,12 @@ if ($_POST['do'] == 'insert') { if (bugdar::$options['sendwelcomemail']) { - $displayName = $bugsys->in['displayname']; - eval('$email = "' . $template->fetch(FetchEmailPath('welcome.xml', bugdar::$datastore['language'][$bugsys->in['languageid']]['langcode'])) . '";'); + $displayName = $input->in['displayname']; + eval('$email = "' . $template->fetch(FetchEmailPath('welcome.xml', bugdar::$datastore['language'][$input->in['languageid']]['langcode'])) . '";'); $email = $bugsys->xml->parse($email); $mail->setSubject($email['email']['subject']['value']); $mail->setBodyText($email['email']['bodyText']['value']); - $mail->send($bugsys->in['email'], $bugsys->in['displayname']); + $mail->send($input->in['email'], $input->in['displayname']); } if ($usergroupid == 4) @@ -151,7 +151,7 @@ if (empty($_REQUEST['do'])) foreach (bugdar::$datastore['language'] AS $value => $temp) { $label = $temp['title']; - $selected = ($value == $bugsys->in['languageid']); + $selected = ($value == $input->in['languageid']); eval('$opts .= "' . $template->fetch('selectoption') . '";'); } @@ -163,11 +163,11 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'activate') { $input->inputClean('userid', TYPE_UINT); - if ($useractivation = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "useractivation WHERE userid = " . $bugsys->in['userid'] . " AND activator = '" . $bugsys->input_escape('activator') . "'")) + if ($useractivation = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "useractivation WHERE userid = " . $input->in['userid'] . " AND activator = '" . $bugsys->input_escape('activator') . "'")) { - $user = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = " . $bugsys->in['userid']); - $db->query("UPDATE " . TABLE_PREFIX . "user SET usergroupid = $useractivation[usergroupid] WHERE userid = " . $bugsys->in['userid']); - $db->query("DELETE FROM " . TABLE_PREFIX . "useractivation WHERE userid = " . $bugsys->in['userid']); + $user = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = " . $input->in['userid']); + $db->query("UPDATE " . TABLE_PREFIX . "user SET usergroupid = $useractivation[usergroupid] WHERE userid = " . $input->in['userid']); + $db->query("DELETE FROM " . TABLE_PREFIX . "useractivation WHERE userid = " . $input->in['userid']); if (bugdar::$options['sendwelcomemail']) { diff --git a/search.php b/search.php index a94baaf..17f5486 100644 --- a/search.php +++ b/search.php @@ -70,11 +70,11 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'search') { - if ($bugsys->in['new']) + if ($input->in['new']) { $newsearch = true; } - else if ($bugsys->in['searchid']) + else if ($input->in['searchid']) { $cachedsearch = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $input->inputClean('searchid', TYPE_UINT) . " AND userid = " . bugdar::$userinfo['userid']); } @@ -90,7 +90,7 @@ if ($_REQUEST['do'] == 'search') if ($cachedsearch) { $show['cached'] = true; - if ($cachedsearch['dateline'] < TIMENOW - 900 OR $bugsys->in['rerun']) + if ($cachedsearch['dateline'] < TIMENOW - 900 OR $input->in['rerun']) { $_REQUEST['do'] = 'process'; $bugsys->in = array_merge(unserialize($cachedsearch['query']), $bugsys->in); @@ -175,9 +175,9 @@ if ($_REQUEST['do'] == 'process') { // ------------------------------------------------------------------- // handle keywords - if ($bugsys->in['summary']) + if ($input->in['summary']) { - $keywords = preg_split('#\s+#', $bugsys->in['summary']); + $keywords = preg_split('#\s+#', $input->in['summary']); // TODO - need to have some str to bool conversions @@ -188,7 +188,7 @@ if ($_REQUEST['do'] == 'process') continue; } - if ($bugsys->in['mode'] == MODE_ALL) + if ($input->in['mode'] == MODE_ALL) { $querybuild['text'] .= " +$word"; } @@ -209,7 +209,7 @@ if ($_REQUEST['do'] == 'process') $temp = trim($querybuild['text']); - if ($bugsys->in['mode'] == MODE_ALL OR $bugsys->in['mode'] == MODE_RAW) + if ($input->in['mode'] == MODE_ALL OR $input->in['mode'] == MODE_RAW) { $bool_flag = ' IN BOOLEAN MODE'; } @@ -219,7 +219,7 @@ if ($_REQUEST['do'] == 'process') // ------------------------------------------------------------------- // reporter - if ($bugsys->in['reporter']) + if ($input->in['reporter']) { // force email or name?? make a distinction? // more elegant way to do this? probably @@ -232,9 +232,9 @@ if ($_REQUEST['do'] == 'process') // ------------------------------------------------------------------- // product/component/version stuff - if (is_array($bugsys->in['product'])) + if (is_array($input->in['product'])) { - foreach ($bugsys->in['product'] AS $prod) + foreach ($input->in['product'] AS $prod) { $product = explode(',', $prod); $product = $bugsys->clean($product, TYPE_UINT); @@ -249,43 +249,43 @@ if ($_REQUEST['do'] == 'process') // severity, priority, status, resolution, assignedto // severity - if ($bugsys->in['severity']) + if ($input->in['severity']) { $input->inputClean('severity', TYPE_UINT); - $querybuild['severity'] = "AND bug.severity IN (" . implode(',', $bugsys->in['severity']) . ")"; + $querybuild['severity'] = "AND bug.severity IN (" . implode(',', $input->in['severity']) . ")"; } // priority - if ($bugsys->in['priority']) + if ($input->in['priority']) { $input->inputClean('priority', TYPE_UINT); - $querybuild['priority'] = "AND bug.priority IN (" . implode(',', $bugsys->in['priority']) . ")"; + $querybuild['priority'] = "AND bug.priority IN (" . implode(',', $input->in['priority']) . ")"; } // status - if ($bugsys->in['status']) + if ($input->in['status']) { $input->inputClean('status', TYPE_UINT); - $querybuild['status'] = "AND bug.status IN (" . implode(',', $bugsys->in['status']) . ")"; + $querybuild['status'] = "AND bug.status IN (" . implode(',', $input->in['status']) . ")"; } // resolution - if ($bugsys->in['resolution']) + if ($input->in['resolution']) { $input->inputClean('resolution', TYPE_UINT); - $querybuild['resolution'] = "AND bug.resolution IN (" . implode(',', $bugsys->in['resolution']) . ")"; + $querybuild['resolution'] = "AND bug.resolution IN (" . implode(',', $input->in['resolution']) . ")"; } // assignment - if ($bugsys->in['assignedto']) + if ($input->in['assignedto']) { $input->inputClean('assignedto', TYPE_UINT); - $querybuild['assignedto'] = "AND bug.assignedto IN (" . implode(',', $bugsys->in['assignedto']) . ")"; + $querybuild['assignedto'] = "AND bug.assignedto IN (" . implode(',', $input->in['assignedto']) . ")"; } // ------------------------------------------------------------------- // date - if ($bugsys->in['date']) + if ($input->in['date']) { // now - (seconds/day * number of days) $dateline = time() - ($input->inputClean('date', TYPE_INT) * 3600); @@ -295,26 +295,26 @@ if ($_REQUEST['do'] == 'process') // ------------------------------------------------------------------- // favorites $input->inputClean('favorite', TYPE_INT); - if ($bugsys->in['favorite'] != 0 AND bugdar::$userinfo['userid']) + if ($input->in['favorite'] != 0 AND bugdar::$userinfo['userid']) { $favorites = $db->query("SELECT * FROM " . TABLE_PREFIX . "favorite WHERE userid = " . bugdar::$userinfo['userid']); foreach ($favorites as $favorite) { $ids[] = $favorite['bugid']; } - $querybuild['favorites'] = "AND bug.bugid " . ($bugsys->in['favorite'] > 0 ? "IN" : "NOT IN") . " (" . implode(', ', $ids) . ")"; + $querybuild['favorites'] = "AND bug.bugid " . ($input->in['favorite'] > 0 ? "IN" : "NOT IN") . " (" . implode(', ', $ids) . ")"; } // ------------------------------------------------------------------- // sort by $sortby = array('bugid', 'severity', 'priority', 'status', 'resolution', 'dateline'); $orderby = array('ASC', 'DESC'); - $bugsys->in['orderby'] = strtoupper($bugsys->in['orderby']); - if (in_array($bugsys->in['sortby'], $sortby) AND in_array($bugsys->in['orderby'], $orderby)) + $input->in['orderby'] = strtoupper($input->in['orderby']); + if (in_array($input->in['sortby'], $sortby) AND in_array($input->in['orderby'], $orderby)) { - $sortclause = "ORDER BY " . $bugsys->in['sortby'] . ' ' . $bugsys->in['orderby']; + $sortclause = "ORDER BY " . $input->in['sortby'] . ' ' . $input->in['orderby']; } - else if ($bugsys->in['sortby'] == 'relevance') + else if ($input->in['sortby'] == 'relevance') { $sortclause = ''; } @@ -337,20 +337,20 @@ if ($_REQUEST['do'] == 'process') ); foreach ($fields_fetch as $field) { - if (!empty($bugsys->in["custom$field[fieldid]"]) OR ($field['type'] == 'select_single' AND isset($bugsys->in["custom$field[fieldid]"]))) + if (!empty($input->in["custom$field[fieldid]"]) OR ($field['type'] == 'select_single' AND isset($input->in["custom$field[fieldid]"]))) { if ($field['type'] == 'input_checkbox' AND $input->inputClean("custom$field[fieldid]", TYPE_INT) != 0) { - $querybuild[] = "AND bug.custom$field[fieldid] = " . ($bugsys->in["custom$field[fieldid]"] > 0 ? 1 : 0); + $querybuild[] = "AND bug.custom$field[fieldid] = " . ($input->in["custom$field[fieldid]"] > 0 ? 1 : 0); } else if ($field['type'] == 'input_text') { - $querybuild[] = "AND bug.custom$field[fieldid] LIKE '%" . $bugsys->in["custom$field[fieldid]"] . "%'"; + $querybuild[] = "AND bug.custom$field[fieldid] LIKE '%" . $input->in["custom$field[fieldid]"] . "%'"; } - else if ($field['type'] == 'select_single' AND $bugsys->in["custom$field[fieldid]"] != -1) + else if ($field['type'] == 'select_single' AND $input->in["custom$field[fieldid]"] != -1) { $temp = unserialize($field['selects']); - $querybuild[] = "AND bug.custom$field[fieldid] = '" . trim($temp[ intval($bugsys->in["custom$field[fieldid]"]) ]) . "'"; + $querybuild[] = "AND bug.custom$field[fieldid] = '" . trim($temp[ intval($input->in["custom$field[fieldid]"]) ]) . "'"; } } } @@ -398,7 +398,7 @@ if ($_REQUEST['do'] == 'process') $results[] = $result; } - if (bugdar::$userinfo['userid'] AND !$cachedsearch AND !$bugsys->in['rerun']) + if (bugdar::$userinfo['userid'] AND !$cachedsearch AND !$input->in['rerun']) { $db->query("DELETE FROM " . TABLE_PREFIX . "search WHERE userid = " . bugdar::$userinfo['userid'] . " AND name IS NULL"); } @@ -528,29 +528,29 @@ if ($_POST['do'] == 'doupdate') $log->set_bugid($bug['bugid']); $log->add_data(true, $bug, $log->getCommonFields(), true); - if ($bugsys->in['status'] AND can_perform('canchangestatus', $bug['product'])) + if ($input->in['status'] AND can_perform('canchangestatus', $bug['product'])) { - $api->set('status', $bugsys->in['status']); + $api->set('status', $input->in['status']); } - if ($bugsys->in['priority'] AND can_perform('canchangestatus', $bug['product'])) + if ($input->in['priority'] AND can_perform('canchangestatus', $bug['product'])) { - $api->set('priority', $bugsys->in['priority']); + $api->set('priority', $input->in['priority']); } - if ($bugsys->in['severity']) + if ($input->in['severity']) { - $api->set('severity', $bugsys->in['severity']); + $api->set('severity', $input->in['severity']); } - if ($bugsys->in['resolution'] AND can_perform('canchangestatus', $bug['product'])) + if ($input->in['resolution'] AND can_perform('canchangestatus', $bug['product'])) { - $api->set('resolution', $bugsys->in['resolution']); + $api->set('resolution', $input->in['resolution']); } - if ($bugsys->in['assignedto'] AND can_perform('canassign', $bug['product'])) + if ($input->in['assignedto'] AND can_perform('canassign', $bug['product'])) { - $api->set('assignedto', $bugsys->in['assignedto']); + $api->set('assignedto', $input->in['assignedto']); } - if ($bugsys->in['product']) + if ($input->in['product']) { - $product = explode(',', $bugsys->in['product']); + $product = explode(',', $input->in['product']); $api->set('product', $product[0]); $api->set('component', $product[1]); $api->set('version', $product[2]); @@ -564,18 +564,18 @@ if ($_POST['do'] == 'doupdate') $log->update_history(); } - $message->redirect(T('The specified bugs have been updated and you will now return to your search results.'), 'search.php?searchid=' . $bugsys->in['searchid']); + $message->redirect(T('The specified bugs have been updated and you will now return to your search results.'), 'search.php?searchid=' . $input->in['searchid']); } // ################################################################### if ($_REQUEST['do'] == 'export') { - if (!$bugsys->in['searchid'] AND bugdar::$userinfo['userid']) + if (!$input->in['searchid'] AND bugdar::$userinfo['userid']) { $search = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "search WHERE name IS NULL AND userid = " . bugdar::$userinfo['userid']); } - else if ($bugsys->in['searchid']) + else if ($input->in['searchid']) { $search = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $input->inputClean('searchid', TYPE_UINT) . " AND userid = " . bugdar::$userinfo['userid']); } @@ -644,14 +644,14 @@ if ($_POST['do'] == 'dosave') { $message->addError(sprintf(T('This search has already been named "%1$s".'), $search['name'])); } - if (empty($bugsys->in['name'])) + if (empty($input->in['name'])) { $message->addError(T('The name cannot be empty.')); } if (!$message->hasErrors()) { - $db->query("UPDATE " . TABLE_PREFIX . "search SET name = '" . $bugsys->input_escape('name') . "' WHERE searchid = " . $bugsys->in['searchid']); + $db->query("UPDATE " . TABLE_PREFIX . "search SET name = '" . $bugsys->input_escape('name') . "' WHERE searchid = " . $input->in['searchid']); $message->redirect(T('Your search has been saved.'), 'search.php?searchid=' . $search['searchid']); } else diff --git a/showreport.php b/showreport.php index 3873496..3df3de7 100644 --- a/showreport.php +++ b/showreport.php @@ -231,7 +231,7 @@ foreach ($fields AS $field) // ------------------------------------------------------------------- // hilight -$words = explode(' ', $bugsys->in['hilight']); +$words = explode(' ', $input->in['hilight']); foreach ($words AS $word) { if (trim($word)) diff --git a/templates/lostpassword.tpl b/templates/lostpassword.tpl index e2f7ae9..3b32111 100644 --- a/templates/lostpassword.tpl +++ b/templates/lostpassword.tpl @@ -20,7 +20,7 @@ $header
<% if ($show['lostpwerror']): %>
<%-T("The specified email could not be found or it is invalid.")%>
<% endif %>
<%-T("Enter your email in the box below and you will receive a message with instructions on how to set a new password.")%>
-
<%-T("Email")%>:
+
<%-T("Email")%>:
diff --git a/templates/newattach.tpl b/templates/newattach.tpl index f277415..adc081c 100644 --- a/templates/newattach.tpl +++ b/templates/newattach.tpl @@ -28,7 +28,7 @@ $header
-
<%-T("Description")%>:
+
<%-T("Description")%>:
<% if ($show['obsoletes']): %> @@ -43,7 +43,7 @@ $header
<%-T("Add Comment")%>:
- +
diff --git a/templates/newreport.tpl b/templates/newreport.tpl index 1c004aa..550caa8 100644 --- a/templates/newreport.tpl +++ b/templates/newreport.tpl @@ -35,7 +35,7 @@
<%-T("Product/Version")%> $help[product] -
+
@@ -66,7 +66,7 @@
<%-T("Summary")%> $help[summary] -
+
@@ -110,9 +110,9 @@
<%-T("Description/Initial Report")%> - + -
in['parselinks']): %> checked="checked"<% endif %> /> <%-T("Parse Links in the Comment")%>
+
in['parselinks']): %> checked="checked"<% endif %> /> <%-T("Parse Links in the Comment")%>
@@ -127,6 +127,6 @@ - + <%- $footer %> \ No newline at end of file diff --git a/templates/register.tpl b/templates/register.tpl index 00e4b84..99e9d6c 100644 --- a/templates/register.tpl +++ b/templates/register.tpl @@ -25,12 +25,12 @@ $header
<%-T("Register")%>
-
<%-T("Email")%>:
-
<%-T("Confirm Email")%>:
-
<%-T("Display Name")%>:
+
<%-T("Email")%>:
+
<%-T("Confirm Email")%>:
+
<%-T("Display Name")%>:
<%-T("Password")%>:
<%-T("Confirm Password")%>:
-
<%-T("Show My Email Publicly")%>: checked="checked"<% endif %> /> <%-T("Yes")%>
+
<%-T("Show My Email Publicly")%>: checked="checked"<% endif %> /> <%-T("Yes")%>
<%-T("Language")%>:
diff --git a/templates/search_save.tpl b/templates/search_save.tpl index 706550d..edd1cfe 100644 --- a/templates/search_save.tpl +++ b/templates/search_save.tpl @@ -19,7 +19,7 @@
- +
@@ -31,7 +31,7 @@

-
<%-T("Name")%>:
+
<%-T("Name")%>:
diff --git a/templates/showreport.tpl b/templates/showreport.tpl index 7a783e1..cd6a5ae 100644 --- a/templates/showreport.tpl +++ b/templates/showreport.tpl @@ -192,7 +192,7 @@ -
in['parselinks']): %>> checked="checked"<% endif %> /> <%-T("Parse Links in the Comment")%>
+
in['parselinks']): %>> checked="checked"<% endif %> /> <%-T("Parse Links in the Comment")%>
diff --git a/userctrl.php b/userctrl.php index 1e48574..6c05092 100644 --- a/userctrl.php +++ b/userctrl.php @@ -63,7 +63,7 @@ if ($_POST['do'] == 'killsearch') $message->errorPermission(); } - $db->query("DELETE FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->in['searchid']); + $db->query("DELETE FROM " . TABLE_PREFIX . "search WHERE searchid = " . $input->in['searchid']); $message->redirect(T('This saved search has been removed from your list.'), 'userctrl.php'); } @@ -78,7 +78,7 @@ if ($_REQUEST['do'] == 'deletesearch') $message->errorPermission(); } - $message->confirm(T('Are you sure you want to delete this saved search?'), 'userctrl.php', 'killsearch', T('Delete'), T('Cancel'), array('searchid' => $bugsys->in['searchid'])); + $message->confirm(T('Are you sure you want to delete this saved search?'), 'userctrl.php', 'killsearch', T('Delete'), T('Cancel'), array('searchid' => $input->in['searchid'])); } // ################################################################### @@ -87,15 +87,15 @@ if ($_POST['do'] == 'update') { // ------------------------------------------------------------------- // authentication - if (!empty($bugsys->in['password_change']) OR !empty($bugsys->in['email_change'])) + if (!empty($input->in['password_change']) OR !empty($input->in['email_change'])) { - if (empty($bugsys->in['validate'])) + if (empty($input->in['validate'])) { $message->addError(T('You need to enter your current password to change your email or password')); } else { - if (md5(md5($bugsys->in['validate']) . md5(bugdar::$userinfo['salt'])) != bugdar::$userinfo['password']) + if (md5(md5($input->in['validate']) . md5(bugdar::$userinfo['salt'])) != bugdar::$userinfo['password']) { $message->addError(T('Your authentication password does not match the one in our records')); } @@ -104,66 +104,66 @@ if ($_POST['do'] == 'update') // ------------------------------------------------------------------- // email validation - if (!empty($bugsys->in['email_change'])) + if (!empty($input->in['email_change'])) { - if (!empty($bugsys->in['email_change']) AND empty($bugsys->in['email_confirm'])) + if (!empty($input->in['email_change']) AND empty($input->in['email_confirm'])) { $message->addError(T('You need to enter both the email and confirm email fields to change your address')); } - if ($bugsys->in['email_change'] != $bugsys->in['email_confirm']) + if ($input->in['email_change'] != $input->in['email_confirm']) { $message->addError(T('Your email and confirm email addresses do not match')); } - $userapi->set('email', $bugsys->in['email_change']); + $userapi->set('email', $input->in['email_change']); } // ------------------------------------------------------------------- // password validation - if (!empty($bugsys->in['password_change'])) + if (!empty($input->in['password_change'])) { - if (!empty($bugsys->in['password_change']) AND empty($bugsys->in['password_confirm'])) + if (!empty($input->in['password_change']) AND empty($input->in['password_confirm'])) { $message->addError(T('You need to enter both the password and confirm password fields to change your password')); } else { - if ($bugsys->in['password_change'] != $bugsys->in['password_confirm']) + if ($input->in['password_change'] != $input->in['password_confirm']) { $message->addError(T('Your password and confirm password do not match')); } } - $userapi->set('password', $bugsys->in['password_change']); + $userapi->set('password', $input->in['password_change']); } - $userapi->set('displayname', $bugsys->in['displayname']); - $userapi->set('showemail', $bugsys->in['showemail']); - $userapi->set('showcolors', $bugsys->in['showcolors']); - $userapi->set('languageid', $bugsys->in['languageid']); - $userapi->set('timezone', $bugsys->in['timezone']); - $userapi->set('usedst', $bugsys->in['usedst']); - $userapi->set('hidestatuses', $bugsys->in['hidestatuses']); - $userapi->set('defaultsortkey', $bugsys->in['defaultsortkey']); - $userapi->set('defaultsortas', $bugsys->in['defaultsortas']); + $userapi->set('displayname', $input->in['displayname']); + $userapi->set('showemail', $input->in['showemail']); + $userapi->set('showcolors', $input->in['showcolors']); + $userapi->set('languageid', $input->in['languageid']); + $userapi->set('timezone', $input->in['timezone']); + $userapi->set('usedst', $input->in['usedst']); + $userapi->set('hidestatuses', $input->in['hidestatuses']); + $userapi->set('defaultsortkey', $input->in['defaultsortkey']); + $userapi->set('defaultsortas', $input->in['defaultsortas']); $userapi->set('columnoptions', $input->inputClean('columnoptions', TYPE_UINT)); // ------------------------------------------------------------------- // copy fields - $userinfo['displayname'] = $bugsys->in['displayname']; - $userinfo['showemail'] = $bugsys->in['showemail']; - $userinfo['showcolors'] = $bugsys->in['showcolors']; - $userinfo['languageid'] = $bugsys->in['languageid']; - $userinfo['timezone'] = $bugsys->in['timezone']; - $userinfo['usedst'] = $bugsys->in['usedst']; - $userinfo['hidestatuses'] = $bugsys->in['hidestatuses']; - $userinfo['defaultsorkey'] = $bugsys->in['defaultsorkey']; - $userinfo['defaultsortas'] = $bugsys->in['defaultsortas']; - $userinfo['columnoptions'] = $bugsys->in['columnoptions']; + $userinfo['displayname'] = $input->in['displayname']; + $userinfo['showemail'] = $input->in['showemail']; + $userinfo['showcolors'] = $input->in['showcolors']; + $userinfo['languageid'] = $input->in['languageid']; + $userinfo['timezone'] = $input->in['timezone']; + $userinfo['usedst'] = $input->in['usedst']; + $userinfo['hidestatuses'] = $input->in['hidestatuses']; + $userinfo['defaultsorkey'] = $input->in['defaultsorkey']; + $userinfo['defaultsortas'] = $input->in['defaultsortas']; + $userinfo['columnoptions'] = $input->in['columnoptions']; - $email = $bugsys->in['email_change']; - $email_confirm = $bugsys->in['email_confirm']; + $email = $input->in['email_change']; + $email_confirm = $input->in['email_confirm']; // ------------------------------------------------------------------- // error handling @@ -178,9 +178,9 @@ if ($_POST['do'] == 'update') $db->query("DELETE FROM " . TABLE_PREFIX . "useremail WHERE userid = " . bugdar::$userinfo['userid']); $input->inputClean('emailopts', TYPE_INT); - if (is_array($bugsys->in['emailopts'])) + if (is_array($input->in['emailopts'])) { - foreach ($bugsys->in['emailopts'] AS $relation => $bitarr) + foreach ($input->in['emailopts'] AS $relation => $bitarr) { $bitmask = 0; if (is_array($bitarr)) @@ -217,7 +217,7 @@ if ($_REQUEST['do'] == 'modify') } $checked = array(); - if (!is_array($bugsys->in['emailopts'])) + if (!is_array($input->in['emailopts'])) { $options = $db->query("SELECT * FROM " . TABLE_PREFIX . "useremail WHERE userid = " . bugdar::$userinfo['userid']); foreach ($options as $opt) @@ -236,7 +236,7 @@ if ($_REQUEST['do'] == 'modify') } else { - $checked = $bugsys->in['emailopts']; + $checked = $input->in['emailopts']; foreach ($checked AS $key1 => $value1) { foreach ($value1 AS $key2 => $value2) @@ -252,7 +252,7 @@ if ($_REQUEST['do'] == 'modify') $columns = array(); $columnOptions = ''; require_once('./includes/class_sort.php'); - if (!is_array($bugsys->in['columnoptions'])) + if (!is_array($input->in['columnoptions'])) { foreach (ListSorter::fetch_by_text(false) AS $column => $name) { @@ -269,7 +269,7 @@ if ($_REQUEST['do'] == 'modify') } else { - $columns = $bugsys->in['columnoptions']; + $columns = $input->in['columnoptions']; foreach (ListSorter::fetch_by_text(false) AS $column => $name) { eval('$columnOptions .= "' . $template->fetch('userctrl_column') . '";'); -- 2.43.5