r87578 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87577‎ | r87578 | r87579 >
Date:20:59, 6 May 2011
Author:reedy
Status:ok
Tags:
Comment:
Remove some stuff marked as deprecated <= 1.16 unused

Stuff still used left for the moment

Added some since to @deprecated

Added wfDeprecated( __METHOD__ ); in one case
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/LinkFilter.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LinkFilter.php
@@ -42,42 +42,6 @@
4343 }
4444
4545 /**
46 - * Make a string to go after an SQL LIKE, which will match the specified
47 - * string. There are several kinds of filter entry:
48 - * *.domain.com - Produces http://com.domain.%, matches domain.com
49 - * and www.domain.com
50 - * domain.com - Produces http://com.domain./%, matches domain.com
51 - * or domain.com/ but not www.domain.com
52 - * *.domain.com/x - Produces http://com.domain.%/x%, matches
53 - * www.domain.com/xy
54 - * domain.com/x - Produces http://com.domain./x%, matches
55 - * domain.com/xy but not www.domain.com/xy
56 - *
57 - * Asterisks in any other location are considered invalid.
58 - *
59 - * @param $filterEntry String: domainparts
60 - * @param $prot String: protocol
61 - * @return String
62 - * @deprecated Use makeLikeArray() and pass result to Database::buildLike() instead
63 - */
64 - public static function makeLike( $filterEntry , $prot = 'http://' ) {
65 - wfDeprecated( __METHOD__ );
66 -
67 - $like = self::makeLikeArray( $filterEntry , $prot );
68 - if ( !$like ) {
69 - return false;
70 - }
71 - $dbw = wfGetDB( DB_MASTER );
72 - $s = $dbw->buildLike( $like );
73 - $m = false;
74 - if ( preg_match( "/^ *LIKE '(.*)' *$/", $s, $m ) ) {
75 - return $m[1];
76 - } else {
77 - throw new MWException( __METHOD__.': this DBMS is not supported by this function.' );
78 - }
79 - }
80 -
81 - /**
8246 * Make an array to be used for calls to DatabaseBase::buildLike(), which
8347 * will match the specified string. There are several kinds of filter entry:
8448 * *.domain.com - Produces http://com.domain.%, matches domain.com
Index: trunk/phase3/includes/Article.php
@@ -605,7 +605,7 @@
606606
607607 /**
608608 * Read/write accessor to select FOR UPDATE
609 - * @FIXME: remove, does nothing
 609+ * @deprecated since 1.18
610610 *
611611 * @param $x Mixed: FIXME
612612 * @return mixed value of $x, or value stored in Article::mForUpdate
Index: trunk/phase3/includes/Linker.php
@@ -19,7 +19,7 @@
2020 *
2121 * @param $class String: the contents of the class attribute; if an empty
2222 * string is passed, which is the default value, defaults to 'external'.
23 - * @deprecated Just pass the external class directly to something using Html::expandAttributes
 23+ * @deprecated since 1.18 Just pass the external class directly to something using Html::expandAttributes
2424 */
2525 static function getExternalLinkAttributes( $class = 'external' ) {
2626 wfDeprecated( __METHOD__ );
@@ -1817,30 +1817,6 @@
18181818 /**
18191819 * @deprecated since 1.16 Use link()
18201820 *
1821 - * This function is a shortcut to makeStubLinkObj(Title::newFromText($title),...). Do not call
1822 - * it if you already have a title object handy. See makeStubLinkObj for further documentation.
1823 - *
1824 - * @param $title String: the text of the title
1825 - * @param $text String: link text
1826 - * @param $query String: optional query part
1827 - * @param $trail String: optional trail. Alphabetic characters at the start of this string will
1828 - * be included in the link text. Other characters will be appended after
1829 - * the end of the link.
1830 - */
1831 - static function makeStubLink( $title, $text = '', $query = '', $trail = '' ) {
1832 - wfDeprecated( __METHOD__ );
1833 - $nt = Title::newFromText( $title );
1834 - if ( $nt instanceof Title ) {
1835 - return self::makeStubLinkObj( $nt, $text, $query, $trail );
1836 - } else {
1837 - wfDebug( 'Invalid title passed to self::makeStubLink(): "' . $title . "\"\n" );
1838 - return $text == '' ? $title : $text;
1839 - }
1840 - }
1841 -
1842 - /**
1843 - * @deprecated since 1.16 Use link()
1844 - *
18451821 * Make a link for a title which may or may not be in the database. If you need to
18461822 * call this lots of times, pre-fill the link cache with a LinkBatch, otherwise each
18471823 * call to this will result in a DB query.
@@ -1855,6 +1831,7 @@
18561832 * @param $prefix String: optional prefix. As trail, only before instead of after.
18571833 */
18581834 static function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
 1835+ wfDeprecated( __METHOD__ );
18591836 wfProfileIn( __METHOD__ );
18601837 $query = wfCgiToArray( $query );
18611838 list( $inside, $trail ) = self::splitTrail( $trail );
Index: trunk/phase3/includes/LogEventsList.php
@@ -1064,6 +1064,8 @@
10651065
10661066 /**
10671067 * @param $request WebRequest: for internal use use a FauxRequest object to pass arbitrary parameters.
 1068+ *
 1069+ * @deprecated since 1.14
10681070 */
10691071 function __construct( $request ) {
10701072 global $wgUser, $wgOut;
@@ -1112,6 +1114,8 @@
11131115 * @param &$reader LogReader: where to get our data from
11141116 * @param $flags Integer: Bitwise combination of flags:
11151117 * LogEventsList::NO_ACTION_LINK Don't show restore/unblock/block links
 1118+ *
 1119+ * @deprecated since 1.14
11161120 */
11171121 function __construct( &$reader, $flags = 0 ) {
11181122 wfDeprecated(__METHOD__);

Follow-up revisions

RevisionCommit summaryAuthorDate
r87645Followup r87578:...nikerabbit17:04, 7 May 2011

Status & tagging log