summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-10-20 09:50:27 +0200
committerjake%acutex.net <>2001-10-20 09:50:27 +0200
commit1a2eccfb5aedd00f469c3dc2395663eb455ea32e (patch)
tree4540291e6a7c8851effb17c7dee312f5cb57dfc0 /CGI.pl
parent7bf968836879293f2c3569a4bffa516ba346b7cd (diff)
downloadbugzilla-1a2eccfb5aedd00f469c3dc2395663eb455ea32e.tar.gz
bugzilla-1a2eccfb5aedd00f469c3dc2395663eb455ea32e.tar.xz
Bug 105480 - Use the friendly name from the fielddefs table when reporting strictvalue errors if it's available.
Patch by James A. Laska <jlaska@us.ibm.com> r= justdave@syndicomm.com, jake@acutex.net
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/CGI.pl b/CGI.pl
index 80b6cb9ba..8061f791b 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -208,8 +208,15 @@ sub CheckFormField (\%$;\@) {
(defined($legalsRef) &&
lsearch($legalsRef, $formRef->{$fieldname})<0) ){
- print "A legal $fieldname was not set; ";
- print Param("browserbugmessage");
+ SendSQL("SELECT description FROM fielddefs WHERE name=" . SqlQuote($fieldname));
+ my $result = FetchOneColumn();
+ if ($result) {
+ PuntTryAgain("A legal $result was not set.");
+ }
+ else {
+ PuntTryAgain("A legal $fieldname was not set.");
+ print Param("browserbugmessage");
+ }
PutFooter();
exit 0;
}