From 072d516848d285c11619b179baf91a845335054d Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Sun, 12 May 2013 02:00:16 -0700 Subject: [PATCH] Deprecate OutputPage::out. OutputPage is supposed to be a container for output. It should NOT be used as a replacement for echo. Only one seemingly unmaintained extension uses this method. This method is deprecated now and should be removed in the next release. Change-Id: I82711cee7204604a47cfbb5e4496b4cc737a837c --- includes/OutputPage.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 43f27bdfe6..b63e658ddd 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2049,7 +2049,7 @@ class OutputPage extends ContextSource { } if ( $this->mArticleBodyOnly ) { - $this->out( $this->mBodytext ); + echo $this->mBodytext; } else { $this->addDefaultModules(); @@ -2078,8 +2078,10 @@ class OutputPage extends ContextSource { * Actually output something with print. * * @param string $ins the string to output + * @deprecated since 1.20 Use echo yourself. */ public function out( $ins ) { + wfDeprecated( __METHOD__, '1.22' ); print $ins; } -- 2.20.1