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
1414db6b
Commit
1414db6b
authored
Feb 25, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 282748: uninitialized value in localtime in Format.pm
Patch By Frederic Buclin <LpSolit@gmail.com> r=wurblzap, a=myk
parent
94c2df0e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
17 deletions
+23
-17
BugMail.pm
Bugzilla/BugMail.pm
+3
-5
Util.pm
Bugzilla/Util.pm
+9
-6
CGI.pl
CGI.pl
+0
-5
process_bug.cgi
process_bug.cgi
+11
-1
No files found.
Bugzilla/BugMail.pm
View file @
1414db6b
...
...
@@ -201,7 +201,9 @@ sub ProcessOneBug($) {
}
$values
{
'estimated_time'
}
=
format_time_decimal
(
$values
{
'estimated_time'
});
$values
{
'deadline'
}
=
time2str
(
"%Y-%m-%d"
,
str2time
(
$values
{
'deadline'
}));
if
(
$values
{
'deadline'
})
{
$values
{
'deadline'
}
=
time2str
(
"%Y-%m-%d"
,
str2time
(
$values
{
'deadline'
}));
}
my
@dependslist
;
SendSQL
(
"SELECT dependson FROM dependencies WHERE
...
...
@@ -262,10 +264,6 @@ sub ProcessOneBug($) {
WHERE attach_id = $attachid"
);
$diffpart
->
{
'isprivate'
}
=
FetchOneColumn
();
}
if
(
$fieldname
eq
'deadline'
)
{
$old
=
time2str
(
"%Y-%m-%d"
,
str2time
(
$old
));
$new
=
time2str
(
"%Y-%m-%d"
,
str2time
(
$new
));
}
$difftext
=
FormatTriple
(
$what
,
$old
,
$new
);
$diffpart
->
{
'header'
}
=
$diffheader
;
$diffpart
->
{
'fieldname'
}
=
$fieldname
;
...
...
Bugzilla/Util.pm
View file @
1414db6b
...
...
@@ -277,14 +277,17 @@ sub file_mod_time ($) {
sub
ValidateDate
{
my
(
$date
,
$format
)
=
@_
;
my
$date2
;
my
$ts
=
str2time
(
$date
);
my
$date2
=
time2str
(
"%Y-%m-%d"
,
$ts
);
# $ts is undefined if the parser fails.
my
$ts
=
str2time
(
$date
);
if
(
$ts
)
{
$date2
=
time2str
(
"%Y-%m-%d"
,
$ts
);
$date
=~
s/(\d+)-0*(\d+?)-0*(\d+?)/$1-$2-$3/
;
$date2
=~
s/(\d+)-0*(\d+?)-0*(\d+?)/$1-$2-$3/
;
if
(
$date
ne
$date2
)
{
$date
=~
s/(\d+)-0*(\d+?)-0*(\d+?)/$1-$2-$3/
;
$date2
=~
s/(\d+)-0*(\d+?)-0*(\d+?)/$1-$2-$3/
;
}
if
(
!
$ts
||
$date
ne
$date2
)
{
ThrowUserError
(
'illegal_date'
,
{
date
=>
$date
,
format
=>
$format
});
}
}
...
...
CGI.pl
View file @
1414db6b
...
...
@@ -396,11 +396,6 @@ sub GetBugActivity {
$changes
=
[]
;
}
if
(
$fieldname
eq
'deadline'
)
{
$removed
=
time2str
(
"%Y-%m-%d"
,
str2time
(
$removed
));
$added
=
time2str
(
"%Y-%m-%d"
,
str2time
(
$added
));
}
$operation
->
{
'who'
}
=
$who
;
$operation
->
{
'when'
}
=
$when
;
...
...
process_bug.cgi
View file @
1414db6b
...
...
@@ -1767,7 +1767,17 @@ foreach my $id (@idlist) {
{
$check_dep_bugs
=
1
;
}
# Convert deadlines to the YYYY-MM-DD format. We use an
# intermediate $xxxtime to prevent errors in the web
# server log file when str2time($xxx) is undefined.
if
(
$col
eq
'deadline'
)
{
my
$oldtime
=
str2time
(
$old
);
$old
=
(
$oldtime
)
?
time2str
(
"%Y-%m-%d"
,
$oldtime
)
:
''
;
my
$newtime
=
str2time
(
$new
);
$new
=
(
$newtime
)
?
time2str
(
"%Y-%m-%d"
,
$newtime
)
:
''
;
}
LogActivityEntry
(
$id
,
$col
,
$old
,
$new
,
$whoid
,
$timestamp
);
$bug_changed
=
1
;
}
...
...
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