From 83e53c7166b50da455ec1beb6084e981eb6de832 Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 1 Apr 2016 22:32:36 +0200 Subject: [PATCH] Remove Title::newFromRedirect() Deprecated since 1.21. Bug: T122754 Change-Id: Iddf1c2d61cafc017bf361b747db38ac1bc5f3f09 --- RELEASE-NOTES-1.27 | 1 + includes/Title.php | 17 ----------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 7f3df44533..2a30b3d488 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -390,6 +390,7 @@ changes to languages because of Phabricator reports. * OutputPage::setAllowedModules() was removed (deprecated since 1.24). * UserrightsPage::makeGroupNameListForLog() was removed (deprecated since 1.21). * MediaWikiSite::newFromGlobalId() was removed (deprecated since 1.21). +* Title::newFromRedirect() was removed (deprecated since 1.21). == Compatibility == diff --git a/includes/Title.php b/includes/Title.php index 8bafe2612a..ec17ef5565 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -572,23 +572,6 @@ class Title implements LinkTarget { return $title; } - /** - * Extract a redirect destination from a string and return the - * Title, or null if the text doesn't contain a valid redirect - * This will only return the very next target, useful for - * the redirect table and other checks that don't need full recursion - * - * @param string $text Text with possible redirect - * @return Title The corresponding Title - * @deprecated since 1.21, use Content::getRedirectTarget instead. - */ - public static function newFromRedirect( $text ) { - ContentHandler::deprecated( __METHOD__, '1.21' ); - - $content = ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT ); - return $content->getRedirectTarget(); - } - /** * Extract a redirect destination from a string and return the * Title, or null if the text doesn't contain a valid redirect -- 2.20.1