Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
26426fe8
Commit
26426fe8
authored
Feb 01, 2010
by
Frédéric Buclin
Committed by
Max Kanat-Alexander
Feb 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 537746: Search criteria headers on buglist duplicate unnecessarily when bugidtype is in use
Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
parent
ad31a570
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
16 deletions
+18
-16
CGI.pm
Bugzilla/CGI.pm
+12
-3
Search.pm
Bugzilla/Search.pm
+1
-8
Quicksearch.pm
Bugzilla/Search/Quicksearch.pm
+1
-1
query.cgi
query.cgi
+1
-1
form.html.tmpl
template/en/default/search/form.html.tmpl
+3
-3
No files found.
Bugzilla/CGI.pm
View file @
26426fe8
...
@@ -110,6 +110,7 @@ sub new {
...
@@ -110,6 +110,7 @@ sub new {
sub
canonicalise_query
{
sub
canonicalise_query
{
my
(
$self
,
@exclude
)
=
@_
;
my
(
$self
,
@exclude
)
=
@_
;
$self
->
convert_old_params
();
# Reconstruct the URL by concatenating the sorted param=value pairs
# Reconstruct the URL by concatenating the sorted param=value pairs
my
@parameters
;
my
@parameters
;
foreach
my
$key
(
sort
(
$self
->
param
()))
{
foreach
my
$key
(
sort
(
$self
->
param
()))
{
...
@@ -134,6 +135,17 @@ sub canonicalise_query {
...
@@ -134,6 +135,17 @@ sub canonicalise_query {
return
join
(
"&"
,
@parameters
);
return
join
(
"&"
,
@parameters
);
}
}
sub
convert_old_params
{
my
$self
=
shift
;
# bugidtype is now bug_id_type.
if
(
$self
->
param
(
'bugidtype'
))
{
my
$value
=
$self
->
param
(
'bugidtype'
)
eq
'exclude'
?
'nowords'
:
'anyexact'
;
$self
->
param
(
'bug_id_type'
,
$value
);
$self
->
delete
(
'bugidtype'
);
}
}
sub
clean_search_url
{
sub
clean_search_url
{
my
$self
=
shift
;
my
$self
=
shift
;
# Delete any empty URL parameter.
# Delete any empty URL parameter.
...
@@ -153,9 +165,6 @@ sub clean_search_url {
...
@@ -153,9 +165,6 @@ sub clean_search_url {
}
}
}
}
# Delete certain parameters if the associated parameter is empty.
$self
->
delete
(
'bugidtype'
)
if
!
$self
->
param
(
'bug_id'
);
# Delete leftovers from the login form
# Delete leftovers from the login form
$self
->
delete
(
'Bugzilla_remember'
,
'GoAheadAndLogIn'
);
$self
->
delete
(
'Bugzilla_remember'
,
'GoAheadAndLogIn'
);
...
...
Bugzilla/Search.pm
View file @
26426fe8
...
@@ -194,6 +194,7 @@ sub init {
...
@@ -194,6 +194,7 @@ sub init {
my
$self
=
shift
;
my
$self
=
shift
;
my
@fields
=
@
{
$self
->
{
'fields'
}
||
[]
};
my
@fields
=
@
{
$self
->
{
'fields'
}
||
[]
};
my
$params
=
$self
->
{
'params'
};
my
$params
=
$self
->
{
'params'
};
$params
->
convert_old_params
();
$self
->
{
'user'
}
||=
Bugzilla
->
user
;
$self
->
{
'user'
}
||=
Bugzilla
->
user
;
my
$user
=
$self
->
{
'user'
};
my
$user
=
$self
->
{
'user'
};
...
@@ -290,14 +291,6 @@ sub init {
...
@@ -290,14 +291,6 @@ sub init {
}
}
}
}
if
(
$params
->
param
(
'bug_id'
))
{
my
$type
=
"anyexact"
;
if
(
$params
->
param
(
'bugidtype'
)
&&
$params
->
param
(
'bugidtype'
)
eq
'exclude'
)
{
$type
=
"nowords"
;
}
push
(
@specialchart
,
[
"bug_id"
,
$type
,
join
(
','
,
$params
->
param
(
'bug_id'
))]);
}
# If the user has selected all of either status or resolution, change to
# If the user has selected all of either status or resolution, change to
# selecting none. This is functionally equivalent, but quite a lot faster.
# selecting none. This is functionally equivalent, but quite a lot faster.
# Also, if the status is __open__ or __closed__, translate those
# Also, if the status is __open__ or __closed__, translate those
...
...
Bugzilla/Search/Quicksearch.pm
View file @
26426fe8
...
@@ -232,7 +232,7 @@ sub _bug_numbers_only {
...
@@ -232,7 +232,7 @@ sub _bug_numbers_only {
# List of bug numbers.
# List of bug numbers.
$cgi
->
param
(
'bug_id'
,
$searchstring
);
$cgi
->
param
(
'bug_id'
,
$searchstring
);
$cgi
->
param
(
'order'
,
'bugs.bug_id'
);
$cgi
->
param
(
'order'
,
'bugs.bug_id'
);
$cgi
->
param
(
'bug
id
type'
,
'include'
);
$cgi
->
param
(
'bug
_id_
type'
,
'include'
);
}
}
}
}
...
...
query.cgi
View file @
26426fe8
...
@@ -131,7 +131,7 @@ sub PrefillForm {
...
@@ -131,7 +131,7 @@ sub PrefillForm {
"longdesc"
,
"longdesc_type"
,
"bug_file_loc"
,
"longdesc"
,
"longdesc_type"
,
"bug_file_loc"
,
"bug_file_loc_type"
,
"status_whiteboard"
,
"bug_file_loc_type"
,
"status_whiteboard"
,
"status_whiteboard_type"
,
"bug_id"
,
"status_whiteboard_type"
,
"bug_id"
,
"bug
id
type"
,
"keywords"
,
"keywords_type"
,
"bug
_id_
type"
,
"keywords"
,
"keywords_type"
,
"deadlinefrom"
,
"deadlineto"
,
"deadlinefrom"
,
"deadlineto"
,
"x_axis_field"
,
"y_axis_field"
,
"z_axis_field"
,
"x_axis_field"
,
"y_axis_field"
,
"z_axis_field"
,
"chart_format"
,
"cumulate"
,
"x_labels_vertical"
,
"chart_format"
,
"cumulate"
,
"x_labels_vertical"
,
...
...
template/en/default/search/form.html.tmpl
View file @
26426fe8
...
@@ -535,9 +535,9 @@ function doOnSelectProduct(selectmode) {
...
@@ -535,9 +535,9 @@ function doOnSelectProduct(selectmode) {
<table>
<table>
<tr>
<tr>
<td>
<td>
<select name="bug
id
type">
<select name="bug
_id_
type">
<option value="
include"[% " selected" IF default.bugidtype.0 == "include
" %]>Only include</option>
<option value="
anyexact"[% " selected" IF default.bug_id_type.0 == "anyexact
" %]>Only include</option>
<option value="
exclude"[% " selected" IF default.bugidtype.0 == "exclude
" %]>Exclude</option>
<option value="
nowords"[% " selected" IF default.bug_id_type.0 == "nowords
" %]>Exclude</option>
</select>
</select>
<label for="bug_id">[% terms.bugs %] numbered</label>:
<label for="bug_id">[% terms.bugs %] numbered</label>:
</td>
</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment