From 78650b844798eb7b1cb31c4db6d7ad2771ff26c0 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 17 Nov 2011 20:30:28 +0000 Subject: [PATCH] Use local context to get messages --- includes/specials/SpecialBooksources.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php index 208193299d..48ca4f05d5 100644 --- a/includes/specials/SpecialBooksources.php +++ b/includes/specials/SpecialBooksources.php @@ -115,11 +115,11 @@ class SpecialBookSources extends SpecialPage { private function makeForm() { global $wgScript; - $form = '
' . wfMsgHtml( 'booksources-search-legend' ) . ''; + $form = '
' . $this->msg( 'booksources-search-legend' )->escaped() . ''; $form .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); $form .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); - $form .= '

' . Xml::inputLabel( wfMsg( 'booksources-isbn' ), 'isbn', 'isbn', 20, $this->isbn ); - $form .= ' ' . Xml::submitButton( wfMsg( 'booksources-go' ) ) . '

'; + $form .= '

' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn ); + $form .= ' ' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . '

'; $form .= Xml::closeElement( 'form' ); $form .= '
'; return $form; @@ -139,7 +139,8 @@ class SpecialBookSources extends SpecialPage { wfRunHooks( 'BookInformation', array( $this->isbn, $this->getOutput() ) ); # Check for a local page such as Project:Book_sources and use that if available - $title = Title::makeTitleSafe( NS_PROJECT, wfMsgForContent( 'booksources' ) ); # Show list in content language + $page = $this->msg( 'booksources' )->inContentLanguage()->text(); + $title = Title::makeTitleSafe( NS_PROJECT, $page ); # Show list in content language if( is_object( $title ) && $title->exists() ) { $rev = Revision::newFromTitle( $title ); $this->getOutput()->addWikiText( str_replace( 'MAGICNUMBER', $this->isbn, $rev->getText() ) ); -- 2.20.1