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
dde670d3
Commit
dde670d3
authored
Sep 17, 2008
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 454892: Improve Bugzilla::CGI::clean_search_url to remove all the normal "default" fields
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
parent
6260b5f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
2 deletions
+41
-2
CGI.pm
Bugzilla/CGI.pm
+41
-2
No files found.
Bugzilla/CGI.pm
View file @
dde670d3
...
@@ -144,8 +144,47 @@ sub clean_search_url {
...
@@ -144,8 +144,47 @@ sub clean_search_url {
# Delete certain parameters if the associated parameter is empty.
# Delete certain parameters if the associated parameter is empty.
$self
->
delete
(
'bugidtype'
)
if
!
$self
->
param
(
'bug_id'
);
$self
->
delete
(
'bugidtype'
)
if
!
$self
->
param
(
'bug_id'
);
$self
->
delete
(
'emailtype1'
)
if
!
$self
->
param
(
'email1'
);
$self
->
delete
(
'emailtype2'
)
if
!
$self
->
param
(
'email2'
);
foreach
my
$num
(
1
,
2
)
{
# If there's no value in the email field, delete the related fields.
if
(
!
$self
->
param
(
"email$num"
))
{
foreach
my
$field
qw(type assigned_to reporter qa_contact
cc longdesc)
{
$self
->
delete
(
"email$field$num"
);
}
}
}
# chfieldto is set to "Now" by default in query.cgi. But if none
# of the other chfield parameters are set, it's meaningless.
if
(
!
defined
$self
->
param
(
'chfieldfrom'
)
&&
!
$self
->
param
(
'chfield'
)
&&
!
defined
$self
->
param
(
'chfieldvalue'
))
{
$self
->
delete
(
'chfieldto'
);
}
# cmdtype "doit" is the default from query.cgi, but it's only meaningful
# if there's a remtype parameter.
if
(
defined
$self
->
param
(
'cmdtype'
)
&&
$self
->
param
(
'cmdtype'
)
eq
'doit'
&&
!
defined
$self
->
param
(
'remtype'
))
{
$self
->
delete
(
'cmdtype'
);
}
# "Reuse same sort as last time" is actually the default, so we don't
# need it in the URL.
if
(
$self
->
param
(
'order'
)
&&
$self
->
param
(
'order'
)
eq
'Reuse same sort as last time'
)
{
$self
->
delete
(
'order'
);
}
# And now finally, if query_format is our only parameter, that
# really means we have no parameters, so we should delete query_format.
if
(
$self
->
param
(
'query_format'
)
&&
scalar
(
$self
->
param
())
==
1
)
{
$self
->
delete
(
'query_format'
);
}
}
}
# Overwrite to ensure nph doesn't get set, and unset HEADERS_ONCE
# Overwrite to ensure nph doesn't get set, and unset HEADERS_ONCE
...
...
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