summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Constants.pm7
-rw-r--r--Bugzilla/DB/Schema.pm1
-rw-r--r--Bugzilla/User.pm5
3 files changed, 11 insertions, 2 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm
index 078c988b6..795f0096b 100644
--- a/Bugzilla/Constants.pm
+++ b/Bugzilla/Constants.pm
@@ -65,6 +65,9 @@ use base qw(Exporter);
DEFAULT_COLUMN_LIST
DEFAULT_QUERY_NAME
+ QUERY_LIST
+ LIST_OF_BUGS
+
COMMENT_COLS
UNLOCK_ABORT
@@ -173,6 +176,10 @@ use constant DEFAULT_COLUMN_LIST => (
# for the default settings.
use constant DEFAULT_QUERY_NAME => '(Default query)';
+# The possible types for saved searches.
+use constant QUERY_LIST => 0;
+use constant LIST_OF_BUGS => 1;
+
# The column length for displayed (and wrapped) bug comments.
use constant COMMENT_COLS => 80;
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index 8379f0b12..5ffb41216 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -665,6 +665,7 @@ use constant ABSTRACT_SCHEMA => {
name => {TYPE => 'varchar(64)', NOTNULL => 1},
linkinfooter => {TYPE => 'BOOLEAN', NOTNULL => 1},
query => {TYPE => 'MEDIUMTEXT', NOTNULL => 1},
+ query_type => {TYPE => 'BOOLEAN', NOTNULL => 1},
],
INDEXES => [
namedqueries_userid_idx => {FIELDS => [qw(userid name)],
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 7f3736c28..6beb16a8b 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -198,7 +198,7 @@ sub queries {
my $dbh = Bugzilla->dbh;
my $sth = $dbh->prepare(q{ SELECT
- DISTINCT name, query, linkinfooter,
+ DISTINCT name, query, linkinfooter, query_type,
CASE WHEN whine_queries.id IS NOT NULL
THEN 1 ELSE 0 END,
UPPER(name) AS uppername
@@ -221,7 +221,8 @@ sub queries {
name => $row->[0],
query => $row->[1],
linkinfooter => $row->[2],
- usedinwhine => $row->[3],
+ query_type => $row->[3],
+ usedinwhine => $row->[4],
});
}
$self->{queries} = \@queries;