From f9855240760e543f1e4ea9d7abf21a0b3a5ca924 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Fri, 6 May 2011 21:50:18 +0000 Subject: [PATCH] More versions added to @deprecated tags Couple of inbound calls fixed up Some ancient code removed as it's been marked deprecated --- includes/Article.php | 17 --------- includes/CategoryPage.php | 2 +- includes/DefaultSettings.php | 14 ++++---- includes/EditPage.php | 10 +----- includes/GlobalFunctions.php | 2 +- includes/ImageGallery.php | 3 +- includes/Linker.php | 14 -------- includes/LogEventsList.php | 4 +-- includes/Skin.php | 4 +-- includes/Title.php | 6 ---- includes/WebRequest.php | 2 +- includes/Xml.php | 2 +- includes/api/ApiBase.php | 2 +- includes/api/ApiMain.php | 4 +-- includes/cache/HTMLCacheUpdate.php | 2 +- includes/filerepo/LocalFile.php | 21 ----------- includes/objectcache/EmptyBagOStuff.php | 2 +- includes/parser/Parser.php | 47 ------------------------- includes/search/SearchEngine.php | 2 +- includes/specials/SpecialRandompage.php | 4 +-- includes/specials/SpecialUndelete.php | 13 ------- languages/Language.php | 2 +- languages/LanguageConverter.php | 2 +- skins/Vector.php | 4 +-- 24 files changed, 30 insertions(+), 155 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 1f439cdd67..68290a6291 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 \Heading\, 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, diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 3568d89bd2..bcb906ed2a 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -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 ); diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index ce48fe7ee8..5cbf237c66 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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(); diff --git a/includes/EditPage.php b/includes/EditPage.php index 21f030f613..48a28e8392 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index eef53752ee..ef7ead903f 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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 ); diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 3c0365f84c..1f2d838fa0 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -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 */ } diff --git a/includes/Linker.php b/includes/Linker.php index a0209d1fc6..509619189a 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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() diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 33baa0eea0..8cf88390f6 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -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 { diff --git a/includes/Skin.php b/includes/Skin.php index cd9b45367a..4d30a17605 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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 */ diff --git a/includes/Title.php b/includes/Title.php index 2795fd9c5f..bcedd81455 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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. diff --git a/includes/WebRequest.php b/includes/WebRequest.php index f7010953ec..f96b723643 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -633,7 +633,7 @@ class WebRequest { /** * Return the size of the upload, or 0. * - * @deprecated + * @deprecated since 1.17 * @param $key String: * @return integer */ diff --git a/includes/Xml.php b/includes/Xml.php index 77b62632c4..07934d8ef0 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -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 ); diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 952c921671..30e3a74e7d 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -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(); diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 31b3e7bb3b..4ea30dad0b 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -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' ); diff --git a/includes/cache/HTMLCacheUpdate.php b/includes/cache/HTMLCacheUpdate.php index ca5fc2ec96..a469eaf93c 100644 --- a/includes/cache/HTMLCacheUpdate.php +++ b/includes/cache/HTMLCacheUpdate.php @@ -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 ); diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index c32c128557..7ea694ae3f 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -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 */ diff --git a/includes/objectcache/EmptyBagOStuff.php b/includes/objectcache/EmptyBagOStuff.php index f811352f1d..e956e2ee00 100644 --- a/includes/objectcache/EmptyBagOStuff.php +++ b/includes/objectcache/EmptyBagOStuff.php @@ -21,7 +21,7 @@ class EmptyBagOStuff extends BagOStuff { /** * Backwards compatibility alias for EmptyBagOStuff - * @deprecated + * @deprecated since 1.18 */ class FakeMemCachedClient extends EmptyBagOStuff { } diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 4c784a23bb..e1cafa79df 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -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. diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index a4b3e7136b..f03ba79588 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -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' ); diff --git a/includes/specials/SpecialRandompage.php b/includes/specials/SpecialRandompage.php index aaa220670c..bf13ebed80 100644 --- a/includes/specials/SpecialRandompage.php +++ b/includes/specials/SpecialRandompage.php @@ -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 ''; diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 281cdb6077..aae5765058 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -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. diff --git a/languages/Language.php b/languages/Language.php index 75d11def4c..4420b27a4a 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -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 ); diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index 8807f44934..ea598552e1 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -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 ); diff --git a/skins/Vector.php b/skins/Vector.php index 3589a95501..442cb1da3b 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -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 {
- + renderPortals( $this->data['sidebar'] ); ?>
-- 2.20.1