summaryrefslogtreecommitdiff
path: root/includes/HTMLForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/HTMLForm.php')
-rw-r--r--includes/HTMLForm.php53
1 files changed, 1 insertions, 52 deletions
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 @@
<?php
/**
- * This file contain a class to easily build HTML forms as well as custom
- * functions used by SpecialUserrights.php
+ * This file contain a class to easily build HTML forms
*/
/**
@@ -106,53 +105,3 @@ class HTMLForm {
"<textarea name=\"{$varname}\" rows=\"5\" cols=\"{$size}\">{$s}</textarea>\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 .= "<br />";
-
- 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 .= "</select>\n";
- return $out;
-}
-
-?>