From: jake%acutex.net <> Date: Sat, 20 Oct 2001 07:50:27 +0000 (+0000) Subject: Bug 105480 - Use the friendly name from the fielddefs table when reporting strictvalu... X-Git-Tag: bugzilla-2.14.1~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a2eccfb5aedd00f469c3dc2395663eb455ea32e;p=thirdparty%2Fbugzilla.git Bug 105480 - Use the friendly name from the fielddefs table when reporting strictvalue errors if it's available. Patch by James A. Laska r= justdave@syndicomm.com, jake@acutex.net --- diff --git a/CGI.pl b/CGI.pl index 80b6cb9baf..8061f791b8 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; }