Backing out the checkin for bug 180966 (fix warnings in web server error log). This checkin caused commenting on bugs to fail

if timetracking is not enabled.


git-svn-id: svn://10.0.0.236/trunk@134273 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
justdave%syndicomm.com
2002-11-21 18:46:21 +00:00
parent 59d00b7be9
commit ada2fbdaae
3 changed files with 17 additions and 20 deletions

View File

@@ -267,7 +267,7 @@ sub match_field {
next if !defined($vars->{'mform'}->{$field});
# Skip it if this is a --do_not_change-- field
next if $dontchange && $dontchange eq $vars->{'form'}->{$field};
next if $dontchange eq $vars->{'form'}->{$field};
# We need to move the query to $raw_field, where it will be split up,
# modified by the search, and put back into $::FORM and $::MFORM

View File

@@ -109,8 +109,6 @@ if (defined $::FORM{'dup_id'} && $::FORM{'knob'} eq "duplicate") {
ValidateComment($::FORM{'comment'});
$::FORM{'dontchange'} = '' unless exists $::FORM{'dontchange'};
# If the bug(s) being modified have dependencies, validate them
# and rebuild the list with the validated values. This is important
# because there are situations where validation changes the value
@@ -1204,22 +1202,21 @@ foreach my $id (@idlist) {
SendSQL("select now()");
$timestamp = FetchOneColumn();
if (UserInGroup(Param('timetrackinggroup'))) {
if ($::FORM{'work_time'} > 99999.99) {
ThrowUserError("value_out_of_range", {field => 'work_time'});
}
if (defined $::FORM{'comment'} || defined $::FORM{'work_time'}) {
if ($::FORM{'work_time'} != 0 &&
(!defined $::FORM{'comment'} || $::FORM{'comment'} =~ /^\s*$/)) {
ThrowUserError('comment_required');
} else {
AppendComment($id, $::COOKIE{'Bugzilla_login'}, $::FORM{'comment'},
$::FORM{'commentprivacy'}, $timestamp, $::FORM{'work_time'});
if ($::FORM{'work_time'} != 0) {
LogActivityEntry($id, "work_time", "", $::FORM{'work_time'},
$whoid, $timestamp);
$bug_changed = 1;
}
if ($::FORM{'work_time'} > 99999.99) {
ThrowUserError("value_out_of_range", {field => 'work_time'});
}
if (defined $::FORM{'comment'} || defined $::FORM{'work_time'}) {
if ($::FORM{'work_time'} != 0 &&
(!defined $::FORM{'comment'} || $::FORM{'comment'} =~ /^\s*$/)) {
ThrowUserError('comment_required');
} else {
AppendComment($id, $::COOKIE{'Bugzilla_login'}, $::FORM{'comment'},
$::FORM{'commentprivacy'}, $timestamp, $::FORM{'work_time'});
if ($::FORM{'work_time'} != 0) {
LogActivityEntry($id, "work_time", "", $::FORM{'work_time'},
$whoid, $timestamp);
$bug_changed = 1;
}
}
}

View File

@@ -164,7 +164,7 @@ sub GetBug {
$bug->{'assignee_email'}) = FetchSQLData();
}
$bug->{'open'} = $bug->{'exists'} && IsOpenedState($bug->{'status'});
$bug->{'open'} = IsOpenedState($bug->{'status'});
$bug->{'dependencies'} = [];
return $bug;