From a32ebf23fd03d1e1649075e0a4fc9ae2041c6bc8 Mon Sep 17 00:00:00 2001 From: Happy-melon Date: Mon, 17 Oct 2011 16:16:26 +0000 Subject: [PATCH] (bug 31405) block reason preload. Patch by Brad Jorsch. --- includes/HTMLForm.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 5a46ee6a3f..a9cbc79bad 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -1706,7 +1706,17 @@ class HTMLSelectAndOtherField extends HTMLSelectField { } else { $final = $this->getDefault(); - $list = $text = ''; + + $list = 'other'; + $text = $final; + foreach ( $this->mFlatOptions as $option ) { + $match = $option . wfMsgForContent( 'colon-separator' ); + if( strpos( $text, $match ) === 0 ) { + $list = $option; + $text = substr( $text, strlen( $match ) ); + break; + } + } } return array( $final, $list, $text ); } -- 2.20.1