Index: trunk/phase3/includes/specials/SpecialAllpages.php |
— | — | @@ -80,9 +80,9 @@ |
81 | 81 | ); |
82 | 82 | $out->addModuleStyles( 'mediawiki.special' ); |
83 | 83 | |
84 | | - if( isset($par) ) { |
| 84 | + if( $par !== null ) { |
85 | 85 | $this->showChunk( $namespace, $par, $to ); |
86 | | - } elseif( isset($from) && !isset($to) ) { |
| 86 | + } elseif( $from !== null && $to == null ) { |
87 | 87 | $this->showChunk( $namespace, $from, $to ); |
88 | 88 | } else { |
89 | 89 | $this->showToplevel( $namespace, $from, $to ); |
— | — | @@ -104,11 +104,11 @@ |
105 | 105 | $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); |
106 | 106 | $out .= Html::hidden( 'title', $t->getPrefixedText() ); |
107 | 107 | $out .= Xml::openElement( 'fieldset' ); |
108 | | - $out .= Xml::element( 'legend', null, wfMsg( 'allpages' ) ); |
| 108 | + $out .= Xml::element( 'legend', null, $this->msg( 'allpages' )->text() ); |
109 | 109 | $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) ); |
110 | 110 | $out .= "<tr> |
111 | 111 | <td class='mw-label'>" . |
112 | | - Xml::label( wfMsg( 'allpagesfrom' ), 'nsfrom' ) . |
| 112 | + Xml::label( $this->msg( 'allpagesfrom' )->text(), 'nsfrom' ) . |
113 | 113 | " </td> |
114 | 114 | <td class='mw-input'>" . |
115 | 115 | Xml::input( 'from', 30, str_replace('_',' ',$from), array( 'id' => 'nsfrom' ) ) . |
— | — | @@ -116,7 +116,7 @@ |
117 | 117 | </tr> |
118 | 118 | <tr> |
119 | 119 | <td class='mw-label'>" . |
120 | | - Xml::label( wfMsg( 'allpagesto' ), 'nsto' ) . |
| 120 | + Xml::label( $this->msg( 'allpagesto' )->text(), 'nsto' ) . |
121 | 121 | " </td> |
122 | 122 | <td class='mw-input'>" . |
123 | 123 | Xml::input( 'to', 30, str_replace('_',' ',$to), array( 'id' => 'nsto' ) ) . |
— | — | @@ -124,11 +124,11 @@ |
125 | 125 | </tr> |
126 | 126 | <tr> |
127 | 127 | <td class='mw-label'>" . |
128 | | - Xml::label( wfMsg( 'namespace' ), 'namespace' ) . |
| 128 | + Xml::label( $this->msg( 'namespace' )->text(), 'namespace' ) . |
129 | 129 | " </td> |
130 | 130 | <td class='mw-input'>" . |
131 | 131 | Xml::namespaceSelector( $namespace, null ) . ' ' . |
132 | | - Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . |
| 132 | + Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . |
133 | 133 | " </td> |
134 | 134 | </tr>"; |
135 | 135 | $out .= Xml::closeElement( 'table' ); |
— | — | @@ -249,7 +249,7 @@ |
250 | 250 | $nsForm . |
251 | 251 | '</td> |
252 | 252 | <td class="mw-allpages-nav">' . |
253 | | - Linker::link( $this->getTitle(), wfMsgHtml ( 'allpages' ), |
| 253 | + Linker::link( $this->getTitle(), $this->msg( 'allpages' )->escaped(), |
254 | 254 | array(), array(), 'known' ) . |
255 | 255 | "</td> |
256 | 256 | </tr>" . |
— | — | @@ -280,10 +280,10 @@ |
281 | 281 | $special = $this->getTitle(); |
282 | 282 | $link = $special->escapeLocalUrl( $queryparams . 'from=' . urlencode($inpoint) . '&to=' . urlencode($outpoint) ); |
283 | 283 | |
284 | | - $out = wfMsgHtml( 'alphaindexline', |
| 284 | + $out = $this->msg( 'alphaindexline' )->rawParams( |
285 | 285 | "<a href=\"$link\">$inpointf</a></td><td>", |
286 | 286 | "</td><td><a href=\"$link\">$outpointf</a>" |
287 | | - ); |
| 287 | + )->escaped(); |
288 | 288 | return '<tr><td class="mw-allpages-alphaindexline">' . $out . '</td></tr>'; |
289 | 289 | } |
290 | 290 | |
— | — | @@ -302,10 +302,10 @@ |
303 | 303 | $n = 0; |
304 | 304 | |
305 | 305 | if ( !$fromList || !$toList ) { |
306 | | - $out = wfMsgExt( 'allpagesbadtitle', 'parse' ); |
| 306 | + $out = $this->msg( 'allpagesbadtitle' )->parseAsBlock(); |
307 | 307 | } elseif ( !in_array( $namespace, array_keys( $namespaces ) ) ) { |
308 | 308 | // Show errormessage and reset to NS_MAIN |
309 | | - $out = wfMsgExt( 'allpages-bad-ns', array( 'parseinline' ), $namespace ); |
| 309 | + $out = $this->msg( 'allpages-bad-ns', $namespace )->parse(); |
310 | 310 | $namespace = NS_MAIN; |
311 | 311 | } else { |
312 | 312 | list( $namespace, $fromKey, $from ) = $fromList; |
— | — | @@ -410,7 +410,7 @@ |
411 | 411 | $nsForm . |
412 | 412 | '</td> |
413 | 413 | <td class="mw-allpages-nav">' . |
414 | | - Linker::link( $self, wfMsgHtml ( 'allpages' ) ); |
| 414 | + Linker::link( $self, $this->msg( 'allpages' )->escaped() ); |
415 | 415 | |
416 | 416 | # Do we put a previous link ? |
417 | 417 | if( isset( $prevTitle ) && $pt = $prevTitle->getText() ) { |
— | — | @@ -421,7 +421,7 @@ |
422 | 422 | |
423 | 423 | $prevLink = Linker::linkKnown( |
424 | 424 | $self, |
425 | | - wfMessage( 'prevpage', $pt )->escaped(), |
| 425 | + $this->msg( 'prevpage', $pt )->escaped(), |
426 | 426 | array(), |
427 | 427 | $query |
428 | 428 | ); |
— | — | @@ -438,7 +438,7 @@ |
439 | 439 | |
440 | 440 | $nextLink = Linker::linkKnown( |
441 | 441 | $self, |
442 | | - wfMessage( 'nextpage', $t->getText() )->escaped(), |
| 442 | + $this->msg( 'nextpage', $t->getText() )->escaped(), |
443 | 443 | array(), |
444 | 444 | $query |
445 | 445 | ); |