]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 294655: It is not possible to enter a bug on many installations of Bugzilla 2...
authorlpsolit%gmail.com <>
Thu, 19 May 2005 09:19:05 +0000 (09:19 +0000)
committerlpsolit%gmail.com <>
Thu, 19 May 2005 09:19:05 +0000 (09:19 +0000)
globals.pl

index 046b720f8d6b7247a37a2ec63b44dc15a8a14041..7a7132be8b0c3c016b4e6d805530c01344bda3ae 100644 (file)
@@ -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