summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-09-28 06:47:32 +0200
committerlpsolit%gmail.com <>2005-09-28 06:47:32 +0200
commitb6004bbf18e311b9d9856d1c674092406454c6b0 (patch)
tree0fbdc5fe3138291ea4b09ec08cb9440997fa2457
parent6d8b5d06db38943257610f64a6a11b526e1a0c94 (diff)
downloadbugzilla-b6004bbf18e311b9d9856d1c674092406454c6b0.tar.gz
bugzilla-b6004bbf18e311b9d9856d1c674092406454c6b0.tar.xz
Bug 308318: Can create a product without description but cannot remove an existing description - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wicked a=justdave
-rwxr-xr-xeditproducts.cgi6
-rw-r--r--template/en/default/global/user-error.html.tmpl6
2 files changed, 11 insertions, 1 deletions
diff --git a/editproducts.cgi b/editproducts.cgi
index 54f1de190..82ce7433d 100755
--- a/editproducts.cgi
+++ b/editproducts.cgi
@@ -303,6 +303,12 @@ if ($action eq 'new') {
}
my $description = trim($cgi->param('description') || '');
+
+ if ($description eq '') {
+ ThrowUserError('product_must_have_description',
+ {'product' => $product});
+ }
+
my $milestoneurl = trim($cgi->param('milestoneurl') || '');
my $disallownew = 0;
$disallownew = 1 if $cgi->param('disallownew');
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 8288a309d..f23220d29 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -1015,8 +1015,12 @@
You must reassign those [% terms.bugs %] to another product before you
can delete this one.
+ [% ELSIF error == "product_must_have_description" %]
+ [% title = "Product needs Description" %]
+ You must enter a description for product '[% product FILTER html %]'.
+
[% ELSIF error == "product_must_have_version" %]
- [% title = "Product needs version" %]
+ [% title = "Product needs Version" %]
You must enter a version for product '[% product FILTER html %]'.
[% ELSIF error == "product_not_specified" %]