From: Alexandre Emsenhuber Date: Sun, 15 Dec 2013 14:53:20 +0000 (+0100) Subject: Remove useless $out parameter from SkinTemplate::prepareQuickTemplate() X-Git-Tag: 1.31.0-rc.0~17615^2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=f3f5b9d825179fe56bcd58e10fbadb76313bb50f;p=lhc%2Fweb%2Fwiklou.git Remove useless $out parameter from SkinTemplate::prepareQuickTemplate() Fix for I0a9a7f10ea (f5a0c23); use $this->getOutput() instead. Passing different OutputPage object to Skin methods than the one set in the context is deprecated, so there is no point having that parameter. The method's signature is also misleading, since it allows null to be passed, but if that value would be passed to it, the code would crash since a such case is not handled in the method. The $out parameter passed to the method from outputPage() is left since it is required by the MobileFrontend extension. A similar commit will be done in the extension, and the parameter's removal will happen once this condition is lifted. Change-Id: I4fac5b14afeab25f6f79f889c7ce56874827717d --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 7da3de963b..3ad2f8e29c 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -271,10 +271,9 @@ class SkinTemplate extends Skin { * initialize various variables and generate the template * * @since 1.23 - * @param $out OutputPage * @return QuickTemplate the template to be executed by outputPage */ - protected function prepareQuickTemplate( OutputPage $out = null ) { + protected function prepareQuickTemplate() { global $wgContLang, $wgScript, $wgStylePath, $wgMimeType, $wgJsMimeType, $wgXhtmlNamespaces, $wgHtml5Version, $wgDisableCounters, $wgSitename, $wgLogo, $wgMaxCredits, @@ -285,6 +284,7 @@ class SkinTemplate extends Skin { $title = $this->getTitle(); $request = $this->getRequest(); + $out = $this->getOutput(); $tpl = $this->setupTemplateForOutput(); wfProfileIn( __METHOD__ . '-stuff-head' );