summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-03-07 00:42:09 +0100
committerDylan William Hardison <dylan@hardison.net>2018-03-07 00:42:09 +0100
commit51c442fb9e1eb1c779a5ba18105335fe54eb234c (patch)
treee3d0f9e0e8758237501950af022c976c450c53fe /Bugzilla
parent517805794fc99737fb69c4e0cdae7c045a88eb7d (diff)
downloadbugzilla-51c442fb9e1eb1c779a5ba18105335fe54eb234c.tar.gz
bugzilla-51c442fb9e1eb1c779a5ba18105335fe54eb234c.tar.xz
Revert Bug 1273381
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Attachment.pm7
-rw-r--r--Bugzilla/Bug.pm8
-rw-r--r--Bugzilla/BugUrl.pm7
-rw-r--r--Bugzilla/BugUserLastVisit.pm8
-rw-r--r--Bugzilla/Classification.pm11
-rw-r--r--Bugzilla/Comment.pm7
-rw-r--r--Bugzilla/Comment/TagWeights.pm13
-rw-r--r--Bugzilla/Component.pm7
-rw-r--r--Bugzilla/Field.pm11
-rw-r--r--Bugzilla/Field/Choice.pm10
-rw-r--r--Bugzilla/Flag.pm7
-rw-r--r--Bugzilla/FlagType.pm9
-rw-r--r--Bugzilla/Group.pm7
-rw-r--r--Bugzilla/Keyword.pm7
-rw-r--r--Bugzilla/Milestone.pm8
-rw-r--r--Bugzilla/Object.pm3
-rw-r--r--Bugzilla/Product.pm7
-rw-r--r--Bugzilla/Search/Recent.pm11
-rw-r--r--Bugzilla/Search/Saved.pm7
-rw-r--r--Bugzilla/User.pm9
-rw-r--r--Bugzilla/User/APIKey.pm12
-rw-r--r--Bugzilla/User/Session.pm9
-rw-r--r--Bugzilla/Version.pm8
-rw-r--r--Bugzilla/Whine.pm8
-rw-r--r--Bugzilla/Whine/Query.pm9
-rw-r--r--Bugzilla/Whine/Schedule.pm7
26 files changed, 14 insertions, 203 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index 4498fedf2..0bdb50c9a 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -113,13 +113,6 @@ use constant UPDATE_VALIDATORS => {
#### Accessors ######
###############################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
=pod
=head2 Instance Properties
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 5e45b67b1..ee48ed7a2 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -54,15 +54,7 @@ my %CLEANUP;
use constant DB_TABLE => 'bugs';
use constant ID_FIELD => 'bug_id';
-
use constant NAME_FIELD => 'alias';
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
use constant LIST_ORDER => ID_FIELD;
# Bugs have their own auditing table, bugs_activity.
use constant AUDIT_CREATES => 0;
diff --git a/Bugzilla/BugUrl.pm b/Bugzilla/BugUrl.pm
index 9e5750c75..4724ae71a 100644
--- a/Bugzilla/BugUrl.pm
+++ b/Bugzilla/BugUrl.pm
@@ -74,13 +74,6 @@ use constant SUB_CLASSES => qw(
#### Accessors ######
###############################
-use Class::XSAccessor {
- accessors => {
- name => __PACKAGE__->NAME_FIELD,
- id => __PACKAGE__->ID_FIELD,
- },
-};
-
sub class { return $_[0]->{class} }
sub bug_id { return $_[0]->{bug_id} }
diff --git a/Bugzilla/BugUserLastVisit.pm b/Bugzilla/BugUserLastVisit.pm
index 635cb4392..f40ea17d3 100644
--- a/Bugzilla/BugUserLastVisit.pm
+++ b/Bugzilla/BugUserLastVisit.pm
@@ -30,17 +30,11 @@ use constant { AUDIT_CREATES => 0,
AUDIT_REMOVES => 0,
USE_MEMCACHED => 0 };
-use Class::XSAccessor {
- accessors => {
- name => __PACKAGE__->NAME_FIELD,
- id => __PACKAGE__->ID_FIELD,
- },
-};
-
#####################################################################
# Provide accessors for our columns
#####################################################################
+sub id { return $_[0]->{id} }
sub bug_id { return $_[0]->{bug_id} }
sub user_id { return $_[0]->{user_id} }
sub last_visit_ts { return $_[0]->{last_visit_ts} }
diff --git a/Bugzilla/Classification.pm b/Bugzilla/Classification.pm
index e34f8dde8..a931767d2 100644
--- a/Bugzilla/Classification.pm
+++ b/Bugzilla/Classification.pm
@@ -48,17 +48,6 @@ use constant VALIDATORS => {
};
###############################
-#### Accessors ######
-###############################
-
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
-###############################
#### Constructors #####
###############################
diff --git a/Bugzilla/Comment.pm b/Bugzilla/Comment.pm
index 86094db59..f9a6f7d3a 100644
--- a/Bugzilla/Comment.pm
+++ b/Bugzilla/Comment.pm
@@ -228,13 +228,6 @@ sub preload {
#### Accessors ######
###############################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub already_wrapped { return $_[0]->{'already_wrapped'}; }
sub body { return $_[0]->{'thetext'}; }
sub bug_id { return $_[0]->{'bug_id'}; }
diff --git a/Bugzilla/Comment/TagWeights.pm b/Bugzilla/Comment/TagWeights.pm
index ba7bdfc5b..4919244ce 100644
--- a/Bugzilla/Comment/TagWeights.pm
+++ b/Bugzilla/Comment/TagWeights.pm
@@ -39,18 +39,7 @@ use constant VALIDATORS => { };
# There's no gain to caching these objects
use constant USE_MEMCACHED => 0;
-###############################
-#### Accessors ######
-###############################
-
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- tag => __PACKAGE__->NAME_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
+sub tag { return $_[0]->{'tag'} }
sub weight { return $_[0]->{'weight'} }
sub set_weight { $_[0]->set('weight', $_[1]); }
diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm
index 7e294ba74..78e144a55 100644
--- a/Bugzilla/Component.pm
+++ b/Bugzilla/Component.pm
@@ -447,13 +447,6 @@ sub is_active { return $_[0]->{'isactive'}; }
sub triage_owner_id { return $_[0]->{'triage_owner_id'} }
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
##############################################
# Implement Bugzilla::Field::ChoiceInterface #
##############################################
diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm
index d18356d66..837e1c0de 100644
--- a/Bugzilla/Field.pm
+++ b/Bugzilla/Field.pm
@@ -432,17 +432,6 @@ sub _check_reverse_desc {
sub _check_is_mandatory { return $_[1] ? 1 : 0; }
-###############################
-#### Accessors ######
-###############################
-
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
=pod
=head2 Instance Properties
diff --git a/Bugzilla/Field/Choice.pm b/Bugzilla/Field/Choice.pm
index 9dd7b3ccf..10f8f38e6 100644
--- a/Bugzilla/Field/Choice.pm
+++ b/Bugzilla/Field/Choice.pm
@@ -119,16 +119,6 @@ sub new {
$class->SUPER::new(@_);
}
-###############################
-#### Accessors ######
-###############################
-
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
#########################
# Database Manipulation #
#########################
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index 8ace32be6..625794974 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -104,12 +104,6 @@ use constant UPDATE_VALIDATORS => {
#### Accessors ######
###############################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- },
-};
-
=head2 METHODS
=over
@@ -146,6 +140,7 @@ Returns the timestamp when the flag was last modified.
=cut
+sub id { return $_[0]->{'id'}; }
sub name { return $_[0]->type->name; }
sub type_id { return $_[0]->{'type_id'}; }
sub bug_id { return $_[0]->{'bug_id'}; }
diff --git a/Bugzilla/FlagType.pm b/Bugzilla/FlagType.pm
index 6aaa79bd1..c973ea662 100644
--- a/Bugzilla/FlagType.pm
+++ b/Bugzilla/FlagType.pm
@@ -210,13 +210,6 @@ sub update {
#### Accessors ######
###############################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
=head2 METHODS
=over
@@ -269,6 +262,8 @@ Returns the sortkey of the flagtype.
=cut
+sub id { return $_[0]->{'id'}; }
+sub name { return $_[0]->{'name'}; }
sub description { return $_[0]->{'description'}; }
sub cc_list { return $_[0]->{'cc_list'}; }
sub target_type { return $_[0]->{'target_type'} eq 'b' ? 'bug' : 'attachment'; }
diff --git a/Bugzilla/Group.pm b/Bugzilla/Group.pm
index 6d47f1ee0..fe2a90c05 100644
--- a/Bugzilla/Group.pm
+++ b/Bugzilla/Group.pm
@@ -71,13 +71,6 @@ use constant GROUP_PARAMS => qw(chartgroup insidergroup timetrackinggroup
#### Accessors ######
###############################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub description { return $_[0]->{'description'}; }
sub is_bug_group { return $_[0]->{'isbuggroup'}; }
sub user_regexp { return $_[0]->{'userregexp'}; }
diff --git a/Bugzilla/Keyword.pm b/Bugzilla/Keyword.pm
index b078294d8..61038f602 100644
--- a/Bugzilla/Keyword.pm
+++ b/Bugzilla/Keyword.pm
@@ -47,13 +47,6 @@ use constant UPDATE_COLUMNS => qw(
#### Accessors ######
###############################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub description { return $_[0]->{'description'}; }
sub bug_count {
diff --git a/Bugzilla/Milestone.pm b/Bugzilla/Milestone.pm
index 078074dc4..2f10e1f00 100644
--- a/Bugzilla/Milestone.pm
+++ b/Bugzilla/Milestone.pm
@@ -227,13 +227,7 @@ sub bug_count {
##### Accessors ######
################################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
+sub name { return $_[0]->{'value'}; }
sub product_id { return $_[0]->{'product_id'}; }
sub sortkey { return $_[0]->{'sortkey'}; }
sub is_active { return $_[0]->{'isactive'}; }
diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm
index 8660fa551..00afbe19f 100644
--- a/Bugzilla/Object.pm
+++ b/Bugzilla/Object.pm
@@ -445,6 +445,9 @@ sub _do_list_select {
#### Accessors ######
###############################
+sub id { return $_[0]->{$_[0]->ID_FIELD}; }
+sub name { return $_[0]->{$_[0]->NAME_FIELD}; }
+
###############################
#### Methods ####
###############################
diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm
index 16b753fa8..3ac1692f0 100644
--- a/Bugzilla/Product.pm
+++ b/Bugzilla/Product.pm
@@ -831,13 +831,6 @@ sub classification {
#### Accessors ######
###############################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub allows_unconfirmed { return $_[0]->{'allows_unconfirmed'}; }
sub description { return $_[0]->{'description'}; }
sub is_active { return $_[0]->{'isactive'}; }
diff --git a/Bugzilla/Search/Recent.pm b/Bugzilla/Search/Recent.pm
index f99cda84f..a5d9e2417 100644
--- a/Bugzilla/Search/Recent.pm
+++ b/Bugzilla/Search/Recent.pm
@@ -27,8 +27,6 @@ use constant LIST_ORDER => 'id DESC';
use constant AUDIT_CREATES => 0;
use constant AUDIT_UPDATES => 0;
use constant AUDIT_REMOVES => 0;
-use constant USER_ID_FIELD => 'user_id';
-use constant ID_FIELD => 'id';
use constant DB_COLUMNS => qw(
id
@@ -117,16 +115,9 @@ sub new_from_cookie {
# Simple Accessors #
####################
-use Class::XSAccessor {
- accessors => {
- user_id => __PACKAGE__->USER_ID_FIELD,
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub bug_list { return [split(',', $_[0]->{'bug_list'})]; }
sub list_order { return $_[0]->{'list_order'}; }
+sub user_id { return $_[0]->{'user_id'}; }
############
# Mutators #
diff --git a/Bugzilla/Search/Saved.pm b/Bugzilla/Search/Saved.pm
index d57dfa35b..1511cd87b 100644
--- a/Bugzilla/Search/Saved.pm
+++ b/Bugzilla/Search/Saved.pm
@@ -287,13 +287,6 @@ sub shared_with_users {
# Simple Accessors #
####################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub url { return $_[0]->{'query'}; }
sub user {
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 3a0810b64..dc8f60565 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -86,16 +86,8 @@ sub DB_COLUMNS {
use constant NAME_FIELD => 'login_name';
use constant ID_FIELD => 'userid';
-use constant REAL_NAME_FIELD => 'realname';
use constant LIST_ORDER => NAME_FIELD;
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->REAL_NAME_FIELD,
- },
-};
-
use constant VALIDATORS => {
cryptpassword => \&_check_password,
disable_mail => \&_check_disable_mail,
@@ -648,6 +640,7 @@ sub update_last_seen_date {
################################################################################
# Accessors for user attributes
+sub name { $_[0]->{realname}; }
sub login { $_[0]->{login_name}; }
sub extern_id { $_[0]->{extern_id}; }
sub email { $_[0]->login . Bugzilla->params->{'emailsuffix'}; }
diff --git a/Bugzilla/User/APIKey.pm b/Bugzilla/User/APIKey.pm
index 62121382b..c1a4ed572 100644
--- a/Bugzilla/User/APIKey.pm
+++ b/Bugzilla/User/APIKey.pm
@@ -50,17 +50,7 @@ use constant { AUDIT_CREATES => 0,
USE_MEMCACHED => 0 };
# Accessors
-###############################
-#### Accessors ######
-###############################
-
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
+sub id { return $_[0]->{id} }
sub user_id { return $_[0]->{user_id} }
sub api_key { return $_[0]->{api_key} }
sub app_id { return $_[0]->{app_id} }
diff --git a/Bugzilla/User/Session.pm b/Bugzilla/User/Session.pm
index 299ed26f7..56e1cd07a 100644
--- a/Bugzilla/User/Session.pm
+++ b/Bugzilla/User/Session.pm
@@ -39,14 +39,7 @@ use constant { AUDIT_CREATES => 0,
USE_MEMCACHED => 0 };
# Accessors
-
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
+sub id { return $_[0]->{id} }
sub userid { return $_[0]->{userid} }
sub cookie { return $_[0]->{cookie} }
sub lastused { return $_[0]->{lastused} }
diff --git a/Bugzilla/Version.pm b/Bugzilla/Version.pm
index 4b509a60e..a078cb4fc 100644
--- a/Bugzilla/Version.pm
+++ b/Bugzilla/Version.pm
@@ -28,7 +28,6 @@ use constant DEFAULT_VERSION => 'unspecified';
use constant DB_TABLE => 'versions';
use constant NAME_FIELD => 'value';
-
# This is "id" because it has to be filled in and id is probably the fastest.
# We do a custom sort in new_from_list below.
use constant LIST_ORDER => 'id';
@@ -148,13 +147,6 @@ sub remove_from_db {
##### Accessors ####
###############################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub product_id { return $_[0]->{'product_id'}; }
sub is_active { return $_[0]->{'isactive'}; }
diff --git a/Bugzilla/Whine.pm b/Bugzilla/Whine.pm
index e00f9118b..c4301b4f6 100644
--- a/Bugzilla/Whine.pm
+++ b/Bugzilla/Whine.pm
@@ -39,14 +39,6 @@ use constant LIST_ORDER => 'id';
####################
# Simple Accessors #
####################
-
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub subject { return $_[0]->{'subject'}; }
sub body { return $_[0]->{'body'}; }
sub mail_if_no_bugs { return $_[0]->{'mailifnobugs'}; }
diff --git a/Bugzilla/Whine/Query.pm b/Bugzilla/Whine/Query.pm
index 885737114..6ea91cc51 100644
--- a/Bugzilla/Whine/Query.pm
+++ b/Bugzilla/Whine/Query.pm
@@ -33,22 +33,15 @@ use constant DB_COLUMNS => qw(
use constant NAME_FIELD => 'id';
use constant LIST_ORDER => 'sortkey';
-use constant QUERY_NAME_FIELD => 'query_name';
####################
# Simple Accessors #
####################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->QUERY_NAME_FIELD,
- },
-};
-
sub eventid { return $_[0]->{'eventid'}; }
sub sortkey { return $_[0]->{'sortkey'}; }
sub one_email_per_bug { return $_[0]->{'onemailperbug'}; }
sub title { return $_[0]->{'title'}; }
+sub name { return $_[0]->{'query_name'}; }
1;
diff --git a/Bugzilla/Whine/Schedule.pm b/Bugzilla/Whine/Schedule.pm
index 725920cd7..017b744e5 100644
--- a/Bugzilla/Whine/Schedule.pm
+++ b/Bugzilla/Whine/Schedule.pm
@@ -45,13 +45,6 @@ use constant LIST_ORDER => 'id';
####################
# Simple Accessors #
####################
-use Class::XSAccessor {
- accessors => {
- id => __PACKAGE__->ID_FIELD,
- name => __PACKAGE__->NAME_FIELD,
- },
-};
-
sub eventid { return $_[0]->{'eventid'}; }
sub run_day { return $_[0]->{'run_day'}; }
sub run_time { return $_[0]->{'run_time'}; }