From 8f416baead93a48e5799e44b8bd2e2c4859f4e04 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 14 Sep 2007 13:18:58 +0200 Subject: auf Version 1.11 aktualisiert; Login-Bug behoben --- includes/HTMLForm.php | 53 +-------------------------------------------------- 1 file changed, 1 insertion(+), 52 deletions(-) (limited to 'includes/HTMLForm.php') diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 715c8c88..69ec1007 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -1,7 +1,6 @@ {$s}\n"; } } // end class - -/** Build a select with all defined groups - * - * used by SpecialUserrights.php - * @todo move it to there, and don't forget to copy it for SpecialMakesysop.php - * - * @param $selectname String: name of this element. Name of form is automaticly prefixed. - * @param $selectmsg String: FIXME - * @param $selected Array: array of element selected when posted. Only multiples will show them. - * @param $multiple Boolean: A multiple elements select. - * @param $size Integer: number of elements to be shown ignored for non-multiple (default 6). - * @param $reverse Boolean: if true, multiple select will hide selected elements (default false). - * @todo Document $selectmsg -*/ -function HTMLSelectGroups($selectname, $selectmsg, $selected=array(), $multiple=false, $size=6, $reverse=false) { - $groups = User::getAllGroups(); - $out = htmlspecialchars( wfMsg( $selectmsg ) ); - $out .= "
"; - - if( $multiple ) { - $attribs = array( - 'name' => $selectname . '[]', - 'multiple'=> 'multiple', - 'size' => $size ); - } else { - $attribs = array( 'name' => $selectname ); - } - $attribs['style'] = 'width: 100%'; - $out .= wfElement( 'select', $attribs, null ); - - foreach( $groups as $group ) { - $attribs = array( 'value' => $group ); - if( $multiple ) { - // for multiple will only show the things we want - if( !in_array( $group, $selected ) xor $reverse ) { - continue; - } - } else { - if( in_array( $group, $selected ) ) { - $attribs['selected'] = 'selected'; - } - } - $out .= wfElement( 'option', $attribs, User::getGroupName( $group ) ) . "\n"; - } - - $out .= "\n"; - return $out; -} - -?> -- cgit v1.2.2