From 08a30a34f525555da8909ccc54cec42719e1325b Mon Sep 17 00:00:00 2001 From: Derick Alangi Date: Mon, 29 Apr 2019 21:13:53 +0100 Subject: [PATCH] User: Remove/Kill usage of deprecated User::makeGroupLinkWiki() This method was deprecated in 1.29 and usage of this method can no longer be found. Usage ===== https://codesearch.wmflabs.org/search/?q=makeGroupLinkWiki&i=nope&files=&repos= Bug: T220656 Change-Id: Iff5ef6666e8ec3e7060ddef8f60362206f4306d0 --- RELEASE-NOTES-1.34 | 2 ++ includes/user/User.php | 25 ------------------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index 350b9e3fa5..f2f3f1bd2a 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -109,6 +109,8 @@ because of Phabricator reports. * wfMakeUrlIndexes() function, deprecated in 1.33, have been removed. * User::getGroupPage() and ::makeGroupLinkHTML(), deprecated in 1.29, have been removed. Use UserGroupMembership::getGroupPage and ::getLink instead. +* User::makeGroupLinkWiki(), deprecated in 1.29, has been removed. Use + UserGroupMembership::getLink() instead. * … === Deprecations in 1.34 === diff --git a/includes/user/User.php b/includes/user/User.php index cccf6b8b5c..11c712a188 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -5161,31 +5161,6 @@ class User implements IDBAccessObject, UserIdentity { return $wgImplicitGroups; } - /** - * Create a link to the group in Wikitext, if available; - * else return the group name. - * @deprecated since 1.29 Use UserGroupMembership::getLink instead, or - * make the link yourself if you need custom text - * - * @param string $group Internal name of the group - * @param string $text The text of the link - * @return string Wikilink to the group - */ - public static function makeGroupLinkWiki( $group, $text = '' ) { - wfDeprecated( __METHOD__, '1.29' ); - - if ( $text == '' ) { - $text = UserGroupMembership::getGroupName( $group ); - } - $title = UserGroupMembership::getGroupPage( $group ); - if ( $title ) { - $page = $title->getFullText(); - return "[[$page|$text]]"; - } - - return $text; - } - /** * Returns an array of the groups that a particular group can add/remove. * -- 2.20.1