From d08055149cf3a75db593a5ea9fb00ec9445d4c0b Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 8 Nov 2011 16:04:25 +0000 Subject: [PATCH] * Use local context to get messages * Changed three isset() to [!=]== null --- includes/specials/SpecialAllpages.php | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php index 8395b4e17d..8cf9333e36 100644 --- a/includes/specials/SpecialAllpages.php +++ b/includes/specials/SpecialAllpages.php @@ -80,9 +80,9 @@ class SpecialAllpages extends IncludableSpecialPage { ); $out->addModuleStyles( 'mediawiki.special' ); - if( isset($par) ) { + if( $par !== null ) { $this->showChunk( $namespace, $par, $to ); - } elseif( isset($from) && !isset($to) ) { + } elseif( $from !== null && $to == null ) { $this->showChunk( $namespace, $from, $to ); } else { $this->showToplevel( $namespace, $from, $to ); @@ -104,11 +104,11 @@ class SpecialAllpages extends IncludableSpecialPage { $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); $out .= Html::hidden( 'title', $t->getPrefixedText() ); $out .= Xml::openElement( 'fieldset' ); - $out .= Xml::element( 'legend', null, wfMsg( 'allpages' ) ); + $out .= Xml::element( 'legend', null, $this->msg( 'allpages' )->text() ); $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) ); $out .= " " . - Xml::label( wfMsg( 'allpagesfrom' ), 'nsfrom' ) . + Xml::label( $this->msg( 'allpagesfrom' )->text(), 'nsfrom' ) . " " . Xml::input( 'from', 30, str_replace('_',' ',$from), array( 'id' => 'nsfrom' ) ) . @@ -116,7 +116,7 @@ class SpecialAllpages extends IncludableSpecialPage { " . - Xml::label( wfMsg( 'allpagesto' ), 'nsto' ) . + Xml::label( $this->msg( 'allpagesto' )->text(), 'nsto' ) . " " . Xml::input( 'to', 30, str_replace('_',' ',$to), array( 'id' => 'nsto' ) ) . @@ -124,11 +124,11 @@ class SpecialAllpages extends IncludableSpecialPage { " . - Xml::label( wfMsg( 'namespace' ), 'namespace' ) . + Xml::label( $this->msg( 'namespace' )->text(), 'namespace' ) . " " . Xml::namespaceSelector( $namespace, null ) . ' ' . - Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . + Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . " "; $out .= Xml::closeElement( 'table' ); @@ -249,7 +249,7 @@ class SpecialAllpages extends IncludableSpecialPage { $nsForm . ' ' . - Linker::link( $this->getTitle(), wfMsgHtml ( 'allpages' ), + Linker::link( $this->getTitle(), $this->msg( 'allpages' )->escaped(), array(), array(), 'known' ) . " " . @@ -280,10 +280,10 @@ class SpecialAllpages extends IncludableSpecialPage { $special = $this->getTitle(); $link = $special->escapeLocalUrl( $queryparams . 'from=' . urlencode($inpoint) . '&to=' . urlencode($outpoint) ); - $out = wfMsgHtml( 'alphaindexline', + $out = $this->msg( 'alphaindexline' )->rawParams( "$inpointf", "$outpointf" - ); + )->escaped(); return '' . $out . ''; } @@ -302,10 +302,10 @@ class SpecialAllpages extends IncludableSpecialPage { $n = 0; if ( !$fromList || !$toList ) { - $out = wfMsgExt( 'allpagesbadtitle', 'parse' ); + $out = $this->msg( 'allpagesbadtitle' )->parseAsBlock(); } elseif ( !in_array( $namespace, array_keys( $namespaces ) ) ) { // Show errormessage and reset to NS_MAIN - $out = wfMsgExt( 'allpages-bad-ns', array( 'parseinline' ), $namespace ); + $out = $this->msg( 'allpages-bad-ns', $namespace )->parse(); $namespace = NS_MAIN; } else { list( $namespace, $fromKey, $from ) = $fromList; @@ -410,7 +410,7 @@ class SpecialAllpages extends IncludableSpecialPage { $nsForm . ' ' . - Linker::link( $self, wfMsgHtml ( 'allpages' ) ); + Linker::link( $self, $this->msg( 'allpages' )->escaped() ); # Do we put a previous link ? if( isset( $prevTitle ) && $pt = $prevTitle->getText() ) { @@ -421,7 +421,7 @@ class SpecialAllpages extends IncludableSpecialPage { $prevLink = Linker::linkKnown( $self, - wfMessage( 'prevpage', $pt )->escaped(), + $this->msg( 'prevpage', $pt )->escaped(), array(), $query ); @@ -438,7 +438,7 @@ class SpecialAllpages extends IncludableSpecialPage { $nextLink = Linker::linkKnown( $self, - wfMessage( 'nextpage', $t->getText() )->escaped(), + $this->msg( 'nextpage', $t->getText() )->escaped(), array(), $query ); -- 2.20.1