Thursday, 16 August 2007

Bug: Unchecking once-checked flag boxes in monthly logs

The {\tt monthlog::updateFromCGI} method failed to clear flag fields which the user had once checked and then subsequently unchecked. This was because the browser does not send CGI arguments for {\tt checkbox} fields which are not checked, and the code was assuming these fields would be sent, but with a null value. I added code which tests, if a flag field is not defined in the CGI arguments, whether the database field for the flag is set and, if so, turns it off. (Reported by Michael Kiesel.)

No comments: