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
a52f0b41
Commit
a52f0b41
authored
Aug 10, 2002
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 155584 - Opening duplicates.cgi with no frequent bugs causes SQL syntax…
Bug 155584 - Opening duplicates.cgi with no frequent bugs causes SQL syntax error. Patch by gerv; r=bbaetz.
parent
df194854
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
29 deletions
+32
-29
duplicates.cgi
duplicates.cgi
+13
-11
duplicates-table.html.tmpl
template/en/default/reports/duplicates-table.html.tmpl
+19
-15
duplicates.html.tmpl
template/en/default/reports/duplicates.html.tmpl
+0
-3
No files found.
duplicates.cgi
View file @
a52f0b41
...
...
@@ -135,10 +135,14 @@ if (!tie(%before, 'AnyDBM_File', "data/duplicates/dupes$whenever",
$dobefore
=
1
;
}
# Don't add CLOSED, and don't add VERIFIED unless they are INVALID or
# WONTFIX. We want to see VERIFIED INVALID and WONTFIX because common
# "bugs" which aren't bugs end up in this state.
my
$query
=
"
my
@bugs
;
my
@bug_ids
;
if
(
scalar
(
%
count
))
{
# Don't add CLOSED, and don't add VERIFIED unless they are INVALID or
# WONTFIX. We want to see VERIFIED INVALID and WONTFIX because common
# "bugs" which aren't bugs end up in this state.
my
$query
=
"
SELECT bugs.bug_id, component, bug_severity, op_sys, target_milestone,
short_desc, bug_status, resolution
FROM bugs
...
...
@@ -147,17 +151,14 @@ my $query = "
OR (bug_status != 'VERIFIED'))
AND bugs.bug_id IN ("
.
join
(
", "
,
keys
%
count
)
.
")"
;
# Limit to a single product if requested
$query
.=
(
" AND product = "
.
SqlQuote
(
$product
))
if
$product
;
# Limit to a single product if requested
$query
.=
(
" AND product = "
.
SqlQuote
(
$product
))
if
$product
;
SendSQL
(
SelectVisible
(
$query
,
SendSQL
(
SelectVisible
(
$query
,
$userid
,
$usergroupset
));
my
@bugs
;
my
@bug_ids
;
while
(
MoreSQLData
())
{
while
(
MoreSQLData
())
{
# Note: maximum row count is dealt with in the template.
my
(
$id
,
$component
,
$bug_severity
,
$op_sys
,
$target_milestone
,
...
...
@@ -177,6 +178,7 @@ while (MoreSQLData()) {
bug_status
=>
$bug_status
,
resolution
=>
$resolution
});
push
(
@bug_ids
,
$id
);
}
}
$vars
->
{
'bugs'
}
=
\
@bugs
;
...
...
template/en/default/reports/duplicates-table.html.tmpl
View file @
a52f0b41
...
...
@@ -44,7 +44,8 @@
[%# *** Column Headers *** %]
<table border>
[% IF bug_ids.size > 0 %]
<table border>
<tr bgcolor="#CCCCCC">
[% FOREACH column = [ { name => "id", description => "Bug #" },
{ name => "count", description => "Dupe<br>Count" },
...
...
@@ -85,31 +86,31 @@
[% END %]
</tr>
[% IF NOT sortby %]
[% IF NOT sortby %]
[% sortby = "count"; reverse = "1" %]
[% END %]
[% END %]
[% IF sortby == "id" OR sortby == "count" OR sortby == "delta" %]
[% IF sortby == "id" OR sortby == "count" OR sortby == "delta" %]
[%# Numeric sort %]
[% sortedbugs = bugs.nsort(sortby) %]
[% ELSE %]
[% ELSE %]
[% sortedbugs = bugs.sort(sortby) %]
[% END %]
[% END %]
[% IF reverse %]
[% IF reverse %]
[% bugs = sortedbugs.reverse %]
[% ELSE %]
[% ELSE %]
[% bugs = sortedbugs %]
[% END %]
[% END %]
[%# *** Buglist *** %]
[%# *** Buglist *** %]
[%# We need to keep track of the bug IDs we are actually displaying, because
[%# We need to keep track of the bug IDs we are actually displaying, because
# if the user decides to sort the visible list, we need to know what that
# list actually is. %]
[% vis_bug_ids = [] %]
[% vis_bug_ids = [] %]
[% FOREACH bug = bugs %]
[% FOREACH bug = bugs %]
[% LAST IF loop.index() >= maxrows %]
[% vis_bug_ids.push(bug.id) %]
...
...
@@ -138,6 +139,9 @@
<td><center>[% bug.target_milestone %]</center></td>
<td>[% bug.short_desc FILTER html %]</td>
</tr>
[% END %]
[% END %]
</table>
</table>
[% ELSE %]
<h3>No duplicate bugs found.</h3>
[% END %]
template/en/default/reports/duplicates.html.tmpl
View file @
a52f0b41
...
...
@@ -49,9 +49,6 @@
[% PROCESS "reports/duplicates-table.html.tmpl" %]
<br>
<br>
[%# *** Parameters *** %]
[% bug_ids_string = vis_bug_ids.join(',') %]
...
...
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