]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 565790: Unprivileged users cannot create bugs anymore
authorFrédéric Buclin <LpSolit@gmail.com>
Fri, 14 May 2010 10:31:18 +0000 (12:31 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Fri, 14 May 2010 10:31:18 +0000 (12:31 +0200)
r/a=mkanat

enter_bug.cgi

index d85a9f060ea097477b6e0e62c0a6ecb703341b8a..4aa6a29d9a3244ffa8b3f230f33c1897313a22c2 100755 (executable)
@@ -548,9 +548,8 @@ scalar(@statuses) || ThrowUserError('no_initial_bug_status');
 # If the user has no privs...
 unless ($has_editbugs || $has_canconfirm) {
     # ... use UNCONFIRMED if available, else use the first status of the list.
-    my $bug_status = (grep { $_->name eq 'UNCONFIRMED' } @statuses) 
-                     ? 'UNCONFIRMED' : $statuses[0]->name;
-    @statuses = ($bug_status);
+    my ($unconfirmed) = grep { $_->name eq 'UNCONFIRMED' } @statuses;
+    @statuses = ($unconfirmed || $statuses[0]);
 }
 
 $vars->{'bug_status'} = \@statuses;