From: Sam Reed Date: Fri, 6 May 2011 20:59:58 +0000 (+0000) Subject: Remove some stuff marked as deprecated <= 1.16 unused X-Git-Tag: 1.31.0-rc.0~30370 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=8c1c535466ae7917fe7bc27d97d9ed93b56a901e;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/Article.php b/includes/Article.php index 4a0416257a..1f439cdd67 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 diff --git a/includes/LinkFilter.php b/includes/LinkFilter.php index 53841df12e..af7680fb05 100644 --- a/includes/LinkFilter.php +++ b/includes/LinkFilter.php @@ -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: diff --git a/includes/Linker.php b/includes/Linker.php index 19b7dd0c16..a0209d1fc6 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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 ); diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 2d918ed25f..33baa0eea0 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -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__);