[bugzilla-gnome-org-extensions] browse: Port to GnomeAttachmentStatus
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-extensions] browse: Port to GnomeAttachmentStatus
- Date: Thu, 20 Nov 2014 22:08:50 +0000 (UTC)
commit 5dcd4fbd33648a6795f9f879ac15726ad4012eaf
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Sun Nov 9 23:50:18 2014 +0100
browse: Port to GnomeAttachmentStatus
Browse/lib/Util.pm | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/Browse/lib/Util.pm b/Browse/lib/Util.pm
index 7a318e6..1edf7db 100644
--- a/Browse/lib/Util.pm
+++ b/Browse/lib/Util.pm
@@ -309,16 +309,14 @@ sub new_patches {
my $product = shift;
my $dbh = Bugzilla->dbh;
- return $dbh->bz_column_info('attachments', 'status') ?
- $dbh->selectrow_array("SELECT COUNT(attach_id)
+ return $dbh->selectrow_array("SELECT COUNT(attach_id)
FROM bugs, attachments
WHERE bugs.bug_id = attachments.bug_id
AND bug_status IN (" . browse_open_states() . ")
AND attachments.ispatch = 1 AND attachments.isobsolete = 0
- AND attachments.status = 'none'
+ AND attachments.gnome_attachment_status = 'none'
AND attachments.creation_ts >= " .
$dbh->sql_date_math('LOCALTIMESTAMP(0)', '-', 7, 'DAY') . "
- AND product_id = ?", undef, $product->id) :
- "?";
+ AND product_id = ?", undef, $product->id);
}
sub keyword_bugs {
@@ -381,17 +379,15 @@ sub by_patch_status {
my $product = shift;
my $dbh = Bugzilla->dbh;
- return $dbh->bz_column_info('attachments', 'status') ?
- $dbh->selectall_arrayref("SELECT attachments.status, COUNT(attach_id)
+ return $dbh->selectall_arrayref("SELECT attachments.gnome_attachment_status, COUNT(attach_id)
FROM bugs, attachments
WHERE attachments.bug_id = bugs.bug_id
AND bug_status IN (" . browse_open_states() . ")
AND product_id = ?
AND attachments.ispatch = 1
AND attachments.isobsolete != 1
- AND attachments.status IN (" . join(",", map { $dbh->quote($_) }
IMPORTANT_PATCH_STATUSES) . ")
- GROUP BY attachments.status", undef, $product->id) :
- "?";
+ AND attachments.gnome_attachment_status IN (" . join(",", map {
$dbh->quote($_) } IMPORTANT_PATCH_STATUSES) . ")
+ GROUP BY attachments.gnome_attachment_status", undef,
$product->id);
}
sub browse_bug_link {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]