/**
* Add skin specific stylesheets
+ * Calling this method with an $out of anything but the same OutputPage
+ * inside ->getContext()->getOutput() is deprecated. The $out arg is kept
+ * for compatibility purposes with skins.
* @param $out OutputPage
* @delete
*/
return $wgLogo;
}
- /**
- * The format without an explicit $out argument is deprecated
- */
- function getCategoryLinks( OutputPage $out=null ) {
+ function getCategoryLinks() {
global $wgUseCategoryBrowser, $wgContLang;
- if( $out === null ){
- $out = $this->getContext()->output;
- }
+ $out = $this->getContext()->output;
if ( count( $out->mCategoryLinks ) == 0 ) {
return '';
return $return;
}
- /**
- * The ->getCategories() form is deprecated, please instead use
- * the ->getCategories( $out ) form with whatout OutputPage is on hand
- */
- function getCategories( OutputPage $out=null ) {
+ function getCategories() {
+ $out = $this->getContext()->output;
- if( $out === null ){
- $out = $this->getContext()->output;
- }
-
- $catlinks = $this->getCategoryLinks( $out );
+ $catlinks = $this->getCategoryLinks();
$classes = 'catlinks';
* area.
* @return String HTML containing debug data, if enabled (otherwise empty).
*/
- protected function generateDebugHTML( OutputPage $out ) {
+ protected function generateDebugHTML() {
global $wgShowDebug;
if ( $wgShowDebug ) {
- $listInternals = $this->formatDebugHTML( $out->mDebugtext );
+ $listInternals = $this->formatDebugHTML( $this->getContext()->getOutput()->mDebugtext );
return "\n<hr />\n<strong>Debug data:</strong><ul id=\"mw-debug-html\">" .
$listInternals . "</ul>\n";
}
return '';
}
- /**
- * The format without an explicit $out argument is deprecated
- */
- function subPageSubtitle( OutputPage $out=null ) {
+ function subPageSubtitle() {
$out = $this->getContext()->getOutput();
$subpages = '';
$tpl->set( 'isarticle', $out->isArticle() );
$tpl->setRef( 'thispage', $this->thispage );
- $subpagestr = $this->subPageSubtitle( $out );
+ $subpagestr = $this->subPageSubtitle();
$tpl->set(
'subtitle', !empty( $subpagestr ) ?
'<span class="subpages">' . $subpagestr . '</span>' . $out->getSubtitle() :
''
);
- $tpl->set( 'catlinks', $this->getCategories( $out ) );
+ $tpl->set( 'catlinks', $this->getCategories() );
if( $out->isSyndicated() ) {
$feeds = array();
foreach( $out->getSyndicationLinks() as $format => $link ) {
$tpl->set( 'headscripts', $out->getScript() );
}
- $tpl->set( 'debughtml', $this->generateDebugHTML( $out ) );
+ $tpl->set( 'debughtml', $this->generateDebugHTML() );
// original version by hansm
if( !wfRunHooks( 'SkinTemplateOutputPageBeforeExec', array( &$this, &$tpl ) ) ) {