Commit ef4cce63 authored by jocuri%softhome.net's avatar jocuri%softhome.net

Patch for bug 194472; link to the product's component editor when displaying…

Patch for bug 194472; link to the product's component editor when displaying error regarding lack of components; patch written by me based on the work and review of chaduv and jouni; r=kiko; a=justdave.
parent 4831ddd2
...@@ -238,7 +238,7 @@ if (lsearch(\@::enterable_products, $product) == -1) { ...@@ -238,7 +238,7 @@ if (lsearch(\@::enterable_products, $product) == -1) {
my $product_id = get_product_id($product); my $product_id = get_product_id($product);
if (0 == @{$::components{$product}}) { if (0 == @{$::components{$product}}) {
ThrowUserError("no_components"); ThrowUserError("no_components", {product => $product});
} }
elsif (1 == @{$::components{$product}}) { elsif (1 == @{$::components{$product}}) {
# Only one component; just pick it. # Only one component; just pick it.
......
...@@ -529,7 +529,8 @@ ...@@ -529,7 +529,8 @@
Sorry; there needs to be at least one component for this product in order Sorry; there needs to be at least one component for this product in order
to create a new [% terms.bug %]. to create a new [% terms.bug %].
[% IF UserInGroup("editcomponents") %] [% IF UserInGroup("editcomponents") %]
<a href="editcomponents.cgi">Create a new component</a>. <a href="editcomponents.cgi?product=[% product FILTER url_quote %]">Create
a new component</a>.
[% ELSE %] [% ELSE %]
Please contact [% Param("maintainer") %], giving the name of Please contact [% Param("maintainer") %], giving the name of
the product in which you tried to create a new [% terms.bug %]. the product in which you tried to create a new [% terms.bug %].
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment