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
3b2fcf52
Commit
3b2fcf52
authored
Apr 17, 2012
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 745320: Shared queries do not work when tags are part of the query
r=dkl a=LpSolit
parent
b1779f28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
Search.pm
Bugzilla/Search.pm
+3
-3
buglist.cgi
buglist.cgi
+9
-4
No files found.
Bugzilla/Search.pm
View file @
3b2fcf52
...
...
@@ -802,8 +802,8 @@ sub _param_array {
}
sub
_params
{
$_
[
0
]
->
{
params
}
}
sub
_user
{
return
$_
[
0
]
->
{
user
}
}
sub
_sharer_id
{
$_
[
0
]
->
{
sharer
}
}
##############################
# Internal Accessors: SELECT #
...
...
@@ -2546,8 +2546,8 @@ sub _multiselect_table {
}
elsif
(
$field
eq
'tag'
)
{
$args
->
{
full_field
}
=
'tag.name'
;
return
"bug_tag INNER JOIN tag ON bug_tag.tag_id = tag.id"
.
" AND user_id = "
.
$self
->
_user
->
id
;
return
"bug_tag INNER JOIN tag ON bug_tag.tag_id = tag.id
AND user_id =
"
.
(
$self
->
_sharer_id
||
$self
->
_user
->
id
)
;
}
elsif
(
$field
eq
'bug_group'
)
{
$args
->
{
full_field
}
=
'groups.name'
;
...
...
buglist.cgi
View file @
3b2fcf52
...
...
@@ -211,7 +211,9 @@ sub LookupNamedQuery {
$query
->
url
||
ThrowUserError
(
"buglist_parameters_required"
);
return
wantarray
?
(
$query
->
url
,
$query
->
id
)
:
$query
->
url
;
# Detaint $sharer_id.
$sharer_id
=
$query
->
user
->
id
if
$sharer_id
;
return
wantarray
?
(
$query
->
url
,
$query
->
id
,
$sharer_id
)
:
$query
->
url
;
}
# Inserts a Named Query (a "Saved Search") into the database, or
...
...
@@ -330,6 +332,7 @@ sub _close_standby_message {
my
$cmdtype
=
$cgi
->
param
(
'cmdtype'
)
||
''
;
my
$remaction
=
$cgi
->
param
(
'remaction'
)
||
''
;
my
$sharer_id
;
# Backwards-compatibility - the old interface had cmdtype="runnamed" to run
# a named command, and we can't break this because it's in bookmarks.
...
...
@@ -366,8 +369,9 @@ $filename =~ s/"/\\"/g; # escape quotes
if
(
$cmdtype
eq
"dorem"
)
{
if
(
$remaction
eq
"run"
)
{
my
$query_id
;
(
$buffer
,
$query_id
)
=
LookupNamedQuery
(
scalar
$cgi
->
param
(
"namedcmd"
),
scalar
$cgi
->
param
(
'sharer_id'
));
(
$buffer
,
$query_id
,
$sharer_id
)
=
LookupNamedQuery
(
scalar
$cgi
->
param
(
"namedcmd"
),
scalar
$cgi
->
param
(
'sharer_id'
));
# If this is the user's own query, remember information about it
# so that it can be modified easily.
$vars
->
{
'searchname'
}
=
$cgi
->
param
(
'namedcmd'
);
...
...
@@ -727,7 +731,8 @@ if ($format->{'extension'} eq 'html' && !defined $params->param('limit')) {
# Generate the basic SQL query that will be used to generate the bug list.
my
$search
=
new
Bugzilla::
Search
(
'fields'
=>
\
@selectcolumns
,
'params'
=>
scalar
$params
->
Vars
,
'order'
=>
\
@order_columns
);
'order'
=>
\
@order_columns
,
'sharer'
=>
$sharer_id
);
my
$query
=
$search
->
sql
;
$vars
->
{
'search_description'
}
=
$search
->
search_description
;
$order
=
join
(
','
,
$search
->
order
);
...
...
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