From: mkanat%bugzilla.org <> Date: Wed, 12 Dec 2007 07:51:14 +0000 (+0000) Subject: Bug 375007: [Oracle] Some CGIs use SQL names in their "AS" clauses that don't work... X-Git-Tag: bugzilla-3.1.3~435 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25de3add9dedd00d20ff9e35a5d20f3163ee9437;p=thirdparty%2Fbugzilla.git Bug 375007: [Oracle] Some CGIs use SQL names in their "AS" clauses that don't work in Oracle Patch By Xiaoou Wu r=mkanat, a=mkanat --- diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index e3fe39f3ac..f853cff049 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -88,7 +88,7 @@ sub _retrieve { 'attachments.bug_id AS bug_id', 'attachments.description AS description', 'attachments.mimetype AS contenttype', - 'attachments.submitter_id AS _attacher_id', + 'attachments.submitter_id AS attacher_id', Bugzilla->dbh->sql_date_format('attachments.creation_ts', '%Y.%m.%d %H:%i') . " AS attached", 'attachments.modification_time', @@ -188,7 +188,7 @@ the user who attached the attachment sub attacher { my $self = shift; return $self->{attacher} if exists $self->{attacher}; - $self->{attacher} = new Bugzilla::User($self->{_attacher_id}); + $self->{attacher} = new Bugzilla::User($self->{attacher_id}); return $self->{attacher}; } diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 1f10714e8c..967ad8ca30 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -113,7 +113,7 @@ sub Send { my %values = %{$dbh->selectrow_hashref( 'SELECT ' . join(',', editable_bug_fields()) . ', reporter, - lastdiffed AS start, LOCALTIMESTAMP(0) AS end + lastdiffed AS start_time, LOCALTIMESTAMP(0) AS end_time FROM bugs WHERE bug_id = ?', undef, $id)}; @@ -123,7 +123,7 @@ sub Send { my $component = new Bugzilla::Component($values{component_id}); $values{component} = $component->name; - my ($start, $end) = ($values{start}, $values{end}); + my ($start, $end) = ($values{start_time}, $values{end_time}); # User IDs of people in various roles. More than one person can 'have' a # role, if the person in that role has changed, or people are watching.