Allow the 'other' parameter for HTMLForm selectorother: it is used in SpecialBlock...
authorRobin Pepermans <robin@users.mediawiki.org>
Sat, 9 Jul 2011 19:33:58 +0000 (19:33 +0000)
committerRobin Pepermans <robin@users.mediawiki.org>
Sat, 9 Jul 2011 19:33:58 +0000 (19:33 +0000)
includes/HTMLForm.php

index c73d536..ffa1f4b 100644 (file)
@@ -1375,7 +1375,8 @@ class HTMLSelectOrOtherField extends HTMLTextField {
 
        function __construct( $params ) {
                if ( !in_array( 'other', $params['options'], true ) ) {
-                       $params['options'][wfMsg( 'htmlform-selectorother-other' )] = 'other';
+                       $msg = $params['other'] ? $params['other'] : wfMsg( 'htmlform-selectorother-other' );
+                       $params['options'][$msg] = 'other';
                }
 
                parent::__construct( $params );