Skin::outputPage: Drop support for specifying a context, deprecated in 1.20
authorJames D. Forrester <jforrester@wikimedia.org>
Fri, 21 Jun 2019 20:47:38 +0000 (13:47 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Fri, 21 Jun 2019 21:27:27 +0000 (14:27 -0700)
Bug: T220656
Change-Id: Ie416c88874599dbb196fc0e5abac711345c155a0

RELEASE-NOTES-1.34
includes/skins/Skin.php
includes/skins/SkinTemplate.php

index f3baa52..5c0b57e 100644 (file)
@@ -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 ===
index f45596f..05b6297 100644 (file)
@@ -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
index a7b7569..8b46ee9 100644 (file)
@@ -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 );
-               }
        }
 
        /**