From 62cee7f2b14f292892c902c1af0b99041bae9f8b Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 21 Aug 2008 22:18:38 -0400 Subject: [PATCH] Changing BSApi->objdata[] to BSApi->record[] --- admin/automation.php | 30 +++++++++---------- admin/field.php | 28 +++++++++--------- admin/language.php | 2 +- admin/priority.php | 8 ++--- admin/resolution.php | 8 ++--- admin/severity.php | 8 ++--- admin/status.php | 10 +++---- admin/user.php | 36 +++++++++++------------ admin/usergroup.php | 12 ++++---- attachment.php | 2 +- editcomment.php | 6 ++-- editreport.php | 6 ++-- includes/api_field.php | 2 +- includes/api_user.php | 4 +-- includes/auth/auth.php | 2 +- includes/class_notification.php | 2 +- locale/en_US/emails/passwordreset.xml.tpl | 2 +- login.php | 8 ++--- newreport.php | 2 +- 19 files changed, 89 insertions(+), 89 deletions(-) diff --git a/admin/automation.php b/admin/automation.php index bfd2fee..0756350 100644 --- a/admin/automation.php +++ b/admin/automation.php @@ -125,7 +125,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') $action->set('actionid', $input->in['actionid']); $action->set_condition(); $action->fetch(); - $action->objdata['fields'] = unserialize($action->objdata['fieldchanges']); + $action->record['fields'] = unserialize($action->record['fieldchanges']); } else { @@ -139,30 +139,30 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') if ($edit) { - $admin->form_hidden_field('actionid', $action->objdata['actionid']); + $admin->form_hidden_field('actionid', $action->record['actionid']); } $admin->table_start(); $admin->table_head(($add ? T('New Automation') : T('Edit Automation'))); - $admin->row_input(T('Name'), 'name', $action->objdata['name']); - $admin->row_textarea(T('Description'), 'description', $action->objdata['description']); - $admin->row_textarea(T('Add Comment'), 'comment', $action->objdata['comment']); + $admin->row_input(T('Name'), 'name', $action->record['name']); + $admin->row_textarea(T('Description'), 'description', $action->record['description']); + $admin->row_textarea(T('Add Comment'), 'comment', $action->record['comment']); $admin->row_span(T('Field Changes'), 'thead', 'center'); // ------------------------------------------------------------------- // built-in fields - construct_datastore_select('severity', 'severity', 'severityid', $action->objdata['fields']['builtin']['severity'], true, true); + construct_datastore_select('severity', 'severity', 'severityid', $action->record['fields']['builtin']['severity'], true, true); $admin->row_list(T('Severity'), 'fields[severity]'); - construct_datastore_select('priority', 'priority', 'priorityid', $action->objdata['fields']['builtin']['priority'], true, true); + construct_datastore_select('priority', 'priority', 'priorityid', $action->record['fields']['builtin']['priority'], true, true); $admin->row_list(T('Priority'), 'fields[priority]'); - construct_datastore_select('status', 'status', 'statusid', $action->objdata['fields']['builtin']['status'], true, true); + construct_datastore_select('status', 'status', 'statusid', $action->record['fields']['builtin']['status'], true, true); $admin->row_list(T('Status'), 'fields[status]'); - construct_datastore_select('resolution', 'resolution', 'resolutionid', $action->objdata['fields']['builtin']['resolution'], true, true); + construct_datastore_select('resolution', 'resolution', 'resolutionid', $action->record['fields']['builtin']['resolution'], true, true); $admin->row_list(T('Resolution'), 'fields[resolution]'); $admin->row_span('', 'tcat', 'center'); @@ -175,24 +175,24 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') switch ($field['type']) { case 'input_text': - $admin->row_input($field['name'], "fields[custom][$field[fieldid]]", $action->objdata['fields']['custom']["$field[fieldid]"]); + $admin->row_input($field['name'], "fields[custom][$field[fieldid]]", $action->record['fields']['custom']["$field[fieldid]"]); break; case 'input_checkbox': - $admin->list_item('', -1, (!$action->objdata['fields']['custom']["$field[fieldid]"] OR $action->objdata['fields']['custom']["$field[fieldid]"] == -1)); - $admin->list_item(T('Checked'), 1, ($action->objdata['fields']['custom']["$field[fieldid]"] == 1)); - $admin->list_item(T('Un-Checked'), 0, (isset($action->objdata['fields']['custom']["$field[fieldid]"]) AND $action->objdata['fields']['custom']["$field[fieldid]"] == 0)); + $admin->list_item('', -1, (!$action->record['fields']['custom']["$field[fieldid]"] OR $action->record['fields']['custom']["$field[fieldid]"] == -1)); + $admin->list_item(T('Checked'), 1, ($action->record['fields']['custom']["$field[fieldid]"] == 1)); + $admin->list_item(T('Un-Checked'), 0, (isset($action->record['fields']['custom']["$field[fieldid]"]) AND $action->record['fields']['custom']["$field[fieldid]"] == 0)); $admin->row_list($field['name'], "fields[custom][$field[fieldid]]"); break; case 'select_single': $selectopts = unserialize($field['selects']); - $admin->list_item('', -1, (!isset($action->objdata['fields']['custom']["$field[fieldid]"]) OR $action->objdata['fields']['custom']["$field[fieldid]"] == -1)); + $admin->list_item('', -1, (!isset($action->record['fields']['custom']["$field[fieldid]"]) OR $action->record['fields']['custom']["$field[fieldid]"] == -1)); foreach ($selectopts AS $id => $select) { - $admin->list_item(stripslashes($select), $id, (isset($action->objdata['fields']['custom']["$field[fieldid]"]) AND $action->objdata['fields']['custom']["$field[fieldid]"] == $id)); + $admin->list_item(stripslashes($select), $id, (isset($action->record['fields']['custom']["$field[fieldid]"]) AND $action->record['fields']['custom']["$field[fieldid]"] == $id)); } $admin->row_list($field['name'], "fields[custom][$field[fieldid]]"); break; diff --git a/admin/field.php b/admin/field.php index b07b033..2d5f8f3 100644 --- a/admin/field.php +++ b/admin/field.php @@ -78,7 +78,7 @@ if ($_REQUEST['do'] == 'update') $edit = true; $add = false; - $type = $field->objdata['type']; + $type = $field->record['type']; } else { @@ -183,12 +183,12 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') $field->set_condition(); $field->fetch(); - $admin->form_hidden_field('fieldid', $field->objdata['fieldid']); + $admin->form_hidden_field('fieldid', $field->record['fieldid']); } if (!$typeselect) { - $type = (($add) ? $input->in['type'] : $field->objdata['type']); + $type = (($add) ? $input->in['type'] : $field->record['type']); } // show type selector @@ -211,10 +211,10 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') // global fields $admin->row_span(T('Global Fields'), 'thead', 'center'); $admin->row_text(T('Field Type'), FieldAPI::field_types($type)); - $admin->row_input(T('Display Name'), 'name', $field->objdata['name']); - $admin->row_textarea(T('Description'), 'description', $field->objdata['description']); - $admin->row_yesno(T('Required'), 'required', $field->objdata['required']); - $admin->row_yesno(T('Can Be Searched'), 'cansearch', ((isset($field->objdata['cansearch'])) ? $field->objdata['cansearch'] : true)); + $admin->row_input(T('Display Name'), 'name', $field->record['name']); + $admin->row_textarea(T('Description'), 'description', $field->record['description']); + $admin->row_yesno(T('Required'), 'required', $field->record['required']); + $admin->row_yesno(T('Can Be Searched'), 'cansearch', ((isset($field->record['cansearch'])) ? $field->record['cansearch'] : true)); // type-specific fields $admin->row_span(T('Type-Specific Fields'), 'thead', 'center'); @@ -222,18 +222,18 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') switch ($type) { case 'input_text': - $admin->row_input(T('Default Value'), 'defaultvalue', $field->objdata['defaultvalue']); - $admin->row_input(T('Regular Expression Match'), 'regexmatch', $field->objdata['regexmatch']); - $admin->row_input(T('Maximum Length'), 'maxlength', $field->objdata['maxlength'], 2, 10); + $admin->row_input(T('Default Value'), 'defaultvalue', $field->record['defaultvalue']); + $admin->row_input(T('Regular Expression Match'), 'regexmatch', $field->record['regexmatch']); + $admin->row_input(T('Maximum Length'), 'maxlength', $field->record['maxlength'], 2, 10); break; case 'input_checkbox': - $admin->row_yesno(T('Checked By Default'), 'defaultvalue', $field->objdata['defaultvalue']); + $admin->row_yesno(T('Checked By Default'), 'defaultvalue', $field->record['defaultvalue']); break; case 'select_single': - $admin->row_textarea(T('Selection Values'), 'selects', stripslashes(implode("\n", (array)unserialize($field->objdata['selects'])))); - $admin->row_yesno(T('Make the First Option Default'), 'usedefault', $field->objdata['usedefault']); + $admin->row_textarea(T('Selection Values'), 'selects', stripslashes(implode("\n", (array)unserialize($field->record['selects'])))); + $admin->row_yesno(T('Make the First Option Default'), 'usedefault', $field->record['usedefault']); break; } @@ -245,7 +245,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit') if ($edit) { - $perms = $db->query("SELECT usergroupid, mask FROM " . TABLE_PREFIX . "bugfieldpermission WHERE fieldid = " . $field->objdata['fieldid']); + $perms = $db->query("SELECT usergroupid, mask FROM " . TABLE_PREFIX . "bugfieldpermission WHERE fieldid = " . $field->record['fieldid']); foreach ($perms as $perm) { $permissions["$perm[usergroupid]"] = $perm['mask']; diff --git a/admin/language.php b/admin/language.php index 9967cec..412e269 100644 --- a/admin/language.php +++ b/admin/language.php @@ -131,7 +131,7 @@ if ($_REQUEST['do'] == 'edit') $languageapi->set_condition(); $languageapi->fetch(); - $language =& $languageapi->objdata; + $language =& $languageapi->record; $admin->page_start(T('Edit Language')); diff --git a/admin/priority.php b/admin/priority.php index 5883b2f..c4ca270 100755 --- a/admin/priority.php +++ b/admin/priority.php @@ -121,11 +121,11 @@ if ($_REQUEST['do'] == 'edit') $admin->page_start(T('Edit Priority')); $admin->form_start('priority.php', 'update'); - $admin->form_hidden_field('priorityid', $priority->objdata['priorityid']); + $admin->form_hidden_field('priorityid', $priority->record['priorityid']); $admin->table_start(); - $admin->table_head(sprintf(T('Edit Priority `%1$s` (id: %2$s)'), $priority->objdata['priority'], $priority->objdata['priorityid'])); - $admin->row_input(T('Priority Title
The title of this priority flag (eg: `Slated for Development` or `Address Now`)
'), 'priority', $priority->objdata['priority']); - $admin->row_input(T('Display Order
The order in which the priorities are displayed. The higher the number, the lower down in the list it is.
'), 'displayorder', $priority->objdata['displayorder']); + $admin->table_head(sprintf(T('Edit Priority `%1$s` (id: %2$s)'), $priority->record['priority'], $priority->record['priorityid'])); + $admin->row_input(T('Priority Title
The title of this priority flag (eg: `Slated for Development` or `Address Now`)
'), 'priority', $priority->record['priority']); + $admin->row_input(T('Display Order
The order in which the priorities are displayed. The higher the number, the lower down in the list it is.
'), 'displayorder', $priority->record['displayorder']); $admin->row_submit(); $admin->table_end(); $admin->form_end(); diff --git a/admin/resolution.php b/admin/resolution.php index 0c7fe3f..1ba5ee5 100755 --- a/admin/resolution.php +++ b/admin/resolution.php @@ -121,11 +121,11 @@ if ($_REQUEST['do'] == 'edit') $admin->page_start(T('Edit Resolution')); $admin->form_start('resolution.php', 'update'); - $admin->form_hidden_field('resolutionid', $resolution->objdata['resolutionid']); + $admin->form_hidden_field('resolutionid', $resolution->record['resolutionid']); $admin->table_start(); - $admin->table_head(sprintf(T('Edit Resolution - %1$s (id: %2$s)'), $resolution->objdata['resolution'], $resolution->objdata['resolutionid'])); - $admin->row_input(T('Resolution Title
The title of this resolution flag (eg: `Fixed` or `Bogus`)
'), 'resolution', $resolution->objdata['resolution']); - $admin->row_input(T('Display Order
The order in which the resolutions are displayed. The higher the number, the lower down in the list it is.
'), 'displayorder', $resolution->objdata['displayorder']); + $admin->table_head(sprintf(T('Edit Resolution - %1$s (id: %2$s)'), $resolution->record['resolution'], $resolution->record['resolutionid'])); + $admin->row_input(T('Resolution Title
The title of this resolution flag (eg: `Fixed` or `Bogus`)
'), 'resolution', $resolution->record['resolution']); + $admin->row_input(T('Display Order
The order in which the resolutions are displayed. The higher the number, the lower down in the list it is.
'), 'displayorder', $resolution->record['displayorder']); $admin->row_submit(); $admin->table_end(); $admin->form_end(); diff --git a/admin/severity.php b/admin/severity.php index 290b078..6e80b36 100755 --- a/admin/severity.php +++ b/admin/severity.php @@ -121,11 +121,11 @@ if ($_REQUEST['do'] == 'edit') $admin->page_start(T('Edit Severity')); $admin->form_start('severity.php', 'update'); - $admin->form_hidden_field('severityid', $severity->objdata['severityid']); + $admin->form_hidden_field('severityid', $severity->record['severityid']); $admin->table_start(); - $admin->table_head(sprintf(T('Edit Severity - %1$s (id: %2$s)'), $severity->objdata['severity'], $severity->objdata['severityid'])); - $admin->row_input(T('Severity Title
The title of this severity flag (eg: `Major` or `Critical`)
'), 'severity', $severity->objdata['severity']); - $admin->row_input(T('Display Order
The order in which the severities are displayed. The higher the number, the lower down in the list it is.
'), 'displayorder', $severity->objdata['displayorder']); + $admin->table_head(sprintf(T('Edit Severity - %1$s (id: %2$s)'), $severity->record['severity'], $severity->record['severityid'])); + $admin->row_input(T('Severity Title
The title of this severity flag (eg: `Major` or `Critical`)
'), 'severity', $severity->record['severity']); + $admin->row_input(T('Display Order
The order in which the severities are displayed. The higher the number, the lower down in the list it is.
'), 'displayorder', $severity->record['displayorder']); $admin->row_submit(); $admin->table_end(); $admin->form_end(); diff --git a/admin/status.php b/admin/status.php index 5a81e07..77056e2 100755 --- a/admin/status.php +++ b/admin/status.php @@ -124,12 +124,12 @@ if ($_REQUEST['do'] == 'edit') $admin->page_start(T('Edit Status')); $admin->form_start('status.php', 'update'); - $admin->form_hidden_field('statusid', $status->objdata['statusid']); + $admin->form_hidden_field('statusid', $status->record['statusid']); $admin->table_start(); - $admin->table_head(sprintf(T('Edit Status - %1$s (id: %2$s)'), $status->objdata['status'], $status->objdata['statusid'])); - $admin->row_input(T('Status Title
The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)
'), 'status', $status->objdata['status']); - $admin->row_input(T('Display Order
The order in which the statuses ar displayed.
'), 'displayorder', $status->objdata['displayorder']); - $admin->row_input(T('Status Color
The color of the status. This will be displayed on bug listings page to make viewing easier. Note: you must enter the # sign if you are using HEX values.
'), 'color', $status->objdata['color']); + $admin->table_head(sprintf(T('Edit Status - %1$s (id: %2$s)'), $status->record['status'], $status->record['statusid'])); + $admin->row_input(T('Status Title
The title of this status flag (eg: `Confirmed` or `Closed (Fixed)`)
'), 'status', $status->record['status']); + $admin->row_input(T('Display Order
The order in which the statuses ar displayed.
'), 'displayorder', $status->record['displayorder']); + $admin->row_input(T('Status Color
The color of the status. This will be displayed on bug listings page to make viewing easier. Note: you must enter the # sign if you are using HEX values.
'), 'color', $status->record['color']); $admin->row_submit(); $admin->table_end(); $admin->form_end(); diff --git a/admin/user.php b/admin/user.php index 5e82fec..f715a95 100644 --- a/admin/user.php +++ b/admin/user.php @@ -153,7 +153,7 @@ if ($_POST['do'] == 'update') } } - $admin->redirect('user.php?do=edit&userid=' . $user->objdata['userid']); + $admin->redirect('user.php?do=edit&userid=' . $user->record['userid']); } // ################################################################### @@ -185,27 +185,27 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add') if ($edit) { - $admin->form_hidden_field('userid', $user->objdata['userid']); + $admin->form_hidden_field('userid', $user->record['userid']); } $admin->table_start(); - $admin->table_head(($add ? T('Add User') : sprintf(T('Edit User (userid: %1$s)'), $user->objdata['userid']))); + $admin->table_head(($add ? T('Add User') : sprintf(T('Edit User (userid: %1$s)'), $user->record['userid']))); - $admin->row_input(T('Display Name'), 'displayname', $user->objdata['displayname']); - $admin->row_input(T('Email'), 'email', $user->objdata['email']); + $admin->row_input(T('Display Name'), 'displayname', $user->record['displayname']); + $admin->row_input(T('Email'), 'email', $user->record['email']); $admin->row_input(($add ? T('Password') : T('Password (Leave blank for no change)')), 'password'); foreach (bugdar::$datastore['usergroup'] AS $group) { - $admin->list_item($group['title'], $group['usergroupid'], ($user->objdata['usergroupid'] == $group['usergroupid'])); + $admin->list_item($group['title'], $group['usergroupid'], ($user->record['usergroupid'] == $group['usergroupid'])); } $admin->row_list(T('Primary Usergroup'), 'usergroupid'); - $ids = explode(',', $user->objdata['groupids']); + $ids = explode(',', $user->record['groupids']); foreach (bugdar::$datastore['usergroup'] AS $id => $group) { - if ($id == $user->objdata['usergroupid']) + if ($id == $user->record['usergroupid']) { continue; } @@ -213,25 +213,25 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add') } $admin->row_checkbox(T('Secondary Usergroups'), 'groupids'); - $admin->row_yesno(T('Show Email Publicly'), 'showemail', $user->objdata['showemail']); - $admin->row_yesno(T('Show Status Colors on Bug Listings'), 'showcolors', $user->objdata['showcolors']); + $admin->row_yesno(T('Show Email Publicly'), 'showemail', $user->record['showemail']); + $admin->row_yesno(T('Show Status Colors on Bug Listings'), 'showcolors', $user->record['showcolors']); foreach (bugdar::$datastore['language'] AS $language) { - $admin->list_item($language['title'], $language['languageid'], ($user->objdata['languageid'] == $language['languageid'])); + $admin->list_item($language['title'], $language['languageid'], ($user->record['languageid'] == $language['languageid'])); } $admin->row_list(T('Language'), 'languageid'); foreach ($datef->fetch_timezone_list() AS $value => $string) { - $admin->list_item($string, $value, ($user->objdata['timezone'] == $value)); + $admin->list_item($string, $value, ($user->record['timezone'] == $value)); } $admin->row_list(T('Timezone'), 'timezone'); - $admin->row_yesno(T('Observe Daylight Savings Time (DST)'), 'usedst', $user->objdata['usedst']); - $admin->row_text(T('Hidden Statuses on Bug Listing'), construct_option_select('hidestatuses', bugdar::$datastore['status'], $user->objdata['hidestatuses'], 'statusid', 'status', 0, true)); - $admin->row_text(T('Default Sort Order Column'), construct_option_select('defaultsortkey', ListSorter::fetch_by_text(false), $user->objdata['defaultsortkey'])); - $admin->row_text(T('Default Sort Order Direction'), construct_option_select('defaultsortas', ListSorter::fetch_as_text(false), $user->objdata['defaultsortas'])); + $admin->row_yesno(T('Observe Daylight Savings Time (DST)'), 'usedst', $user->record['usedst']); + $admin->row_text(T('Hidden Statuses on Bug Listing'), construct_option_select('hidestatuses', bugdar::$datastore['status'], $user->record['hidestatuses'], 'statusid', 'status', 0, true)); + $admin->row_text(T('Default Sort Order Column'), construct_option_select('defaultsortkey', ListSorter::fetch_by_text(false), $user->record['defaultsortkey'])); + $admin->row_text(T('Default Sort Order Direction'), construct_option_select('defaultsortas', ListSorter::fetch_as_text(false), $user->record['defaultsortas'])); $admin->table_end(); @@ -239,9 +239,9 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add') $admin->table_start(false); $admin->table_head(T('Email Options'), 6); - if ($user->objdata['userid']) + if ($user->record['userid']) { - $options = $db->query("SELECT * FROM " . TABLE_PREFIX . "useremail WHERE userid = " . $user->objdata['userid']); + $options = $db->query("SELECT * FROM " . TABLE_PREFIX . "useremail WHERE userid = " . $user->record['userid']); foreach ($options as $opt) { foreach ($bugsys->emailoptions['notifications'] AS $name => $notif) diff --git a/admin/usergroup.php b/admin/usergroup.php index 6818c92..70b5242 100755 --- a/admin/usergroup.php +++ b/admin/usergroup.php @@ -139,11 +139,11 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == if ($clone) { - $admin->form_hidden_field('cloneid', $usergroup->objdata['usergroupid']); + $admin->form_hidden_field('cloneid', $usergroup->record['usergroupid']); } else { - $admin->form_hidden_field('usergroupid', $usergroup->objdata['usergroupid']); + $admin->form_hidden_field('usergroupid', $usergroup->record['usergroupid']); } } else @@ -154,8 +154,8 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == // Details $admin->table_start(); $admin->table_head(T('Usergroup Details')); - $admin->row_input(T('Usergroup Title'), 'title', (($add AND $clone) ? '' : $bugsys->sanitize($usergroup->objdata['title']))); - $admin->row_input(T('Display Title
This is the title that others will be able to see when comments are posted.
'), 'displaytitle', (($add AND $clone) ? '' : $bugsys->sanitize($usergroup->objdata['displaytitle']))); + $admin->row_input(T('Usergroup Title'), 'title', (($add AND $clone) ? '' : $bugsys->sanitize($usergroup->record['title']))); + $admin->row_input(T('Display Title
This is the title that others will be able to see when comments are posted.
'), 'displaytitle', (($add AND $clone) ? '' : $bugsys->sanitize($usergroup->record['displaytitle']))); $admin->table_end(); // Permission @@ -168,7 +168,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == $admin->row_span($group, 'thead', 'center'); foreach ($settings AS $setting => $name) { - $admin->row_yesno($name, "perm[$setting]", ($usergroup->objdata['permissions'] & $bugsys->permissions["$setting"])); + $admin->row_yesno($name, "perm[$setting]", ($usergroup->record['permissions'] & $bugsys->permissions["$setting"])); } } @@ -180,7 +180,7 @@ if ($_REQUEST['do'] == 'add' OR $_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == if ($edit OR $clone) { - $perms = $db->query("SELECT fieldid, mask FROM " . TABLE_PREFIX . "bugfieldpermission WHERE usergroupid = " . $usergroup->objdata['usergroupid']); + $perms = $db->query("SELECT fieldid, mask FROM " . TABLE_PREFIX . "bugfieldpermission WHERE usergroupid = " . $usergroup->record['usergroupid']); foreach ($perms as $perm) { $permissions["$perm[fieldid]"] = $perm['mask']; diff --git a/attachment.php b/attachment.php index 97c2bcc..2ccac17 100755 --- a/attachment.php +++ b/attachment.php @@ -221,7 +221,7 @@ if ($_POST['do'] == 'update') $attachapi->fetch(); - $log->add_data(true, $attachapi->objdata, array('attachment'), true, 'attachment'); + $log->add_data(true, $attachapi->record, array('attachment'), true, 'attachment'); $attachapi->set('description', $input->in['description']); $attachapi->set('obsolete', $input->in['obsolete']); diff --git a/editcomment.php b/editcomment.php index 8480833..ed3a9e4 100644 --- a/editcomment.php +++ b/editcomment.php @@ -38,7 +38,7 @@ $commentapi->set('commentid', $input->in['commentid']); $commentapi->set_condition(); $commentapi->fetch(); -$comment =& $commentapi->objdata; +$comment =& $commentapi->record; $bug = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = $comment[bugid]"); @@ -147,7 +147,7 @@ if ($_POST['do'] == 'update') $log->set_bugid($bug['bugid']); $log->set_commentid($comment['commentid']); - $log->add_data(true, $commentapi->objdata, array('comment', 'hidden'), false, 'comment'); + $log->add_data(true, $commentapi->record, array('comment', 'hidden'), false, 'comment'); $log->add_data(false, $commentapi->values, array('comment', 'hidden'), false, 'comment'); $lastgood = $db->queryFirst(" @@ -195,7 +195,7 @@ if ($_REQUEST['do'] == 'edit') $commenter->set('userid', $comment['userid']); $commenter->set_condition(); $commenter->fetch(); - $commenter = $commenter->objdata; + $commenter = $commenter->record; } $comment['postby'] = construct_user_display($commenter); $comment['comment'] = $bugsys->sanitize($comment['comment']); diff --git a/editreport.php b/editreport.php index 4f9b38f..9c55f87 100644 --- a/editreport.php +++ b/editreport.php @@ -98,7 +98,7 @@ if ($_POST['do'] == 'update') $message->errorPermission(); } - $log->add_data(true, $bugapi->objdata, $log->getCommonFields(), true); + $log->add_data(true, $bugapi->record, $log->getCommonFields(), true); // ------------------------------------------------------------------- // handle automations @@ -152,7 +152,7 @@ if ($_POST['do'] == 'update') $comment->insert(); // we redefine the bug data later, but it needs to be here in order to generate the user list - $notif->set_bug_data($bugapi->objdata); + $notif->set_bug_data($bugapi->record); $notif->send_new_comment_notice($comment->values); $bugapi->set('lastposttime', $comment->values['dateline']); @@ -205,7 +205,7 @@ if ($_POST['do'] == 'update') // ------------------------------------------------------------------- // handle logging and perform updates - $notif->set_bug_data($bugapi->objdata, array_merge($bugapi->objdata, $bugapi->values)); + $notif->set_bug_data($bugapi->record, array_merge($bugapi->record, $bugapi->values)); $log->add_data(false, $bugapi->values, $log->getCommonFields(), true); if (!$message->hasErrors()) diff --git a/includes/api_field.php b/includes/api_field.php index cb30369..a58dc1d 100644 --- a/includes/api_field.php +++ b/includes/api_field.php @@ -159,7 +159,7 @@ class FieldAPI extends API function verify_selects() { static $serialized; - if ($this->values['type'] == 'select_single' OR $this->objdata['type'] == 'select_single') + if ($this->values['type'] == 'select_single' OR $this->record['type'] == 'select_single') { $this->registry->debug('it works'); // can't use explode() here because explode() returns !empty() when splitting an empty string diff --git a/includes/api_user.php b/includes/api_user.php index e9c5670..a78c07e 100644 --- a/includes/api_user.php +++ b/includes/api_user.php @@ -230,12 +230,12 @@ class UserAPI extends BSApi if ($this->values['password'] == '') { - $this->set('password', $this->objdata['password']); + $this->set('password', $this->record['password']); } else { $this->registry->debug("updating password = true"); - $this->set('password', md5(md5($this->values['password']) . md5($this->objdata['salt']))); + $this->set('password', md5(md5($this->values['password']) . md5($this->record['salt']))); } } diff --git a/includes/auth/auth.php b/includes/auth/auth.php index b4d3fbc..c1bffe0 100644 --- a/includes/auth/auth.php +++ b/includes/auth/auth.php @@ -263,7 +263,7 @@ class Authentication $user->update(); $user->fetch(); - return $user->objdata; + return $user->record; } else { diff --git a/includes/class_notification.php b/includes/class_notification.php index 0118906..5d71cea 100644 --- a/includes/class_notification.php +++ b/includes/class_notification.php @@ -201,7 +201,7 @@ class NotificationCenter // ################################################################### /** * Sends the appropriate emails for changes to bugs. This function - * works a lot like the Logging class by taking BugAPI->objdata and + * works a lot like the Logging class by taking BugAPI->record and * BugAPI->values and then comparing the two arries and sending emails * with the differences. * diff --git a/locale/en_US/emails/passwordreset.xml.tpl b/locale/en_US/emails/passwordreset.xml.tpl index 988f40a..8d43d06 100644 --- a/locale/en_US/emails/passwordreset.xml.tpl +++ b/locale/en_US/emails/passwordreset.xml.tpl @@ -1,6 +1,6 @@ {bugdar::$options['trackertitle']} Password Reset - Hi {$user->objdata['displayname']}, + Hi {$user->record['displayname']}, You requested this lost password email at the {bugdar::$options['trackertitle']} bug tracker. To reset your password, simply click the link below (or paste it into your browser window exactly) and enter a new password. diff --git a/login.php b/login.php index 1e77a3c..0bdb0c2 100755 --- a/login.php +++ b/login.php @@ -117,17 +117,17 @@ if ($_POST['do'] == 'sendpw') else { $activator = BSFunctions::random(25); - $db->query("INSERT INTO " . TABLE_PREFIX . "passwordreset (activatorid, dateline, userid) VALUES ('" . $activator . "', " . TIMENOW . ", " . $user->objdata['userid'] . ")"); + $db->query("INSERT INTO " . TABLE_PREFIX . "passwordreset (activatorid, dateline, userid) VALUES ('" . $activator . "', " . TIMENOW . ", " . $user->record['userid'] . ")"); - eval('$email = "' . $template->fetch(FetchEmailPath('passwordreset.xml', bugdar::$datastore['language'][$user->objdata['languageid']]['langcode'])) . '";'); + eval('$email = "' . $template->fetch(FetchEmailPath('passwordreset.xml', bugdar::$datastore['language'][$user->record['languageid']]['langcode'])) . '";'); $email = $bugsys->xml->parse($email); $mail->setSubject($email['email']['subject']['value']); $mail->setBodyText($email['email']['bodyText']['value']); - $mail->send($user->objdata['email'], $user->objdata['displayname']); + $mail->send($user->record['email'], $user->record['displayname']); - $message->message(sprintf(T('An email has been dispatched to %1$s that contains instructions on how to reset your password.'), $user->objdata['email'])); + $message->message(sprintf(T('An email has been dispatched to %1$s that contains instructions on how to reset your password.'), $user->record['email'])); } } diff --git a/newreport.php b/newreport.php index 5a2e7af..a570a94 100755 --- a/newreport.php +++ b/newreport.php @@ -121,7 +121,7 @@ if ($_POST['do'] == 'insert') $bug->set('hiddenlastpostbyname', bugdar::$userinfo['displayname']); $bug->update(); - $notif->set_bug_data($bug->objdata); + $notif->set_bug_data($bug->record); $notif->finalize(); -- 2.43.5