From: Daniel Friesen Date: Sun, 12 May 2013 09:00:16 +0000 (-0700) Subject: Deprecate OutputPage::out. X-Git-Tag: 1.31.0-rc.0~19643 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=072d516848d285c11619b179baf91a845335054d;p=lhc%2Fweb%2Fwiklou.git 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 --- 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; }