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
899f61d6
Commit
899f61d6
authored
Jul 21, 2004
by
bugreport%peshkin.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 245272: Add per-chart negation to boolean searches
r=justdave,myk,timeless a=myk
parent
9bbbeca3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
Search.pm
Bugzilla/Search.pm
+9
-1
query.cgi
query.cgi
+1
-1
boolean-charts.html.tmpl
template/en/default/search/boolean-charts.html.tmpl
+10
-1
No files found.
Bugzilla/Search.pm
View file @
899f61d6
...
...
@@ -1049,6 +1049,7 @@ sub init {
$chart
<
0
||
$params
->
param
(
"field$chart-0-0"
)
;
$chart
++
)
{
$chartid
=
$chart
>=
0
?
$chart
:
""
;
my
@chartandlist
=
();
for
(
$row
=
0
;
$params
->
param
(
"field$chart-$row-0"
)
;
$row
++
)
{
...
...
@@ -1111,7 +1112,14 @@ sub init {
}
if
(
@orlist
)
{
@orlist
=
map
(
"($_)"
,
@orlist
)
if
(
scalar
(
@orlist
)
>
1
);
push
(
@andlist
,
"("
.
join
(
" OR "
,
@orlist
)
.
")"
);
push
(
@chartandlist
,
"("
.
join
(
" OR "
,
@orlist
)
.
")"
);
}
}
if
(
@chartandlist
)
{
if
(
$params
->
param
(
"negate$chart"
))
{
push
(
@andlist
,
"NOT("
.
join
(
" AND "
,
@chartandlist
)
.
")"
);
}
else
{
push
(
@andlist
,
"("
.
join
(
" AND "
,
@chartandlist
)
.
")"
);
}
}
}
...
...
query.cgi
View file @
899f61d6
...
...
@@ -357,7 +357,7 @@ for (my $chart = 0; $::FORM{"field$chart-0-0"}; $chart++) {
}
push
(
@rows
,
\
@cols
);
}
push
(
@charts
,
\
@rows
);
push
(
@charts
,
{
'rows'
=>
\
@rows
,
'negate'
=>
$::FORM
{
"negate$chart"
}}
);
}
$default
{
'charts'
}
=
\
@charts
;
...
...
template/en/default/search/boolean-charts.html.tmpl
View file @
899f61d6
...
...
@@ -57,7 +57,16 @@
[% FOREACH chart = default.charts %]
[% chartnum = loop.count - 1 %]
<table>
[% FOREACH row = chart %]
<tr>
<input type="checkbox" id="negate[% chartnum FILTER html %]"
name="negate[% chartnum FILTER html %]" value="1"
[% "checked" IF chart.negate %]
>
<label for="negate[% chartnum FILTER html %]">
Not (negate this whole chart)
</label>
</tr>
[% FOREACH row = chart.rows %]
[% rownum = loop.count - 1 %]
<tr>
[% FOREACH col = row %]
...
...
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