Pass the user as an argument to 'isValidPassword' hook callbacks; see docs/hooks...
[lhc/web/wiklou.git] / includes / HTMLForm.php
index 2f0d995..0aaa076 100644 (file)
@@ -2,13 +2,11 @@
 /**
  * This file contain a class to easily build HTML forms as well as custom
  * functions used by SpecialUserrights.php
- * @package MediaWiki
  */
 
 /**
  * Class to build various forms
  *
- * @package MediaWiki
  * @author jeluf, hashar
  */
 class HTMLForm {
@@ -71,7 +69,7 @@ class HTMLForm {
                                ( $checked ? ' checked="checked"' : '' ) . " />" . wfMsg( $this->mName.'-'.$varname.'-'.$value ) .
                                "</label></div>\n";
                }
-               return $this->fieldset( $this->mName.'-'.$varname, $s );
+               return $this->fieldset( $varname, $s );
        }
 
        /**
@@ -99,7 +97,7 @@ class HTMLForm {
                if ( $this->mRequest->wasPosted() ) {
                        $arr = $this->mRequest->getArray( $varname );
                        if ( is_array( $arr ) ) {
-                               foreach ( $_POST[$varname] as $index => $element ) {
+                               foreach ( $_POST[$varname] as $element ) {
                                        $s .= htmlspecialchars( $element )."\n";
                                }
                        }
@@ -125,6 +123,7 @@ class HTMLForm {
 function HTMLSelectGroups($selectname, $selectmsg, $selected=array(), $multiple=false, $size=6, $reverse=false) {
        $groups = User::getAllGroups();
        $out = htmlspecialchars( wfMsg( $selectmsg ) );
+       $out .= "<br />";
 
        if( $multiple ) {
                $attribs = array(
@@ -134,7 +133,8 @@ function HTMLSelectGroups($selectname, $selectmsg, $selected=array(), $multiple=
        } else {
                $attribs = array( 'name' => $selectname );
        }
-       $out .= wfElement( 'select', $attribs, null );
+       $attribs['style'] = 'width: 100%';
+       $out .= wfOpenElement( 'select', $attribs );
 
        foreach( $groups as $group ) {
                $attribs = array( 'value' => $group );
@@ -155,4 +155,4 @@ function HTMLSelectGroups($selectname, $selectmsg, $selected=array(), $multiple=
        return $out;
 }
 
-?>
+