summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-10-22 04:55:45 +0200
committerlpsolit%gmail.com <>2008-10-22 04:55:45 +0200
commit96c07aa8e5b598b60cee425bf3385773796a94f2 (patch)
tree907a9c7f308ad9889bcae98ae970933f7cc209ef
parentafa6ca704ab8002ec12ff5ae8b5d20b4ad64046a (diff)
downloadbugzilla-96c07aa8e5b598b60cee425bf3385773796a94f2.tar.gz
bugzilla-96c07aa8e5b598b60cee425bf3385773796a94f2.tar.xz
Bug 347991: Classifications without products don't show up in editproducts.cgi - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
-rwxr-xr-xeditproducts.cgi8
1 files changed, 5 insertions, 3 deletions
diff --git a/editproducts.cgi b/editproducts.cgi
index e3af7986e..fcca94838 100755
--- a/editproducts.cgi
+++ b/editproducts.cgi
@@ -80,8 +80,9 @@ if (Bugzilla->params->{'useclassification'}
&& !$classification_name
&& !$product_name)
{
- $vars->{'classifications'} = $user->get_selectable_classifications;
-
+ $vars->{'classifications'} = $user->in_group('editcomponents') ?
+ [Bugzilla::Classification::get_all_classifications] : $user->get_selectable_classifications;
+
$template->process("admin/products/list-classifications.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
exit;
@@ -231,7 +232,8 @@ if ($action eq 'delete') {
$vars->{'no_edit_product_link'} = 1;
if (Bugzilla->params->{'useclassification'}) {
- $vars->{'classifications'} = $user->get_selectable_classifications;
+ $vars->{'classifications'} = $user->in_group('editcomponents') ?
+ [Bugzilla::Classification::get_all_classifications] : $user->get_selectable_classifications;
$template->process("admin/products/list-classifications.html.tmpl", $vars)
|| ThrowTemplateError($template->error());