From f39cd5eb5110d3e99261957f600337e0425b564a Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 19 May 2005 09:19:05 +0000 Subject: [PATCH] =?utf8?q?Bug=20294655:=20It=20is=20not=20possible=20to=20?= =?utf8?q?enter=20a=20bug=20on=20many=20installations=20of=20Bugzilla=202.?= =?utf8?q?16.9=20(regression=20due=20to=20bug=20287109)=20-=20Patch=20by?= =?utf8?q?=20Fr=C3=A9d=C3=A9ric=20Buclin=20=20r=3Dmkana?= =?utf8?q?t=20a=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- globals.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.47.2