diff options
author | jake%acutex.net <> | 2001-10-20 09:50:27 +0200 |
---|---|---|
committer | jake%acutex.net <> | 2001-10-20 09:50:27 +0200 |
commit | 1a2eccfb5aedd00f469c3dc2395663eb455ea32e (patch) | |
tree | 4540291e6a7c8851effb17c7dee312f5cb57dfc0 | |
parent | 7bf968836879293f2c3569a4bffa516ba346b7cd (diff) | |
download | bugzilla-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
-rw-r--r-- | CGI.pl | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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; } |