From 3d3cb31a1f4f7c09de165805298e4ea2feaba7cd Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Sun, 22 Jan 2012 22:44:40 -0500 Subject: Rollback of Bug 714370 as it causes error in bug creation due to DB_COLUMNS --- Bugzilla/Flag.pm | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) (limited to 'Bugzilla/Flag.pm') diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 9a63b7c4c..0ea49a4b7 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -65,21 +65,15 @@ use constant AUDIT_REMOVES => 0; use constant SKIP_REQUESTEE_ON_ERROR => 1; -sub DB_COLUMNS { - my $dbh = Bugzilla->dbh; - return qw( - id - type_id - bug_id - attach_id - requestee_id - setter_id - status), - $dbh->sql_date_format('creation_date', '%Y.%m.%d %H:%i:%s') . - ' AS creation_date', - $dbh->sql_date_format('modification_date', '%Y.%m.%d %H:%i:%s') . - ' AS modification_date'; -} +use constant DB_COLUMNS => qw( + id + type_id + bug_id + attach_id + requestee_id + setter_id + status +); use constant UPDATE_COLUMNS => qw( requestee_id @@ -124,14 +118,6 @@ Returns the ID of the attachment this flag belongs to, if any. Returns the status '+', '-', '?' of the flag. -=item C - -Returns the timestamp when the flag was created. - -=item C - -Returns the timestamp when the flag was last modified. - =back =cut @@ -144,8 +130,6 @@ sub attach_id { return $_[0]->{'attach_id'}; } sub status { return $_[0]->{'status'}; } sub setter_id { return $_[0]->{'setter_id'}; } sub requestee_id { return $_[0]->{'requestee_id'}; } -sub creation_date { return $_[0]->{'creation_date'}; } -sub modification_date { return $_[0]->{'modification_date'}; } ############################### #### Methods #### @@ -452,7 +436,6 @@ sub update { if (scalar(keys %$changes)) { $dbh->do('UPDATE flags SET modification_date = ? WHERE id = ?', undef, ($timestamp, $self->id)); - $self->{'modification_date'} = format_time($timestamp, '%Y.%m.%d %H:%M:%S'); } return $changes; } -- cgit v1.2.3-24-g4f1b