Kill some more long deprecated unused functions
authorSam Reed <reedy@users.mediawiki.org>
Fri, 6 May 2011 21:09:34 +0000 (21:09 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 6 May 2011 21:09:34 +0000 (21:09 +0000)
Add more @deprecated since where appropriate

includes/Revision.php
includes/SiteStats.php
includes/WikiError.php
includes/db/Database.php
includes/filerepo/File.php
includes/media/Exif.php
includes/media/FormatMetadata.php
includes/parser/Parser.php
includes/parser/ParserOptions.php
languages/Language.php

index 71163e1..5fff018 100644 (file)
@@ -602,7 +602,7 @@ class Revision {
        /**
         * Alias for getText(Revision::FOR_THIS_USER)
         *
-        * @deprecated
+        * @deprecated since 1.17
         * @return String
         */
        public function revText() {
index 5a0d7a5..9914a3b 100644 (file)
@@ -99,14 +99,6 @@ class SiteStats {
                return self::$row->ss_images;
        }
 
-       /**
-        * @deprecated Use self::numberingroup('sysop') instead
-        */
-       static function admins() {
-               wfDeprecated(__METHOD__);
-               return self::numberingroup( 'sysop' );
-       }
-
        /**
         * Find the number of users in a given user group.
         * @param $group String: name of group
index 6c7406a..a634dff 100644 (file)
@@ -31,6 +31,8 @@
 class WikiError {
        /**
         * @param $message string
+        *
+        * @deprecated since 1.17
         */
        function __construct( $message ) {
                wfDeprecated( __METHOD__ );
@@ -59,6 +61,8 @@ class WikiError {
         *
         * @param $object mixed
         * @return bool
+        *
+        * @deprecated since 1.17
         */
        public static function isError( $object ) {
                wfDeprecated( __METHOD__ );
@@ -80,6 +84,8 @@ class WikiErrorMsg extends WikiError {
        /**
         * @param $message String: wiki message name
         * @param ... parameters to pass to wfMsg()
+        *
+        * @deprecated since 1.17
         */
        function __construct( $message/*, ... */ ) {
                wfDeprecated( __METHOD__ );
@@ -110,6 +116,8 @@ class WikiXmlError extends WikiError {
         * @param $message string
         * @param $context
         * @param $offset Int
+        *
+        * @deprecated since 1.17
         */
        function __construct( $parser, $message = 'XML parsing error', $context = null, $offset = 0 ) {
                wfDeprecated( __METHOD__ );
index 6ef582b..7ae7a34 100644 (file)
@@ -521,7 +521,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Same as new DatabaseMysql( ... ), kept for backward compatibility
-        * @deprecated
+        * @deprecated since 1.17
         */
        static function newFromParams( $server, $user, $password, $dbName, $flags = 0 ) {
                wfDeprecated( __METHOD__ );
@@ -1769,7 +1769,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Backwards compatibility, identifier quoting originated in DatabasePostgres
         * which used quote_ident which does not follow our naming conventions
         * was renamed to addIdentifierQuotes.
-        * @deprecated use addIdentifierQuotes
+        * @deprecated since 1.18 use addIdentifierQuotes
         */
        function quote_ident( $s ) {
                wfDeprecated( __METHOD__ );
@@ -1780,7 +1780,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Escape string for safe LIKE usage.
         * WARNING: you should almost never use this function directly,
         * instead use buildLike() that escapes everything automatically
-        * Deprecated in 1.17, warnings in 1.17, removed in ???
+        * @deprecated since 1.17, warnings in 1.17, removed in ???
         */
        public function escapeLike( $s ) {
                wfDeprecated( __METHOD__ );
@@ -2306,24 +2306,6 @@ abstract class DatabaseBase implements DatabaseType {
                }
        }
 
-       /**
-        * Begin a transaction, committing any previously open transaction
-        * @deprecated use begin()
-        */
-       function immediateBegin( $fname = 'DatabaseBase::immediateBegin' ) {
-               wfDeprecated( __METHOD__ );
-               $this->begin();
-       }
-
-       /**
-        * Commit transaction, if one is open
-        * @deprecated use commit()
-        */
-       function immediateCommit( $fname = 'DatabaseBase::immediateCommit' ) {
-               wfDeprecated( __METHOD__ );
-               $this->commit();
-       }
-
        /**
         * Creates a new table with structure copied from existing table
         * Note that unlike most database abstraction functions, this function does not
index 5d51e4c..6f9c639 100644 (file)
@@ -242,7 +242,7 @@ abstract class File {
        /**
        * Alias for getPath()
        *
-       * @deprecated Use getPath().
+       * @deprecated since 1.18 Use getPath().
        */
        public function getFullPath() {
                wfDeprecated( __METHOD__ );
@@ -905,47 +905,6 @@ abstract class File {
                $this->readOnlyError();
        }
 
-       /**
-        * Get an array of Title objects which are articles which use this file
-        * Also adds their IDs to the link cache
-        *
-        * This is mostly copied from Title::getLinksTo()
-        *
-        * @deprecated Use HTMLCacheUpdate, this function uses too much memory
-        */
-       function getLinksTo( $options = array() ) {
-               wfDeprecated( __METHOD__ );
-               wfProfileIn( __METHOD__ );
-
-               // Note: use local DB not repo DB, we want to know local links
-               if ( count( $options ) > 0 ) {
-                       $db = wfGetDB( DB_MASTER );
-               } else {
-                       $db = wfGetDB( DB_SLAVE );
-               }
-               $linkCache = LinkCache::singleton();
-
-               $encName = $db->addQuotes( $this->getName() );
-               $res = $db->select( array( 'page', 'imagelinks'), 
-                                                       array( 'page_namespace', 'page_title', 'page_id', 'page_len', 'page_is_redirect', 'page_latest' ),
-                                                       array( 'page_id=il_from', 'il_to' => $encName ),
-                                                       __METHOD__,
-                                                       $options );
-
-               $retVal = array();
-               if ( $db->numRows( $res ) ) {
-                       foreach ( $res as $row ) {
-                               $titleObj = Title::newFromRow( $row );
-                               if ( $titleObj ) {
-                                       $linkCache->addGoodLinkObj( $row->page_id, $titleObj, $row->page_len, $row->page_is_redirect, $row->page_latest );
-                                       $retVal[] = $titleObj;
-                               }
-                       }
-               }
-               wfProfileOut( __METHOD__ );
-               return $retVal;
-       }
-
        function formatMetadata() {
                if ( !$this->getHandler() ) {
                        return false;
index fdb5a49..7857a56 100644 (file)
@@ -510,6 +510,8 @@ class Exif {
        /**
         * Use FormatMetadata to create formatted values for display to user
         * (is this ever used?)
+        *
+        * @deprecated since 1.18
         */
        function makeFormattedData( ) {
                wfDeprecated( __METHOD__ );
@@ -540,6 +542,8 @@ class Exif {
         *
         * This returns the data for display to user.
         * Its unclear if this is ever used.
+        *
+        * @deprecated since 1.18
         */
        function getFormattedData() {
                wfDeprecated( __METHOD__ );
index 38de34d..03324a9 100644 (file)
@@ -1336,7 +1336,7 @@ class FormatMetadata {
 /** For compatability with old FormatExif class
  * which some extensions use.
  *
- *@deprecated
+ * @deprecated since 1.18
  *
 **/
 class FormatExif {
index f139168..4c784a2 100644 (file)
@@ -801,15 +801,6 @@ class Parser {
                return $rnd;
        }
 
-       /**
-        * Interface with html tidy
-        * @deprecated Use MWTidy::tidy()
-        */
-       public static function tidy( $text ) {
-               wfDeprecated( __METHOD__ );
-               return MWTidy::tidy( $text );
-       }
-
        /**
         * parse the wiki syntax used to render tables
         *
index 56d6f7d..a310617 100644 (file)
@@ -93,7 +93,7 @@ class ParserOptions {
        /**      
         * @param $title Title   
         * @return Skin          
-        * @deprecated Use Linker::* instead     
+        * @deprecated since 1.18 Use Linker::* instead
         */      
        function getSkin( $title = null ) {      
                wfDeprecated( __METHOD__ );
index 05972b5..75d11de 100644 (file)
@@ -264,15 +264,6 @@ class Language {
         */
        function initContLang() { }
 
-       /**
-        * @deprecated Use User::getDefaultOptions()
-        * @return array
-        */
-       function getDefaultUserOptions() {
-               wfDeprecated( __METHOD__ );
-               return User::getDefaultOptions();
-       }
-
        function getFallbackLanguageCode() {
                if ( $this->mCode === 'en' ) {
                        return false;