From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- extensions/InputBox/InputBox.classes.php | 171 ++++++++++++++++++++++++------- 1 file changed, 135 insertions(+), 36 deletions(-) (limited to 'extensions/InputBox/InputBox.classes.php') diff --git a/extensions/InputBox/InputBox.classes.php b/extensions/InputBox/InputBox.classes.php index 380015cc..a9a920f9 100644 --- a/extensions/InputBox/InputBox.classes.php +++ b/extensions/InputBox/InputBox.classes.php @@ -44,14 +44,17 @@ class InputBox { // Split caches by language, to make sure visitors do not see a cached // version in a random language (since labels are in the user language) $this->mParser->getOptions()->getUserLangObj(); + $this->mParser->getOutput()->addModuleStyles( 'ext.inputBox.styles' ); } public function render() { // Handle various types - switch( $this->mType ) { + switch ( $this->mType ) { case 'create': case 'comment': return $this->getCreateForm(); + case 'move': + return $this->getMoveForm(); case 'commenttitle': return $this->getCommentForm(); case 'search': @@ -84,25 +87,33 @@ class InputBox { // Use button label fallbacks if ( !$this->mButtonLabel ) { - $this->mButtonLabel = wfMessage( 'tryexact' )->escaped(); + $this->mButtonLabel = wfMessage( 'inputbox-tryexact' )->text(); } if ( !$this->mSearchButtonLabel ) { - $this->mSearchButtonLabel = wfMessage( 'searchfulltext' )->escaped(); + $this->mSearchButtonLabel = wfMessage( 'inputbox-searchfulltext' )->text(); } + if ( $this->mID !== '' ) { + $idArray = array( 'id' => Sanitizer::escapeId( $this->mID ) ); + } else { + $idArray = array(); + } + // We need a unqiue id to link