From: Tim Starling Date: Sat, 14 May 2005 05:42:47 +0000 (+0000) Subject: fixed Special:Userrights log, and a few other Special:Userrights problems X-Git-Tag: 1.5.0alpha2~206 X-Git-Url: http://git.cyclocoop.org/wiki/%7B%7Bpath%7D%7Dmw-config/index.php?a=commitdiff_plain;h=9bc098500659e7c65a9c4c3ca242e36c902cba47;p=lhc%2Fweb%2Fwiklou.git fixed Special:Userrights log, and a few other Special:Userrights problems --- diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 54bbb81e15..b15e70d253 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -13,7 +13,11 @@ */ class HTMLForm { /** name of our form. Used as prefix for labels */ - var $mName; + var $mName, $mRequest; + + function HTMLForm( &$request ) { + $this->mRequest = $request; + } /** * @access private @@ -32,7 +36,9 @@ class HTMLForm { * @param boolean $checked Set true to check the box (default False). */ function checkbox( $varname, $checked=false ) { - $checked = isset( $_POST[$varname] ) && $_POST[$varname] ; + if ( $this->mRequest->wasPosted() && !is_null( $this->mRequest->getVal( $varname ) ) ) { + $checked = $this->mRequest->getCheck( $varname ); + } return "