From 5f2ad10840f59c6e8c36168a07dc675b25a3b425 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 13 Dec 2006 02:16:52 +0000 Subject: [PATCH] r1367: Set the default value for obsoletes to be no --- admin/product.php | 2 +- includes/functions_product.php | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/admin/product.php b/admin/product.php index d98a0d9..cd78dea 100755 --- a/admin/product.php +++ b/admin/product.php @@ -132,7 +132,7 @@ if ($_REQUEST['do'] == 'addversion') $admin->table_head(_('Add New Version')); $admin->row_input(_('Version Number
This is the version string for this product.
'), 'version'); $admin->row_input(_('Display Order
The order in which the versions are displayed.
'), 'displayorder'); - $admin->row_yesno(_('Obsolete
An obsolete version cannot have new bugs filed against it, but existing ones can be set to it.
'), 'obsolete'); + $admin->row_yesno(_('Obsolete
An obsolete version cannot have new bugs filed against it, but existing ones can be set to it.
'), 'obsolete', false); $admin->row_submit(); $admin->table_end(); $admin->form_end(); diff --git a/includes/functions_product.php b/includes/functions_product.php index a6ee0a6..19f2708 100644 --- a/includes/functions_product.php +++ b/includes/functions_product.php @@ -53,12 +53,18 @@ function ConstructProductSelect($action = 'canviewbugs', $select = null, $obsole continue; } - $output .= ConstructOptionGroup($product['title'], ConstructVersionSelect($productid, $select, $obsolete)); + if ($versions = ConstructVersionSelect($productid, $select, $obsolete)) + { + $output .= ConstructOptionGroup($product['title'], $versions); + } // these are components - foreach ($components["$productid"] AS $componentid => $component) + if ($components["$productid"]) { - $output .= ConstructOptionGroup($product['title'] . '/' . $component['title'], ConstructVersionSelect($componentid, $select, $obsolete)); + foreach ($components["$productid"] AS $componentid => $component) + { + $output .= ConstructOptionGroup($product['title'] . '/' . $component['title'], ConstructVersionSelect($componentid, $select, $obsolete)); + } } } -- 2.43.5