Remove some stuff marked as deprecated <= 1.16 unused
authorSam Reed <reedy@users.mediawiki.org>
Fri, 6 May 2011 20:59:58 +0000 (20:59 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 6 May 2011 20:59:58 +0000 (20:59 +0000)
Stuff still used left for the moment

Added some since to @deprecated

Added wfDeprecated( __METHOD__ ); in one case

includes/Article.php
includes/LinkFilter.php
includes/Linker.php
includes/LogEventsList.php

index 4a04162..1f439cd 100644 (file)
@@ -605,7 +605,7 @@ class Article {
 
        /**
         * Read/write accessor to select FOR UPDATE
-        * @FIXME: remove, does nothing
+        * @deprecated since 1.18
         *
         * @param $x Mixed: FIXME
         * @return mixed value of $x, or value stored in Article::mForUpdate
index 53841df..af7680f 100644 (file)
@@ -41,42 +41,6 @@ class LinkFilter {
                return $regex;
        }
 
-       /**
-        * Make a string to go after an SQL LIKE, which will match the specified
-        * string. There are several kinds of filter entry:
-        *     *.domain.com    -  Produces http://com.domain.%, matches domain.com
-        *                        and www.domain.com
-        *     domain.com      -  Produces http://com.domain./%, matches domain.com
-        *                        or domain.com/ but not www.domain.com
-        *     *.domain.com/x  -  Produces http://com.domain.%/x%, matches
-        *                        www.domain.com/xy
-        *     domain.com/x    -  Produces http://com.domain./x%, matches
-        *                        domain.com/xy but not www.domain.com/xy
-        *
-        * Asterisks in any other location are considered invalid.
-        * 
-        * @param $filterEntry String: domainparts
-        * @param $prot        String: protocol
-        * @return String
-        * @deprecated Use makeLikeArray() and pass result to Database::buildLike() instead
-        */
-        public static function makeLike( $filterEntry , $prot = 'http://' ) {
-               wfDeprecated( __METHOD__ );
-
-               $like = self::makeLikeArray( $filterEntry , $prot );
-               if ( !$like ) {
-                       return false;
-               }
-               $dbw = wfGetDB( DB_MASTER );
-               $s = $dbw->buildLike( $like );
-               $m = false;
-               if ( preg_match( "/^ *LIKE '(.*)' *$/", $s, $m ) ) {
-                       return $m[1];
-               } else {
-                       throw new MWException( __METHOD__.': this DBMS is not supported by this function.' );
-               }
-       }
-
        /**
         * Make an array to be used for calls to DatabaseBase::buildLike(), which
         * will match the specified string. There are several kinds of filter entry:
index 19b7dd0..a0209d1 100644 (file)
@@ -19,7 +19,7 @@ class Linker {
         *
         * @param $class String: the contents of the class attribute; if an empty
         *   string is passed, which is the default value, defaults to 'external'.
-        * @deprecated Just pass the external class directly to something using Html::expandAttributes
+        * @deprecated since 1.18 Just pass the external class directly to something using Html::expandAttributes
         */
        static function getExternalLinkAttributes( $class = 'external' ) {
                wfDeprecated( __METHOD__ );
@@ -1814,30 +1814,6 @@ class Linker {
                }
        }
 
-       /**
-        * @deprecated since 1.16 Use link()
-        *
-        * This function is a shortcut to makeStubLinkObj(Title::newFromText($title),...). Do not call
-        * it if you already have a title object handy. See makeStubLinkObj for further documentation.
-        *
-        * @param $title String: the text of the title
-        * @param $text  String: link text
-        * @param $query String: optional query part
-        * @param $trail String: optional trail. Alphabetic characters at the start of this string will
-        *                      be included in the link text. Other characters will be appended after
-        *                      the end of the link.
-        */
-       static function makeStubLink( $title, $text = '', $query = '', $trail = '' ) {
-               wfDeprecated( __METHOD__ );
-               $nt = Title::newFromText( $title );
-               if ( $nt instanceof Title ) {
-                       return self::makeStubLinkObj( $nt, $text, $query, $trail );
-               } else {
-                       wfDebug( 'Invalid title passed to self::makeStubLink(): "' . $title . "\"\n" );
-                       return $text == '' ? $title : $text;
-               }
-       }
-
        /**
         * @deprecated since 1.16 Use link()
         *
@@ -1855,6 +1831,7 @@ class Linker {
         * @param $prefix String: optional prefix. As trail, only before instead of after.
         */
        static function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
+               wfDeprecated( __METHOD__ );
                wfProfileIn( __METHOD__ );
                $query = wfCgiToArray( $query );
                list( $inside, $trail ) = self::splitTrail( $trail );
index 2d918ed..33baa0e 100644 (file)
@@ -1064,6 +1064,8 @@ class LogReader {
 
        /**
         * @param $request WebRequest: for internal use use a FauxRequest object to pass arbitrary parameters.
+        *
+        * @deprecated since 1.14
         */
        function __construct( $request ) {
                global $wgUser, $wgOut;
@@ -1112,6 +1114,8 @@ class LogViewer {
         * @param &$reader LogReader: where to get our data from
         * @param $flags Integer: Bitwise combination of flags:
         *     LogEventsList::NO_ACTION_LINK   Don't show restore/unblock/block links
+        *
+        * @deprecated since 1.14
         */
        function __construct( &$reader, $flags = 0 ) {
                wfDeprecated(__METHOD__);