From 70711889debb8b059c20c94435414d8c25f57e76 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 3 Jul 2006 16:21:42 +0000 Subject: Bug 343364: Changing Multiple Bugs is broken - Patch by Olav Vitters r=LpSolit a=justdave --- Bugzilla/Bug.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Bugzilla/Bug.pm') 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); -- cgit v1.2.3-24-g4f1b