Index: trunk/phase3/includes/specials/SpecialAllpages.php |
— | — | @@ -58,25 +58,27 @@ |
59 | 59 | * @param $par String: becomes "FOO" when called like Special:Allpages/FOO (default NULL) |
60 | 60 | */ |
61 | 61 | function execute( $par ) { |
62 | | - global $wgRequest, $wgOut, $wgContLang; |
| 62 | + global $wgContLang; |
| 63 | + $request = $this->getRequest(); |
| 64 | + $out = $this->getOutput(); |
63 | 65 | |
64 | 66 | $this->setHeaders(); |
65 | 67 | $this->outputHeader(); |
66 | | - $wgOut->allowClickjacking(); |
| 68 | + $out->allowClickjacking(); |
67 | 69 | |
68 | 70 | # GET values |
69 | | - $from = $wgRequest->getVal( 'from', null ); |
70 | | - $to = $wgRequest->getVal( 'to', null ); |
71 | | - $namespace = $wgRequest->getInt( 'namespace' ); |
| 71 | + $from = $request->getVal( 'from', null ); |
| 72 | + $to = $request->getVal( 'to', null ); |
| 73 | + $namespace = $request->getInt( 'namespace' ); |
72 | 74 | |
73 | 75 | $namespaces = $wgContLang->getNamespaces(); |
74 | 76 | |
75 | | - $wgOut->setPagetitle( |
| 77 | + $out->setPagetitle( |
76 | 78 | ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces) ) ) ? |
77 | 79 | wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) : |
78 | 80 | wfMsg( 'allarticles' ) |
79 | 81 | ); |
80 | | - $wgOut->addModuleStyles( 'mediawiki.special' ); |
| 82 | + $out->addModuleStyles( 'mediawiki.special' ); |
81 | 83 | |
82 | 84 | if( isset($par) ) { |
83 | 85 | $this->showChunk( $namespace, $par, $to ); |
— | — | @@ -142,7 +144,7 @@ |
143 | 145 | * @param $to String: list all pages to this name |
144 | 146 | */ |
145 | 147 | function showToplevel( $namespace = NS_MAIN, $from = '', $to = '' ) { |
146 | | - global $wgOut; |
| 148 | + $output = $this->getOutput(); |
147 | 149 | |
148 | 150 | # TODO: Either make this *much* faster or cache the title index points |
149 | 151 | # in the querycache table. |
— | — | @@ -221,7 +223,7 @@ |
222 | 224 | if( !empty($lines) ) { |
223 | 225 | $this->showChunk( $namespace, $from, $to ); |
224 | 226 | } else { |
225 | | - $wgOut->addHTML( $this->namespaceForm( $namespace, $from, $to ) ); |
| 227 | + $output->addHTML( $this->namespaceForm( $namespace, $from, $to ) ); |
226 | 228 | } |
227 | 229 | return; |
228 | 230 | } |
— | — | @@ -241,14 +243,13 @@ |
242 | 244 | $out2 = ''; |
243 | 245 | } else { |
244 | 246 | if( isset($from) || isset($to) ) { |
245 | | - global $wgUser; |
246 | 247 | $out2 = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-form' ) ). |
247 | 248 | '<tr> |
248 | 249 | <td>' . |
249 | 250 | $nsForm . |
250 | 251 | '</td> |
251 | 252 | <td class="mw-allpages-nav">' . |
252 | | - $wgUser->getSkin()->link( $this->getTitle(), wfMsgHtml ( 'allpages' ), |
| 253 | + $this->getSkin()->link( $this->getTitle(), wfMsgHtml ( 'allpages' ), |
253 | 254 | array(), array(), 'known' ) . |
254 | 255 | "</td> |
255 | 256 | </tr>" . |
— | — | @@ -257,7 +258,7 @@ |
258 | 259 | $out2 = $nsForm; |
259 | 260 | } |
260 | 261 | } |
261 | | - $wgOut->addHTML( $out2 . $out ); |
| 262 | + $output->addHTML( $out2 . $out ); |
262 | 263 | } |
263 | 264 | |
264 | 265 | /** |
— | — | @@ -292,10 +293,10 @@ |
293 | 294 | * @param $to String: list all pages to this name (default FALSE) |
294 | 295 | */ |
295 | 296 | function showChunk( $namespace = NS_MAIN, $from = false, $to = false ) { |
296 | | - global $wgOut, $wgUser, $wgContLang, $wgLang; |
| 297 | + global $wgContLang, $wgLang; |
| 298 | + $output = $this->getOutput(); |
| 299 | + $sk = $this->getSkin(); |
297 | 300 | |
298 | | - $sk = $wgUser->getSkin(); |
299 | | - |
300 | 301 | $fromList = $this->getNamespaceKeyAndText($namespace, $from); |
301 | 302 | $toList = $this->getNamespaceKeyAndText( $namespace, $to ); |
302 | 303 | $namespaces = $wgContLang->getNamespaces(); |
— | — | @@ -447,14 +448,14 @@ |
448 | 449 | $out2 .= "</td></tr></table>"; |
449 | 450 | } |
450 | 451 | |
451 | | - $wgOut->addHTML( $out2 . $out ); |
| 452 | + $output->addHTML( $out2 . $out ); |
452 | 453 | |
453 | 454 | $links = array(); |
454 | 455 | if ( isset( $prevLink ) ) $links[] = $prevLink; |
455 | 456 | if ( isset( $nextLink ) ) $links[] = $nextLink; |
456 | 457 | |
457 | 458 | if ( count( $links ) ) { |
458 | | - $wgOut->addHTML( |
| 459 | + $output->addHTML( |
459 | 460 | Html::element( 'hr' ) . |
460 | 461 | Html::rawElement( 'div', array( 'class' => 'mw-allpages-nav' ), |
461 | 462 | $wgLang->pipeList( $links ) |
Index: trunk/phase3/includes/specials/SpecialAllmessages.php |
— | — | @@ -49,32 +49,33 @@ |
50 | 50 | * @param $par Mixed: parameter passed to the page or null |
51 | 51 | */ |
52 | 52 | public function execute( $par ) { |
53 | | - global $wgOut, $wgRequest; |
| 53 | + $request = $this->getRequest(); |
| 54 | + $out = $this->getOutput(); |
54 | 55 | |
55 | 56 | $this->setHeaders(); |
56 | 57 | |
57 | 58 | global $wgUseDatabaseMessages; |
58 | 59 | if( !$wgUseDatabaseMessages ) { |
59 | | - $wgOut->addWikiMsg( 'allmessagesnotsupportedDB' ); |
| 60 | + $out->addWikiMsg( 'allmessagesnotsupportedDB' ); |
60 | 61 | return; |
61 | 62 | } else { |
62 | 63 | $this->outputHeader( 'allmessagestext' ); |
63 | 64 | } |
64 | 65 | |
65 | | - $wgOut->addModuleStyles( 'mediawiki.special' ); |
| 66 | + $out->addModuleStyles( 'mediawiki.special' ); |
66 | 67 | |
67 | | - $this->filter = $wgRequest->getVal( 'filter', 'all' ); |
68 | | - $this->prefix = $wgRequest->getVal( 'prefix', '' ); |
| 68 | + $this->filter = $request->getVal( 'filter', 'all' ); |
| 69 | + $this->prefix = $request->getVal( 'prefix', '' ); |
69 | 70 | |
70 | 71 | $this->table = new AllmessagesTablePager( |
71 | 72 | $this, |
72 | 73 | array(), |
73 | | - wfGetLangObj( $wgRequest->getVal( 'lang', $par ) ) |
| 74 | + wfGetLangObj( $request->getVal( 'lang', $par ) ) |
74 | 75 | ); |
75 | 76 | |
76 | 77 | $this->langCode = $this->table->lang->getCode(); |
77 | 78 | |
78 | | - $wgOut->addHTML( $this->buildForm() . |
| 79 | + $out->addHTML( $this->buildForm() . |
79 | 80 | $this->table->getNavigationBar() . |
80 | 81 | $this->table->getLimitForm() . |
81 | 82 | $this->table->getBody() . |
Index: trunk/phase3/includes/specials/SpecialActiveusers.php |
— | — | @@ -187,4 +187,4 @@ |
188 | 188 | |
189 | 189 | return $out; |
190 | 190 | } |
191 | | -} |
\ No newline at end of file |
| 191 | +} |
Index: trunk/phase3/includes/specials/SpecialBlankpage.php |
— | — | @@ -32,8 +32,7 @@ |
33 | 33 | parent::__construct( 'Blankpage' ); |
34 | 34 | } |
35 | 35 | public function execute( $par ) { |
36 | | - global $wgOut; |
37 | 36 | $this->setHeaders(); |
38 | | - $wgOut->addWikiMsg('intentionallyblankpage'); |
| 37 | + $this->getOutput()>addWikiMsg('intentionallyblankpage'); |
39 | 38 | } |
40 | 39 | } |