From: lpsolit%gmail.com <> Date: Thu, 19 May 2005 09:19:05 +0000 (+0000) Subject: Bug 294655: It is not possible to enter a bug on many installations of Bugzilla 2... X-Git-Tag: bugzilla-2.16.10~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f39cd5eb5110d3e99261957f600337e0425b564a;p=thirdparty%2Fbugzilla.git Bug 294655: It is not possible to enter a bug on many installations of Bugzilla 2.16.9 (regression due to bug 287109) - Patch by Frédéric Buclin r=mkanat a=justdave --- diff --git a/globals.pl b/globals.pl index 046b720f8d..7a7132be8b 100644 --- a/globals.pl +++ b/globals.pl @@ -845,8 +845,14 @@ sub CanEnterProductOrWarn { # Determines whether or not a user can enter bugs into the product. my ($productname) = @_; - if (!GroupExists($productname) + SendSQL("SELECT product FROM products WHERE product = " . + SqlQuote($productname)); + + my $product_exists = (defined(FetchOneColumn())) ? 1 : 0; + + if (!$product_exists || (Param("usebuggroupsentry") + && GroupExists($productname) && !UserInGroup($productname))) { DisplayError("Sorry, either this product does not exist, or you