From 19bd3e7b28f6bf97c3d5f0abf622a3fe4b1f11b3 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 17 Sep 2006 17:59:22 +0000 Subject: [PATCH] r1158: - Fix the product display - Remove a warning if there are no versions under a product --- admin/product.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/admin/product.php b/admin/product.php index 399b0db..e87fdd7 100755 --- a/admin/product.php +++ b/admin/product.php @@ -358,7 +358,7 @@ EOF; { if (!$prod['componentmother']) { - $product["$prod[productid]"] = $prod; + $products["$prod[productid]"] = $prod; } else { @@ -394,9 +394,12 @@ EOF; $admin->row_text("$product[title]", construct_option_list(_('Product'), $product['productid'], 1, 1, 1, 1, $product['displayorder']), 'middle', 2, 'alt3'); // Versions - foreach ($versions["$product[productid]"] AS $version) + if (is_array($versions["$product[productid]"])) { - $admin->row_text('-- ' . $version['version'], construct_option_list(_('Version'), $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2'); + foreach ($versions["$product[productid]"] AS $version) + { + $admin->row_text('-- ' . $version['version'], construct_option_list(_('Version'), $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2'); + } } // Components -- 2.43.5