https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103504
Revision: 103504
Author: ialex
Date: 2011-11-17 20:30:28 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
Use local context to get messages
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialBooksources.php
Modified: trunk/phase3/includes/specials/SpecialBooksources.php
===================================================================
--- trunk/phase3/includes/specials/SpecialBooksources.php 2011-11-17
20:23:15 UTC (rev 103503)
+++ trunk/phase3/includes/specials/SpecialBooksources.php 2011-11-17
20:30:28 UTC (rev 103504)
@@ -115,11 +115,11 @@
private function makeForm() {
global $wgScript;
- $form = '<fieldset><legend>' . wfMsgHtml(
'booksources-search-legend' ) . '</legend>';
+ $form = '<fieldset><legend>' . $this->msg(
'booksources-search-legend' )->escaped() . '</legend>';
$form .= Xml::openElement( 'form', array( 'method' => 'get',
'action' => $wgScript ) );
$form .= Html::hidden( 'title',
$this->getTitle()->getPrefixedText() );
- $form .= '<p>' . Xml::inputLabel( wfMsg( 'booksources-isbn' ),
'isbn', 'isbn', 20, $this->isbn );
- $form .= ' ' . Xml::submitButton( wfMsg( 'booksources-go'
) ) . '</p>';
+ $form .= '<p>' . Xml::inputLabel( $this->msg(
'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn );
+ $form .= ' ' . Xml::submitButton( $this->msg(
'booksources-go' )->text() ) . '</p>';
$form .= Xml::closeElement( 'form' );
$form .= '</fieldset>';
return $form;
@@ -139,7 +139,8 @@
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() ) );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs