diff options
author | lpsolit%gmail.com <> | 2006-07-03 18:21:42 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-07-03 18:21:42 +0200 |
commit | 70711889debb8b059c20c94435414d8c25f57e76 (patch) | |
tree | 949784efbdda8de7b155a23a6d2f792ee5586eac | |
parent | 085a4fb5da54ab0031ee44a98f50ccde0a10852d (diff) | |
download | bugzilla-70711889debb8b059c20c94435414d8c25f57e76.tar.gz bugzilla-70711889debb8b059c20c94435414d8c25f57e76.tar.xz |
Bug 343364: Changing Multiple Bugs is broken - Patch by Olav Vitters <bugzilla-mozilla@bkor.dhs.org> r=LpSolit a=justdave
-rwxr-xr-x | Bugzilla/Bug.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 91a92cbe2..857557def 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -107,13 +107,6 @@ sub initBug { # If the bug ID isn't numeric, it might be an alias, so try to convert it. $bug_id = bug_alias_to_id($bug_id) if $bug_id !~ /^0*[1-9][0-9]*$/; - if ((! defined $bug_id) || (!$bug_id) || (!detaint_natural($bug_id))) { - # no bug number given or the alias didn't match a bug - $self->{'bug_id'} = $old_bug_id; - $self->{'error'} = "InvalidBugId"; - return $self; - } - # If the user is not logged in, sets $user_id to 0. # Else gets $user_id from the user login name if this # argument is not numeric. @@ -126,6 +119,13 @@ sub initBug { $self->{'who'} = new Bugzilla::User($user_id); + if ((! defined $bug_id) || (!$bug_id) || (!detaint_natural($bug_id))) { + # no bug number given or the alias didn't match a bug + $self->{'bug_id'} = $old_bug_id; + $self->{'error'} = "InvalidBugId"; + return $self; + } + my $custom_fields = ""; if (scalar(Bugzilla->custom_field_names) > 0) { $custom_fields = ", " . join(", ", Bugzilla->custom_field_names); |