From 96acf994c0107261d0e18679de935542b1057902 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Fri, 21 Jun 2019 13:47:38 -0700 Subject: [PATCH] Skin::outputPage: Drop support for specifying a context, deprecated in 1.20 Bug: T220656 Change-Id: Ie416c88874599dbb196fc0e5abac711345c155a0 --- RELEASE-NOTES-1.34 | 1 + includes/skins/Skin.php | 3 +-- includes/skins/SkinTemplate.php | 19 ++----------------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index f3baa52a95..5c0b57e8b7 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -229,6 +229,7 @@ because of Phabricator reports. \Maintenance::countDown() method instead. * OutputPage::wrapWikiMsg() no longer accepts an options parameter. This was deprecated since 1.20. +* Skin::outputPage() no longer accepts a context. This was deprecated in 1.20. * … === Deprecations in 1.34 === diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index f45596f3fd..05b6297986 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -389,9 +389,8 @@ abstract class Skin extends ContextSource { /** * Outputs the HTML generated by other functions. - * @param OutputPage|null $out */ - abstract function outputPage( OutputPage $out = null ); + abstract function outputPage(); /** * @param array $data diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index a7b7569f0e..8b46ee9958 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -207,21 +207,10 @@ class SkinTemplate extends Skin { } /** - * initialize various variables and generate the template - * - * @param OutputPage|null $out + * Initialize various variables and generate the template */ - function outputPage( OutputPage $out = null ) { + function outputPage() { Profiler::instance()->setTemplated( true ); - - $oldContext = null; - if ( $out !== null ) { - // Deprecated since 1.20, note added in 1.25 - wfDeprecated( __METHOD__, '1.25' ); - $oldContext = $this->getContext(); - $this->setContext( $out->getContext() ); - } - $out = $this->getOutput(); $this->initPage( $out ); @@ -231,10 +220,6 @@ class SkinTemplate extends Skin { // result may be an error $this->printOrError( $res ); - - if ( $oldContext ) { - $this->setContext( $oldContext ); - } } /** -- 2.20.1