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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
2ceff045
Commit
2ceff045
authored
Jul 18, 2011
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 561170: Date validations are done in the wrong order, generating unwanted warnings
r=dkl a=LpSolit
parent
d56069c5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
summarize_time.cgi
summarize_time.cgi
+6
-6
No files found.
summarize_time.cgi
View file @
2ceff045
...
...
@@ -264,7 +264,7 @@ $user->is_timetracker
action
=>
"access"
,
object
=>
"timetracking_summaries"
});
my
@ids
=
split
(
","
,
$cgi
->
param
(
'id'
));
my
@ids
=
split
(
","
,
$cgi
->
param
(
'id'
)
||
''
);
@ids
=
map
{
Bugzilla::
Bug
->
check
(
$_
)
->
id
}
@ids
;
scalar
(
@ids
)
||
ThrowUserError
(
'no_bugs_chosen'
,
{
action
=>
'view'
});
...
...
@@ -293,17 +293,17 @@ if ($do_report) {
$start_date
=
trim
$cgi
->
param
(
'start_date'
);
$end_date
=
trim
$cgi
->
param
(
'end_date'
);
foreach
my
$date
(
$start_date
,
$end_date
)
{
next
unless
$date
;
validate_date
(
$date
)
||
ThrowUserError
(
'illegal_date'
,
{
date
=>
$date
,
format
=>
'YYYY-MM-DD'
});
}
# Swap dates in case the user put an end_date before the start_date
if
(
$start_date
&&
$end_date
&&
str2time
(
$start_date
)
>
str2time
(
$end_date
))
{
$vars
->
{
'warn_swap_dates'
}
=
1
;
(
$start_date
,
$end_date
)
=
(
$end_date
,
$start_date
);
}
foreach
my
$date
(
$start_date
,
$end_date
)
{
next
unless
$date
;
validate_date
(
$date
)
||
ThrowUserError
(
'illegal_date'
,
{
date
=>
$date
,
format
=>
'YYYY-MM-DD'
});
}
# Store dates in a session cookie so re-visiting the page
# for other bugs keeps them around.
...
...
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