From 2878faf418bf437fdf422ac05c1f38dd40e8772e Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 25 Oct 2006 00:59:39 +0000 Subject: [PATCH] r1272: In admin/product.php, in construct_option_list(), don't calculate $type and $type_display; instead, actuall add them as arguments because when using a foreign language, $type is used to generate the DO action and it would be translated (so not in English) so this page wouldn't work. --- admin/product.php | 16 +++++++--------- docs/changes.txt | 1 + 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/admin/product.php b/admin/product.php index 703fc80..92735e2 100755 --- a/admin/product.php +++ b/admin/product.php @@ -32,12 +32,10 @@ if (!can_perform('canadminversions')) admin_login(); } -function construct_option_list($type, $id, $edit, $addcomponent, $addversion, $delete, $displayorder) +function construct_option_list($type_display, $type, $id, $edit, $addcomponent, $addversion, $delete, $displayorder) { global $bugsys; - $type_display = $type; - $type = strtolower($type); $type = ($type == 'component' ? 'product' : $type); $type_action = (($type == 'version') ? 'versionid' : 'productid'); @@ -383,10 +381,10 @@ EOF; // Handle our global versions if (is_array($versions['0'])) { - $admin->row_text(_('Global Versions'), construct_option_list(_('Product'), -1, 0, 0, 1, 0, -1), 'middle', 2, 'alt3'); + $admin->row_text(_('Global Versions'), construct_option_list(_('Product'), 'product', -1, 0, 0, 1, 0, -1), 'middle', 2, 'alt3'); foreach ($versions['0'] AS $version) { - $admin->row_text('-- ' . $version['version'], construct_option_list(_('Version'), $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2'); + $admin->row_text('-- ' . $version['version'], construct_option_list(_('Version'), 'version', $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2'); } } @@ -394,14 +392,14 @@ EOF; foreach ($products AS $product) { // Product - $admin->row_text("$product[title]", construct_option_list(_('Product'), $product['productid'], 1, 1, 1, 1, $product['displayorder']), 'middle', 2, 'alt3'); + $admin->row_text("$product[title]", construct_option_list(_('Product'), 'product', $product['productid'], 1, 1, 1, 1, $product['displayorder']), 'middle', 2, 'alt3'); // Versions if (is_array($versions["$product[productid]"])) { 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'); + $admin->row_text('-- ' . $version['version'], construct_option_list(_('Version'), 'version', $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2'); } } @@ -410,14 +408,14 @@ EOF; { foreach ($components["$product[productid]"] AS $comp) { - $admin->row_text("-- $comp[title]", construct_option_list(_('Component'), $comp['productid'], 1, 0, 1, 1, $comp['displayorder']), 'middle', 2, 'alt1'); + $admin->row_text("-- $comp[title]", construct_option_list(_('Component'), 'component', $comp['productid'], 1, 0, 1, 1, $comp['displayorder']), 'middle', 2, 'alt1'); // Component versions if (is_array($versions["$comp[productid]"])) { foreach ($versions["$comp[productid]"] AS $version) { - $admin->row_text('---- ' . $version['version'], construct_option_list(_('Version'), $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2'); + $admin->row_text('---- ' . $version['version'], construct_option_list(_('Version'), 'version', $version['versionid'], 1, 0, 0, 1, $version['displayorder']), 'middle', 2, 'alt2'); } } } diff --git a/docs/changes.txt b/docs/changes.txt index aaa576e..e1c3311 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -5,6 +5,7 @@ - When searching and selecting multiple items for a field, only the first one is used in the search (http://www.bluestatic.org/bugs/showreport.php?bugid=39) - Need to cast the unserialized data to an array to remove an implode() warning [admin/field.php#235] - When $bugsys->options['pagelinks'] is set to 0, it now actually does its advertised behavior (http://www.bluestatic.org/bugs/showreport.php?bugid=45) +- Foreign langauge users cannot use the product/component editing system beacause localized strings are used to create the do actions instead of english variable ones (http://www.bluestatic.org/bugs/showreport.php?bugid=42) 1.1.3 =============================== -- 2.43.5