Deprecate OutputPage::out.
authorDaniel Friesen <daniel@nadir-seen-fire.com>
Sun, 12 May 2013 09:00:16 +0000 (02:00 -0700)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 17 May 2013 15:08:54 +0000 (15:08 +0000)
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

index 43f27bd..b63e658 100644 (file)
@@ -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;
        }