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
3dc3a015
Commit
3dc3a015
authored
Jul 13, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 578594: Search.pm: Move deadlinefrom and deadlineto parsing into a
special method r=mkanat, a=mkanat (module owner)
parent
110186aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
33 deletions
+17
-33
Search.pm
Bugzilla/Search.pm
+17
-33
No files found.
Bugzilla/Search.pm
View file @
3dc3a015
...
...
@@ -728,6 +728,7 @@ sub _parse_params {
my
@charts
=
$self
->
_parse_basic_fields
();
push
(
@charts
,
$self
->
_special_parse_email
());
push
(
@charts
,
$self
->
_special_parse_chfield
());
push
(
@charts
,
$self
->
_special_parse_deadline
());
return
@charts
;
}
...
...
@@ -874,6 +875,22 @@ sub _special_parse_chfield {
return
@charts
;
}
sub
_special_parse_deadline
{
my
(
$self
)
=
@_
;
return
if
!
Bugzilla
->
user
->
is_timetracker
;
my
$params
=
$self
->
_params
;
my
@charts
;
if
(
my
$from
=
$params
->
param
(
'deadlinefrom'
))
{
push
(
@charts
,
[
'deadline'
,
'greaterthaneq'
,
$from
]);
}
if
(
my
$to
=
$params
->
param
(
'deadlineto'
))
{
push
(
@charts
,
[
'deadline'
,
'lessthaneq'
,
$to
]);
}
return
@charts
;
}
sub
_special_parse_email
{
my
(
$self
)
=
@_
;
my
$params
=
$self
->
_params
;
...
...
@@ -1022,39 +1039,6 @@ sub init {
my
@specialchart
=
$self
->
_parse_params
();
my
$sql_deadlinefrom
;
my
$sql_deadlineto
;
if
(
$user
->
is_timetracker
)
{
my
$deadlinefrom
;
my
$deadlineto
;
if
(
$params
->
param
(
'deadlinefrom'
)){
$params
->
param
(
'deadlinefrom'
,
''
)
if
lc
(
$params
->
param
(
'deadlinefrom'
))
eq
'now'
;
$deadlinefrom
=
SqlifyDate
(
$params
->
param
(
'deadlinefrom'
));
$sql_deadlinefrom
=
$dbh
->
quote
(
$deadlinefrom
);
trick_taint
(
$sql_deadlinefrom
);
my
$term
=
"bugs.deadline >= $sql_deadlinefrom"
;
push
(
@wherepart
,
$term
);
$self
->
search_description
({
field
=>
'deadline'
,
type
=>
'greaterthaneq'
,
value
=>
$deadlinefrom
,
term
=>
$term
,
});
}
if
(
$params
->
param
(
'deadlineto'
)){
$params
->
param
(
'deadlineto'
,
''
)
if
lc
(
$params
->
param
(
'deadlineto'
))
eq
'now'
;
$deadlineto
=
SqlifyDate
(
$params
->
param
(
'deadlineto'
));
$sql_deadlineto
=
$dbh
->
quote
(
$deadlineto
);
trick_taint
(
$sql_deadlineto
);
my
$term
=
"bugs.deadline <= $sql_deadlineto"
;
push
(
@wherepart
,
$term
);
$self
->
search_description
({
field
=>
'deadline'
,
type
=>
'lessthaneq'
,
value
=>
$deadlineto
,
term
=>
$term
,
});
}
}
foreach
my
$f
(
"short_desc"
,
"longdesc"
,
"bug_file_loc"
,
"status_whiteboard"
)
{
if
(
defined
$params
->
param
(
$f
))
{
...
...
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