added missing deprecation notices
authorJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Tue, 13 Dec 2011 19:51:03 +0000 (19:51 +0000)
committerJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Tue, 13 Dec 2011 19:51:03 +0000 (19:51 +0000)
12 files changed:
includes/LogPage.php
includes/Namespace.php
includes/ProxyTools.php
includes/Revision.php
includes/SkinLegacy.php
includes/SpecialPage.php
includes/StubObject.php
includes/User.php
includes/WebRequest.php
includes/Wiki.php
includes/WikiError.php
includes/WikiPage.php

index 1fe0c6b..f4dd064 100644 (file)
@@ -175,6 +175,7 @@ class LogPage {
         * @deprecated in 1.19, warnings in 1.21. Use getName()
         */
        public static function logName( $type ) {
+               wfDeprecated( __METHOD__, '1.19' );
                global $wgLogNames;
 
                if( isset( $wgLogNames[$type] ) ) {
@@ -194,6 +195,7 @@ class LogPage {
         * @deprecated in 1.19, warnings in 1.21. Use getDescription()
         */
        public static function logHeader( $type ) {
+               wfDeprecated( __METHOD__, '1.19' );
                global $wgLogHeaders;
                return wfMsgExt( $wgLogHeaders[$type], array( 'parseinline' ) );
        }
index d32a53c..d203adf 100644 (file)
@@ -69,6 +69,7 @@ class MWNamespace {
         * @deprecated Please use the more consistently named isSubject (since 1.19)
         */
        public static function isMain( $index ) {
+               wfDeprecated( __METHOD__, '1.19' );
                return self::isSubject( $index );
        }
 
index bc01a6e..bdab3be 100644 (file)
@@ -13,6 +13,7 @@
  * @return string
  */
 function wfGetForwardedFor() {
+       wfDeprecated( __METHOD__, '1.19' );
        global $wgRequest;
        return $wgRequest->getHeader( 'X-Forwarded-For' );
 }
@@ -25,7 +26,7 @@ function wfGetForwardedFor() {
  * @return string
  */
 function wfGetAgent() {
-       wfDeprecated( __FUNCTION__ );
+       wfDeprecated( __METHOD__, '1.18' );
        global $wgRequest;
        return $wgRequest->getHeader( 'User-Agent' );
 }
@@ -38,6 +39,7 @@ function wfGetAgent() {
  * @return string
  */
 function wfGetIP() {
+       wfDeprecated( __METHOD__, '1.19' );
        global $wgRequest;
        return $wgRequest->getIP();
 }
index ae08163..3e06cfa 100644 (file)
@@ -728,7 +728,7 @@ class Revision {
         * @return String
         */
        public function revText() {
-               wfDeprecated( __METHOD__ );
+               wfDeprecated( __METHOD__, '1.17' );
                return $this->getText( self::FOR_THIS_USER );
        }
 
index 56b2436..77c85a8 100644 (file)
@@ -532,6 +532,7 @@ class LegacyTemplate extends BaseTemplate {
         * @deprecated in 1.19
         */
        function getQuickbarCompensator( $rows = 1 ) {
+               wfDeprecated( __METHOD__, '1.19' );
                return "<td width='152' rowspan='{$rows}'>&#160;</td>";
        }
 
index 419c595..853defe 100644 (file)
@@ -67,6 +67,7 @@ class SpecialPage {
         * @deprecated since 1.18
         */
        static function initList() {
+               wfDeprecated( __METHOD__, '1.18' );
                // Noop
        }
 
@@ -74,6 +75,7 @@ class SpecialPage {
         * @deprecated since 1.18
         */
        static function initAliasList() {
+               wfDeprecated( __METHOD__, '1.18' );
                // Noop
        }
 
@@ -86,6 +88,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function resolveAlias( $alias ) {
+               wfDeprecated( __METHOD__, '1.18' );
                list( $name, /*...*/ ) = SpecialPageFactory::resolveAlias( $alias );
                return $name;
        }
@@ -112,7 +115,7 @@ class SpecialPage {
         * @deprecated since 1.7, warnings in 1.17, might be removed in 1.20
         */
        static function addPage( &$page ) {
-               wfDeprecated( __METHOD__ );
+               wfDeprecated( __METHOD__, '1.7' );
                SpecialPageFactory::getList()->{$page->mName} = $page;
        }
 
@@ -125,6 +128,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function setGroup( $page, $group ) {
+               wfDeprecated( __METHOD__, '1.18' );
                return SpecialPageFactory::setGroup( $page, $group );
        }
 
@@ -136,6 +140,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function getGroup( &$page ) {
+               wfDeprecated( __METHOD__, '1.18' );
                return SpecialPageFactory::getGroup( $page );
        }
 
@@ -148,6 +153,7 @@ class SpecialPage {
         * @param $name String the page to remove
         */
        static function removePage( $name ) {
+               wfDeprecated( __METHOD__, '1.18' );
                unset( SpecialPageFactory::getList()->$name );
        }
 
@@ -159,6 +165,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function exists( $name ) {
+               wfDeprecated( __METHOD__, '1.18' );
                return SpecialPageFactory::exists( $name );
        }
 
@@ -170,6 +177,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function getPage( $name ) {
+               wfDeprecated( __METHOD__, '1.18' );
                return SpecialPageFactory::getPage( $name );
        }
 
@@ -182,6 +190,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function getPageByAlias( $alias ) {
+               wfDeprecated( __METHOD__, '1.18' );
                return SpecialPageFactory::getPage( $alias );
        }
 
@@ -195,6 +204,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function getUsablePages( User $user = null ) {
+               wfDeprecated( __METHOD__, '1.18' );
                return SpecialPageFactory::getUsablePages( $user );
        }
 
@@ -205,6 +215,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function getRegularPages() {
+               wfDeprecated( __METHOD__, '1.18' );
                return SpecialPageFactory::getRegularPages();
        }
 
@@ -216,6 +227,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function getRestrictedPages() {
+               wfDeprecated( __METHOD__, '1.18' );
                return SpecialPageFactory::getRestrictedPages();
        }
 
@@ -234,6 +246,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        public static function executePath( &$title, IContextSource &$context, $including = false ) {
+               wfDeprecated( __METHOD__, '1.18' );
                return SpecialPageFactory::executePath( $title, $context, $including );
        }
 
@@ -247,6 +260,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function getLocalNameFor( $name, $subpage = false ) {
+               wfDeprecated( __METHOD__, '1.18' );
                return SpecialPageFactory::getLocalNameFor( $name, $subpage );
        }
 
@@ -290,6 +304,7 @@ class SpecialPage {
         * @deprecated since 1.18 call SpecialPageFactory method directly
         */
        static function getTitleForAlias( $alias ) {
+               wfDeprecated( __METHOD__, '1.18' );
                return SpecialPageFactory::getTitleForAlias( $alias );
        }
 
@@ -353,11 +368,11 @@ class SpecialPage {
         * @deprecated since 1.17, call parent::__construct()
         */
        public function __call( $fName, $a ) {
+               // Deprecated messages now, remove in 1.19 or 1.20?
+               wfDeprecated( __METHOD__, '1.17' );
+               
                // Sometimes $fName is SpecialPage, sometimes it's specialpage. <3 PHP
                if( strtolower( $fName ) == 'specialpage' ) {
-                       // Deprecated messages now, remove in 1.19 or 1.20?
-                       wfDeprecated( __METHOD__ );
-
                        $name = isset( $a[0] ) ? $a[0] : '';
                        $restriction = isset( $a[1] ) ? $a[1] : '';
                        $listed = isset( $a[2] ) ? $a[2] : true;
@@ -395,6 +410,7 @@ class SpecialPage {
         * @deprecated since 1.18
         */
        function getFile() {
+               wfDeprecated( __METHOD__, '1.18' ); 
                return $this->mFile;
        }
 
@@ -441,11 +457,11 @@ class SpecialPage {
         * @return Mixed
         * @deprecated since 1.18
         */
-       function name( $x = null ) { return wfSetVar( $this->mName, $x ); }
-       function restriction( $x = null) { return wfSetVar( $this->mRestriction, $x ); }
-       function func( $x = null) { return wfSetVar( $this->mFunction, $x ); }
-       function file( $x = null) { return wfSetVar( $this->mFile, $x ); }
-       function includable( $x = null ) { return wfSetVar( $this->mIncludable, $x ); }
+       function name( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); return wfSetVar( $this->mName, $x ); }
+       function restriction( $x = null) { wfDeprecated( __METHOD__, '1.18' ); return wfSetVar( $this->mRestriction, $x ); }
+       function func( $x = null) { wfDeprecated( __METHOD__, '1.18' ); return wfSetVar( $this->mFunction, $x ); }
+       function file( $x = null) { wfDeprecated( __METHOD__, '1.18' ); return wfSetVar( $this->mFile, $x ); }
+       function includable( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); return wfSetVar( $this->mIncludable, $x ); }
 
        /**
         * Whether the special page is being evaluated via transclusion
@@ -684,6 +700,7 @@ class SpecialPage {
         * @since 1.18
         */
        public function getLang() {
+               wfDeprecated( __METHOD__, '1.19' );
                return $this->getLanguage();
        }
 
index 3f6b8b1..647ad92 100644 (file)
@@ -118,6 +118,7 @@ class StubObject {
 class StubContLang extends StubObject {
 
        function __construct() {
+               wfDeprecated( __CLASS__, '1.18' );
                parent::__construct( 'wgContLang' );
        }
 
index 312a27b..5d5e974 100644 (file)
@@ -730,6 +730,7 @@ class User {
         * @deprecated since 1.18 call Sanitizer::isValidEmail() directly
         */
        public static function isValidEmailAddr( $addr ) {
+               wfDeprecated( __METHOD__, '1.18' );
                return Sanitizer::validateEmail( $addr );
        }
 
@@ -2593,6 +2594,7 @@ class User {
         * @deprecated since 1.18 Use ->getSkin() in the most relevant outputting context you have
         */
        public function getSkin() {
+               wfDeprecated( __METHOD__, '1.18' );
                return RequestContext::getMain()->getSkin();
        }
 
@@ -2725,6 +2727,7 @@ class User {
         * @deprecated in 1.19 due to removal of user_options from the user table
         */
        private function decodeOptions( $str ) {
+               wfDeprecated( __METHOD__, '1.19' );
                if( !$str )
                        return;
 
@@ -3012,11 +3015,12 @@ class User {
         * @return String Page rendering hash
         */
        public function getPageRenderingHash() {
+               wfDeprecated( __METHOD__, '1.17' );
+               
                global $wgUseDynamicDates, $wgRenderHashAppend, $wgLang, $wgContLang;
                if( $this->mHash ){
                        return $this->mHash;
                }
-               wfDeprecated( __METHOD__ );
 
                // stubthreshold is only included below for completeness,
                // since it disables the parser cache, its value will always
@@ -3189,6 +3193,7 @@ class User {
         * @return String The new edit token
         */
        public function editToken( $salt = '', $request = null ) {
+               wfDeprecated( __METHOD__, '1.19' );
                return $this->getEditToken( $salt, $request );
        }
 
index 0fada38..65fe0c7 100644 (file)
@@ -743,6 +743,7 @@ class WebRequest {
         * @return integer
         */
        public function getFileSize( $key ) {
+               wfDeprecated( __METHOD__, '1.17' );
                $file = new WebRequestUpload( $this, $key );
                return $file->getSize();
        }
@@ -955,6 +956,7 @@ HTML;
         * @return bool
         */
        public function isPathInfoBad( $extWhitelist = array() ) {
+               wfDeprecated( __METHOD__, '1.17' );
                global $wgScriptExtension;
                $extWhitelist[] = ltrim( $wgScriptExtension, '.' );
                return IEUrlExtension::areServerVarsBad( $_SERVER, $extWhitelist );
index 0a4c0ea..e4e5b30 100644 (file)
@@ -289,6 +289,7 @@ class MediaWiki {
         * @return Article object
         */
        public static function articleFromTitle( $title, IContextSource $context ) {
+               wfDeprecated( __METHOD__, '1.18' );
                return Article::newFromTitle( $title, $context );
        }
 
index a634dff..7c167f6 100644 (file)
@@ -35,7 +35,7 @@ class WikiError {
         * @deprecated since 1.17
         */
        function __construct( $message ) {
-               wfDeprecated( __METHOD__ );
+               wfDeprecated( __METHOD__, '1.17' );
                $this->mMessage = $message;
        }
 
@@ -65,7 +65,7 @@ class WikiError {
         * @deprecated since 1.17
         */
        public static function isError( $object ) {
-               wfDeprecated( __METHOD__ );
+               wfDeprecated( __METHOD__, '1.17' );
                if ( $object instanceof WikiError ) {
                        return true;
                } elseif ( $object instanceof Status ) {
@@ -88,7 +88,7 @@ class WikiErrorMsg extends WikiError {
         * @deprecated since 1.17
         */
        function __construct( $message/*, ... */ ) {
-               wfDeprecated( __METHOD__ );
+               wfDeprecated( __METHOD__, '1.17' );
                $args = func_get_args();
                array_shift( $args );
                $this->mMessage = wfMsgReal( $message, $args, true );
@@ -120,7 +120,7 @@ class WikiXmlError extends WikiError {
         * @deprecated since 1.17
         */
        function __construct( $parser, $message = 'XML parsing error', $context = null, $offset = 0 ) {
-               wfDeprecated( __METHOD__ );
+               wfDeprecated( __METHOD__, '1.17' );
                $this->mXmlError = xml_get_error_code( $parser );
                $this->mColumn = xml_get_current_column_number( $parser );
                $this->mLine = xml_get_current_line_number( $parser );
index e5dbb0a..ac0ab02 100644 (file)
@@ -2157,6 +2157,7 @@ class WikiPage extends Page {
         * @deprecated since 1.18, use doEditUpdates()
         */
        public function createUpdates( $rev ) {
+               wfDeprecated( __METHOD__, '1.18' );
                global $wgUser;
                $this->doEditUpdates( $rev, $wgUser, array( 'created' => true ) );
        }
@@ -2176,7 +2177,7 @@ class WikiPage extends Page {
        public function preSaveTransform( $text, User $user = null, ParserOptions $popts = null ) {
                global $wgParser, $wgUser;
 
-               wfDeprecated( __METHOD__ );
+               wfDeprecated( __METHOD__, '1.19' );
 
                $user = is_null( $user ) ? $wgUser : $user;
 
@@ -2686,6 +2687,7 @@ class WikiPage extends Page {
         * @deprecated since 1.18
         */
        public function quickEdit( $text, $comment = '', $minor = 0 ) {
+               wfDeprecated( __METHOD__, '1.18' );
                global $wgUser;
                return $this->doQuickEdit( $text, $wgUser, $comment, $minor );
        }
@@ -2694,6 +2696,7 @@ class WikiPage extends Page {
         * @deprecated since 1.18
         */
        public function viewUpdates() {
+               wfDeprecated( __METHOD__, '1.18' );
                global $wgUser;
                return $this->doViewUpdates( $wgUser );
        }
@@ -2702,6 +2705,7 @@ class WikiPage extends Page {
         * @deprecated since 1.18
         */
        public function useParserCache( $oldid ) {
+               wfDeprecated( __METHOD__, '1.18' );
                global $wgUser;
                return $this->isParserCacheUsed( ParserOptions::newFromUser( $wgUser ), $oldid );
        }