From 621866f22020b35bc6c3f6b33b9c5ff8e6477376 Mon Sep 17 00:00:00 2001 From: Derick Alangi Date: Mon, 29 Apr 2019 11:58:21 +0100 Subject: [PATCH] User: Remove deprecated methods ::getGroupPage() & ::makeGroupLinkHTML() These methods were deprecated in 1.29 and usage can no longer be found so, removing ahead of 1.34 cut. Usage ===== * User::getGroupPage() - https://codesearch.wmflabs.org/search/?q=%5B%5E%3E%5D(User)%3A%3AgetGroupPage%5C(&i=nope&files=&repos= * User::makeGroupLinkHTML() - https://codesearch.wmflabs.org/search/?q=%5B%5E%3E%5D(User)%3A%3AmakeGroupLinkHTML%5C(&i=nope&files=&repos= Bug: T220656 Change-Id: I4e48eb351883b044269d77a8baaf7b5030138c34 --- RELEASE-NOTES-1.34 | 2 ++ includes/user/User.php | 37 ------------------------------------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index 9dc19611dd..967c1ef57d 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -107,6 +107,8 @@ because of Phabricator reports. * wfArrayFilter() and wfArrayFilterByKey(), deprecated in 1.32, have been removed. * 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. * … === Deprecations in 1.34 === diff --git a/includes/user/User.php b/includes/user/User.php index ba6bb08a73..cbbf9fe1c9 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -5155,43 +5155,6 @@ class User implements IDBAccessObject, UserIdentity { return $wgImplicitGroups; } - /** - * Get the title of a page describing a particular group - * @deprecated since 1.29 Use UserGroupMembership::getGroupPage instead - * - * @param string $group Internal group name - * @return Title|bool Title of the page if it exists, false otherwise - */ - public static function getGroupPage( $group ) { - wfDeprecated( __METHOD__, '1.29' ); - return UserGroupMembership::getGroupPage( $group ); - } - - /** - * Create a link to the group in HTML, 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 HTML link to the group - */ - public static function makeGroupLinkHTML( $group, $text = '' ) { - wfDeprecated( __METHOD__, '1.29' ); - - if ( $text == '' ) { - $text = UserGroupMembership::getGroupName( $group ); - } - $title = UserGroupMembership::getGroupPage( $group ); - if ( $title ) { - return MediaWikiServices::getInstance() - ->getLinkRenderer()->makeLink( $title, $text ); - } - - return htmlspecialchars( $text ); - } - /** * Create a link to the group in Wikitext, if available; * else return the group name. -- 2.20.1