More versions added to @deprecated tags
authorSam Reed <reedy@users.mediawiki.org>
Fri, 6 May 2011 21:50:18 +0000 (21:50 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 6 May 2011 21:50:18 +0000 (21:50 +0000)
Couple of inbound calls fixed up

Some ancient code removed as it's been marked deprecated

24 files changed:
includes/Article.php
includes/CategoryPage.php
includes/DefaultSettings.php
includes/EditPage.php
includes/GlobalFunctions.php
includes/ImageGallery.php
includes/Linker.php
includes/LogEventsList.php
includes/Skin.php
includes/Title.php
includes/WebRequest.php
includes/Xml.php
includes/api/ApiBase.php
includes/api/ApiMain.php
includes/cache/HTMLCacheUpdate.php
includes/filerepo/LocalFile.php
includes/objectcache/EmptyBagOStuff.php
includes/parser/Parser.php
includes/search/SearchEngine.php
includes/specials/SpecialRandompage.php
includes/specials/SpecialUndelete.php
languages/Language.php
languages/LanguageConverter.php
skins/Vector.php

index 1f439cd..68290a6 100644 (file)
@@ -325,23 +325,6 @@ class Article {
                return $text;
        }
 
-       /**
-        * This function returns the text of a section, specified by a number ($section).
-        * A section is text under a heading like == Heading == or \<h1\>Heading\</h1\>, or
-        * the first section before any such heading (section 0).
-        *
-        * If a section contains subsections, these are also returned.
-        *
-        * @param $text String: text to look in
-        * @param $section Integer: section number
-        * @return string text of the requested section
-        * @deprecated
-        */
-       public function getSection( $text, $section ) {
-               global $wgParser;
-               return $wgParser->getSection( $text, $section );
-       }
-
        /**
         * Get the text that needs to be saved in order to undo all revisions
         * between $undo and $undoafter. Revisions must belong to the same page,
index 3568d89..bcb906e 100644 (file)
@@ -230,7 +230,7 @@ class CategoryViewer {
 
        /**
         * Add a subcategory to the internal lists, using a title object
-        * @deprecated kept for compatibility, please use addSubcategoryObject instead
+        * @deprecated since 1.17 kept for compatibility, please use addSubcategoryObject instead
         */
        function addSubcategory( Title $title, $sortkey, $pageLength ) {
                $this->addSubcategoryObject( Category::newFromTitle( $title ), $sortkey, $pageLength );
index ce48fe7..5cbf237 100644 (file)
@@ -284,7 +284,7 @@ $wgAllowImageMoving = true;
 $wgIllegalFileChars = ":";
 
 /**
- * @deprecated use $wgDeletedDirectory
+ * @deprecated since 1.17 use $wgDeletedDirectory
  */
 $wgFileStore = array();
 
@@ -3599,7 +3599,7 @@ $wgSummarySpamRegex = array();
  *  - true : block it
  *  - false : let it through
  *
- * @deprecated Use hooks. See SpamBlacklist extension.
+ * @deprecated since 1.17 Use hooks. See SpamBlacklist extension.
  */
 $wgFilterCallback = false;
 
@@ -3610,7 +3610,7 @@ $wgFilterCallback = false;
 $wgEnableDnsBlacklist = false;
 
 /**
- * @deprecated Use $wgEnableDnsBlacklist instead, only kept for backward
+ * @deprecated since 1.17 Use $wgEnableDnsBlacklist instead, only kept for backward
  *  compatibility
  */
 $wgEnableSorbs = false;
@@ -3622,7 +3622,7 @@ $wgEnableSorbs = false;
 $wgDnsBlacklistUrls = array( 'http.dnsbl.sorbs.net.' );
 
 /**
- * @deprecated Use $wgDnsBlacklistUrls instead, only kept for backward
+ * @deprecated since 1.17 Use $wgDnsBlacklistUrls instead, only kept for backward
  *  compatibility
  */
 $wgSorbsUrl = array();
@@ -3672,7 +3672,7 @@ $wgRateLimitLog = null;
 /**
  * Array of groups which should never trigger the rate limiter
  *
- * @deprecated as of 1.13.0, the preferred method is using
+ * @deprecated since 1.13.0, the preferred method is using
  *  $wgGroupPermissions[]['noratelimit']. However, this will still
  *  work if desired.
  *
@@ -4426,7 +4426,7 @@ $wgLicenseTerms = false;
 
 /**
  * Set this to some HTML to override the rights icon with an arbitrary logo
- * @deprecated Use $wgFooterIcons['copyright']['copyright']
+ * @deprecated since 1.18 Use $wgFooterIcons['copyright']['copyright']
  */
 $wgCopyrightIcon = null;
 
@@ -4544,7 +4544,7 @@ $wgExtensionMessagesFiles = array();
 
 /**
  * Aliases for special pages provided by extensions.
- * @deprecated Use $specialPageAliases in a file referred to by $wgExtensionMessagesFiles
+ * @deprecated since 1.16 Use $specialPageAliases in a file referred to by $wgExtensionMessagesFiles
  */
 $wgExtensionAliasesFiles = array();
 
index 21f030f..48a28e8 100644 (file)
@@ -2127,7 +2127,7 @@ HTML
         * Produce the stock "your edit contains spam" page
         *
         * @param $match Text which triggered one or more filters
-        * @deprecated Use method spamPageWithContent() instead
+        * @deprecated since 1.17 Use method spamPageWithContent() instead
         */
        static function spamPage( $match = false ) {
                global $wgOut, $wgTitle;
@@ -2236,14 +2236,6 @@ HTML
                return true;
        }
 
-       /**
-        * @deprecated use $wgParser->stripSectionName()
-        */
-       function pseudoParseSectionAnchor( $text ) {
-               global $wgParser;
-               return $wgParser->stripSectionName( $text );
-       }
-
        /**
         * Format an anchor fragment as it would appear for a given section name
         * @param $text String
index eef5375..ef7ead9 100644 (file)
@@ -2849,7 +2849,7 @@ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = t
  *
  * @param $name String
  * @param $p Array: parameters
- * @deprecated
+ * @deprecated since 1.18
  */
 function wfCreateObject( $name, $p ) {
        return MWFunction::newObj( $name, $p );
index 3c0365f..1f2d838 100644 (file)
@@ -127,9 +127,10 @@ class ImageGallery
         * Instruct the class to use a specific skin for rendering
         *
         * @param $skin Skin object
-        * @deprecated Not used anymore
+        * @deprecated since 1.18 Not used anymore
         */
        function useSkin( $skin ) {
+               wfDeprecated( __METHOD__ );
                /* no op */
        }
 
index a0209d1..5096191 100644 (file)
@@ -1990,12 +1990,6 @@ class Linker {
                return self::makeImageLink2( $title, $file, $frameParams, $handlerParams, $time );
        }
 
-       /** @deprecated use Linker::makeMediaLinkObj() */
-       static function makeMediaLink( $name, $unused = '', $text = '', $time = false ) {
-               $nt = Title::makeTitleSafe( NS_FILE, $name );
-               return self::makeMediaLinkObj( $nt, $text, $time );
-       }
-
        /**
         * Returns the attributes for the tooltip and access key.
         */
@@ -2019,14 +2013,6 @@ class Linker {
                return $attribs;
        }
 
-       /**
-        * @deprecated since 1.14
-        * Returns raw bits of HTML, use titleAttrib() and accesskey()
-        */
-       public static function tooltipAndAccesskey( $name ) {
-               return Xml::expandAttributes( self::tooltipAndAccesskeyAttribs( $name ) );
-       }
-
        /**
         * @deprecated since 1.14
         * Returns raw bits of HTML, use titleAttrib()
index 33baa0e..8cf8839 100644 (file)
@@ -1056,7 +1056,7 @@ class LogPager extends ReverseChronologicalPager {
 }
 
 /**
- * @deprecated
+ * @deprecated since 1.14
  * @ingroup SpecialPage
  */
 class LogReader {
@@ -1099,7 +1099,7 @@ class LogReader {
 }
 
 /**
- * @deprecated
+ * @deprecated since 1.14
  * @ingroup SpecialPage
  */
 class LogViewer {
index cd9b453..4d30a17 100644 (file)
@@ -376,7 +376,7 @@ abstract class Skin {
         * This used to load MediaWiki:Common.js and the skin-specific style
         * before the ResourceLoader.
         *
-        * @deprecated Use the ResourceLoader instead. This may be removed at some
+        * @deprecated since 1.18 Use the ResourceLoader instead. This may be removed at some
         * point.
         * @param $skinName String: If set, overrides the skin name
         * @return String
@@ -388,7 +388,7 @@ abstract class Skin {
        /**
         * Generate user stylesheet for action=raw&gen=css
         *
-        * @deprecated Use the ResourceLoader instead. This may be removed at some
+        * @deprecated since 1.18 Use the ResourceLoader instead. This may be removed at some
         * point.
         * @return String
         */
index 2795fd9..bcedd81 100644 (file)
@@ -4,12 +4,6 @@
  * @file
  */
 
-/**
- * @deprecated This used to be a define, but was moved to
- * Title::GAID_FOR_UPDATE in 1.17. This will probably be removed in 1.18
- */
-define( 'GAID_FOR_UPDATE', Title::GAID_FOR_UPDATE );
-
 /**
  * Represents a title within MediaWiki.
  * Optionally may contain an interwiki designation or namespace.
index f701095..f96b723 100644 (file)
@@ -633,7 +633,7 @@ class WebRequest {
        /**
         * Return the size of the upload, or 0.
         *
-        * @deprecated
+        * @deprecated since 1.17
         * @param $key String:
         * @return integer
         */
index 77b6263..07934d8 100644 (file)
@@ -417,7 +417,7 @@ class Xml {
        }
 
        /**
-        * @deprecated Synonymous to Html::hidden()
+        * @deprecated since 1.16 Synonymous to Html::hidden()
         */
        public static function hidden( $name, $value, $attribs = array() ) {
                return Html::hidden( $name, $value, $attribs );
index 952c921..30e3a74 100644 (file)
@@ -585,7 +585,7 @@ abstract class ApiBase {
        }
 
        /**
-        * @deprecated use MWNamespace::getValidNamespaces()
+        * @deprecated since 1.17 use MWNamespace::getValidNamespaces()
         */
        public static function getValidNamespaces() {
                return MWNamespace::getValidNamespaces();
index 31b3e7b..4ea30da 100644 (file)
@@ -278,7 +278,7 @@ class ApiMain extends ApiBase {
        }
 
        /**
-        * @deprecated Private caching is now the default, so there is usually no
+        * @deprecated since 1.17 Private caching is now the default, so there is usually no
         * need to call this function. If there is a need, you can use
         * $this->setCacheMode('private')
         */
@@ -306,7 +306,7 @@ class ApiMain extends ApiBase {
         * given URL must either always or never call this function; if it sometimes does and
         * sometimes doesn't, stuff will break.
         *
-        * @deprecated Use setCacheMode( 'anon-public-user-private' )
+        * @deprecated since 1.17 Use setCacheMode( 'anon-public-user-private' )
         */
        public function setVaryCookie() {
                $this->setCacheMode( 'anon-public-user-private' );
index ca5fc2e..a469eaf 100644 (file)
@@ -155,7 +155,7 @@ class HTMLCacheUpdate
 
        /**
         * Invalidate a range of pages, right now
-        * @deprecated
+        * @deprecated since 1.16
         */
        public function invalidate( $startId = false, $endId = false ) {
                $titleArray = $this->mCache->getLinks( $this->mTable, $startId, $endId );
index c32c128..7ea694a 100644 (file)
@@ -840,27 +840,6 @@ class LocalFile extends File {
                return $status;
        }
 
-       /**
-        * Record a file upload in the upload log and the image table
-        * @deprecated use upload()
-        */
-       function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '',
-               $watch = false, $timestamp = false )
-       {
-               $pageText = SpecialUpload::getInitialPageText( $desc, $license, $copyStatus, $source );
-
-               if ( !$this->recordUpload2( $oldver, $desc, $pageText ) ) {
-                       return false;
-               }
-
-               if ( $watch ) {
-                       global $wgUser;
-                       $wgUser->addWatch( $this->getTitle() );
-               }
-               return true;
-
-       }
-
        /**
         * Record a file upload in the upload log and the image table
         */
index f811352..e956e2e 100644 (file)
@@ -21,7 +21,7 @@ class EmptyBagOStuff extends BagOStuff {
 
 /** 
  * Backwards compatibility alias for EmptyBagOStuff
- * @deprecated
+ * @deprecated since 1.18
  */
 class FakeMemCachedClient extends EmptyBagOStuff {
 }
index 4c784a2..e1cafa7 100644 (file)
@@ -752,41 +752,6 @@ class Parser {
                return $this->mStripList;
        }
 
-       /**
-        * @deprecated use replaceVariables
-        */
-       function strip( $text, $state, $stripcomments = false , $dontstrip = array() ) {
-               return $text;
-       }
-
-       /**
-        * Restores pre, math, and other extensions removed by strip()
-        *
-        * always call unstripNoWiki() after this one
-        * @private
-        * @deprecated use $this->mStripState->unstrip()
-        */
-       function unstrip( $text, $state ) {
-               return $state->unstripGeneral( $text );
-       }
-
-       /**
-        * Always call this after unstrip() to preserve the order
-        *
-        * @private
-        * @deprecated use $this->mStripState->unstrip()
-        */
-       function unstripNoWiki( $text, $state ) {
-               return $state->unstripNoWiki( $text );
-       }
-
-       /**
-        * @deprecated use $this->mStripState->unstripBoth()
-        */
-       function unstripForHTML( $text ) {
-               return $this->mStripState->unstripBoth( $text );
-       }
-
        /**
         * Add an item to the strip state
         * Returns the unique tag which must be inserted into the stripped text
@@ -2034,18 +1999,6 @@ class Parser {
                return $holders;
        }
 
-       /**
-        * Make a link placeholder. The text returned can be later resolved to a real link with
-        * replaceLinkHolders(). This is done for two reasons: firstly to avoid further
-        * parsing of interwiki links, and secondly to allow all existence checks and
-        * article length checks (for stub links) to be bundled into a single query.
-        *
-        * @deprecated
-        */
-       function makeLinkHolder( &$nt, $text = '', $query = array(), $trail = '', $prefix = '' ) {
-               return $this->mLinkHolders->makeHolder( $nt, $text, $query, $trail, $prefix );
-       }
-
        /**
         * Render a forced-blue link inline; protect against double expansion of
         * URLs if we're in a mode that prepends full URL prefixes to internal links.
index a4b3e71..f03ba79 100644 (file)
@@ -64,7 +64,7 @@ class SearchEngine {
 
        /**
         * If this search backend can list/unlist redirects
-        * @deprecated Call supports( 'list-redirects' );
+        * @deprecated since 1.19 Call supports( 'list-redirects' );
         */
        function acceptListRedirects() {
                return $this->supports( 'list-redirects' );
index aaa2206..bf13ebe 100644 (file)
@@ -169,9 +169,9 @@ class RandomPage extends SpecialPage {
                return $dbr->fetchObject( $res );
        }
 
-       /* an alternative to $wgExtraRandompageSQL so subclasses
+       /** an alternative to $wgExtraRandompageSQL so subclasses
         * can add their own SQL by overriding this function
-        * @deprecated, append to $this->extra instead
+        * @deprecated since 1.16 append to $this->extra instead
         */
        public function addExtraSQL() {
                return '';
index 281cdb6..aae5765 100644 (file)
@@ -158,19 +158,6 @@ class PageArchive {
                return null;
        }
 
-       /**
-        * Fetch (and decompress if necessary) the stored text for the deleted
-        * revision of the page with the given timestamp.
-        *
-        * @param $timestamp String
-        * @return String
-        * @deprecated Use getRevision() for more flexible information
-        */
-       function getRevisionText( $timestamp ) {
-               $rev = $this->getRevision( $timestamp );
-               return $rev ? $rev->getText() : null;
-       }
-
        /**
         * Return a Revision object containing data for the deleted revision.
         * Note that the result *may* or *may not* have a null page ID.
index 75d11de..4420b27 100644 (file)
@@ -2839,7 +2839,7 @@ class Language {
         * into an array of all possible variants of the text:
         *  'variant' => text in that variant
         *
-        * @deprecated Use autoConvertToAllVariants()
+        * @deprecated since 1.17 Use autoConvertToAllVariants()
         */
        function convertLinkToAllVariants( $text ) {
                return $this->mConverter->convertLinkToAllVariants( $text );
index 8807f44..ea59855 100644 (file)
@@ -472,7 +472,7 @@ class LanguageConverter {
         *
         * @param $text String: the text to be converted
         * @return Array: variant => converted text
-        * @deprecated Use autoConvertToAllVariants() instead
+        * @deprecated since 1.17 Use autoConvertToAllVariants() instead
         */
        public function convertLinkToAllVariants( $text ) {
                return $this->autoConvertToAllVariants( $text );
index 3589a95..442cb1d 100644 (file)
@@ -111,7 +111,7 @@ class VectorTemplate extends BaseTemplate {
                                                Linker::tooltip( $xmlID );
                                } else {
                                        $nav[$section][$key]['key'] =
-                                               Linker::tooltipAndAccesskey( $xmlID );
+                                               Linker::tooltipAndAccesskeyAttribs( $xmlID );
                                }
                        }
                }
@@ -216,7 +216,7 @@ class VectorTemplate extends BaseTemplate {
                <!-- panel -->
                        <div id="mw-panel" class="noprint">
                                <!-- logo -->
-                                       <div id="p-logo"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo Linker::tooltipAndAccesskey( 'p-logo' ) ?>></a></div>
+                                       <div id="p-logo"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ?>></a></div>
                                <!-- /logo -->
                                <?php $this->renderPortals( $this->data['sidebar'] ); ?>
                        </div>