Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -373,7 +373,7 @@ |
374 | 374 | private function categoriesHtml( $categories ) { |
375 | 375 | global $wgOut, $wgUser; |
376 | 376 | $wgOut->addCategoryLinks( $categories ); |
377 | | - return $wgUser->getSkin()->getCategories( $wgOut ); |
| 377 | + return $wgUser->getSkin()->getCategories(); |
378 | 378 | } |
379 | 379 | |
380 | 380 | /** |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -245,7 +245,7 @@ |
246 | 246 | $tpl->set( 'isarticle', $out->isArticle() ); |
247 | 247 | |
248 | 248 | $tpl->setRef( 'thispage', $this->thispage ); |
249 | | - $subpagestr = $this->subPageSubtitle( $out ); |
| 249 | + $subpagestr = $this->subPageSubtitle(); |
250 | 250 | $tpl->set( |
251 | 251 | 'subtitle', !empty( $subpagestr ) ? |
252 | 252 | '<span class="subpages">' . $subpagestr . '</span>' . $out->getSubtitle() : |
— | — | @@ -258,7 +258,7 @@ |
259 | 259 | '' |
260 | 260 | ); |
261 | 261 | |
262 | | - $tpl->set( 'catlinks', $this->getCategories( $out ) ); |
| 262 | + $tpl->set( 'catlinks', $this->getCategories() ); |
263 | 263 | if( $out->isSyndicated() ) { |
264 | 264 | $feeds = array(); |
265 | 265 | foreach( $out->getSyndicationLinks() as $format => $link ) { |
— | — | @@ -506,7 +506,7 @@ |
507 | 507 | $tpl->set( 'headscripts', $out->getScript() ); |
508 | 508 | } |
509 | 509 | |
510 | | - $tpl->set( 'debughtml', $this->generateDebugHTML( $out ) ); |
| 510 | + $tpl->set( 'debughtml', $this->generateDebugHTML() ); |
511 | 511 | |
512 | 512 | // original version by hansm |
513 | 513 | if( !wfRunHooks( 'SkinTemplateOutputPageBeforeExec', array( &$this, &$tpl ) ) ) { |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -455,6 +455,9 @@ |
456 | 456 | |
457 | 457 | /** |
458 | 458 | * Add skin specific stylesheets |
| 459 | + * Calling this method with an $out of anything but the same OutputPage |
| 460 | + * inside ->getContext()->getOutput() is deprecated. The $out arg is kept |
| 461 | + * for compatibility purposes with skins. |
459 | 462 | * @param $out OutputPage |
460 | 463 | * @delete |
461 | 464 | */ |
— | — | @@ -505,15 +508,10 @@ |
506 | 509 | return $wgLogo; |
507 | 510 | } |
508 | 511 | |
509 | | - /** |
510 | | - * The format without an explicit $out argument is deprecated |
511 | | - */ |
512 | | - function getCategoryLinks( OutputPage $out=null ) { |
| 512 | + function getCategoryLinks() { |
513 | 513 | global $wgUseCategoryBrowser, $wgContLang; |
514 | 514 | |
515 | | - if( $out === null ){ |
516 | | - $out = $this->getContext()->output; |
517 | | - } |
| 515 | + $out = $this->getContext()->output; |
518 | 516 | |
519 | 517 | if ( count( $out->mCategoryLinks ) == 0 ) { |
520 | 518 | return ''; |
— | — | @@ -602,18 +600,11 @@ |
603 | 601 | return $return; |
604 | 602 | } |
605 | 603 | |
606 | | - /** |
607 | | - * The ->getCategories() form is deprecated, please instead use |
608 | | - * the ->getCategories( $out ) form with whatout OutputPage is on hand |
609 | | - */ |
610 | | - function getCategories( OutputPage $out=null ) { |
| 604 | + function getCategories() { |
| 605 | + $out = $this->getContext()->output; |
611 | 606 | |
612 | | - if( $out === null ){ |
613 | | - $out = $this->getContext()->output; |
614 | | - } |
| 607 | + $catlinks = $this->getCategoryLinks(); |
615 | 608 | |
616 | | - $catlinks = $this->getCategoryLinks( $out ); |
617 | | - |
618 | 609 | $classes = 'catlinks'; |
619 | 610 | |
620 | 611 | // Check what we're showing |
— | — | @@ -668,11 +659,11 @@ |
669 | 660 | * area. |
670 | 661 | * @return String HTML containing debug data, if enabled (otherwise empty). |
671 | 662 | */ |
672 | | - protected function generateDebugHTML( OutputPage $out ) { |
| 663 | + protected function generateDebugHTML() { |
673 | 664 | global $wgShowDebug; |
674 | 665 | |
675 | 666 | if ( $wgShowDebug ) { |
676 | | - $listInternals = $this->formatDebugHTML( $out->mDebugtext ); |
| 667 | + $listInternals = $this->formatDebugHTML( $this->getContext()->getOutput()->mDebugtext ); |
677 | 668 | return "\n<hr />\n<strong>Debug data:</strong><ul id=\"mw-debug-html\">" . |
678 | 669 | $listInternals . "</ul>\n"; |
679 | 670 | } |
— | — | @@ -781,10 +772,7 @@ |
782 | 773 | return ''; |
783 | 774 | } |
784 | 775 | |
785 | | - /** |
786 | | - * The format without an explicit $out argument is deprecated |
787 | | - */ |
788 | | - function subPageSubtitle( OutputPage $out=null ) { |
| 776 | + function subPageSubtitle() { |
789 | 777 | $out = $this->getContext()->getOutput(); |
790 | 778 | $subpages = ''; |
791 | 779 | |