]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 105480 - Use the friendly name from the fielddefs table when reporting strictvalu...
authorjake%acutex.net <>
Sat, 20 Oct 2001 07:50:27 +0000 (07:50 +0000)
committerjake%acutex.net <>
Sat, 20 Oct 2001 07:50:27 +0000 (07:50 +0000)
Patch by James A. Laska <jlaska@us.ibm.com>
r= justdave@syndicomm.com, jake@acutex.net

CGI.pl

diff --git a/CGI.pl b/CGI.pl
index 80b6cb9baf2e29c7f99e06df8477ef65f1577799..8061f791b8a996e4753e973ded1915006735d6b1 100644 (file)
--- 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;
       }