jenkins-bot has submitted this change and it was merged.

Change subject: Remove Title::newFromRedirectRecurse()
......................................................................


Remove Title::newFromRedirectRecurse()

Bug: T122754
Change-Id: I8b957eff7f355493ef6850f7a83dcb619ab6be78
---
M RELEASE-NOTES-1.27
M includes/Title.php
M tests/phpunit/includes/content/JavaScriptContentTest.php
M tests/phpunit/includes/content/TextContentTest.php
4 files changed, 1 insertion(+), 37 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 0aebf38..b6bb950 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -403,6 +403,7 @@
 * Title::newFromRedirectArray() was removed (deprecated in 1.21).
 * UserMailer::send() no longer accepts $replyto as the 5th argument and 
$contentType
   as the 6th. These must be passed in the options array now.
+* Title::newFromRedirectRecurse() was removed (deprecated in 1.21).
 
 == Compatibility ==
 
diff --git a/includes/Title.php b/includes/Title.php
index a6163f0..f4a6894 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -573,23 +573,6 @@
        }
 
        /**
-        * Extract a redirect destination from a string and return the
-        * Title, or null if the text doesn't contain a valid redirect
-        * This will recurse down $wgMaxRedirects times or until a non-redirect 
target is hit
-        * in order to provide (hopefully) the Title of the final destination 
instead of another redirect
-        *
-        * @param string $text Text with possible redirect
-        * @return Title
-        * @deprecated since 1.21, use Content::getUltimateRedirectTarget 
instead.
-        */
-       public static function newFromRedirectRecurse( $text ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
-
-               $content = ContentHandler::makeContent( $text, null, 
CONTENT_MODEL_WIKITEXT );
-               return $content->getUltimateRedirectTarget();
-       }
-
-       /**
         * Get the prefixed DB key associated with an ID
         *
         * @param int $id The page_id of the article
diff --git a/tests/phpunit/includes/content/JavaScriptContentTest.php 
b/tests/phpunit/includes/content/JavaScriptContentTest.php
index 97e0b1c..1c746bc 100644
--- a/tests/phpunit/includes/content/JavaScriptContentTest.php
+++ b/tests/phpunit/includes/content/JavaScriptContentTest.php
@@ -141,16 +141,6 @@
                ];
        }
 
-       /**
-        * @todo Test needs database!
-        */
-       /*
-       public function getUltimateRedirectTarget() {
-               $text = $this->getNativeData();
-               return Title::newFromRedirectRecurse( $text );
-       }
-       */
-
        public static function dataIsCountable() {
                return [
                        [ '',
diff --git a/tests/phpunit/includes/content/TextContentTest.php 
b/tests/phpunit/includes/content/TextContentTest.php
index d89f3eb..ac83428 100644
--- a/tests/phpunit/includes/content/TextContentTest.php
+++ b/tests/phpunit/includes/content/TextContentTest.php
@@ -180,16 +180,6 @@
                $this->assertEquals( !is_null( $expected ), 
$content->isRedirect() );
        }
 
-       /**
-        * @todo Test needs database! Should be done by a test class in the 
Database group.
-        */
-       /*
-       public function getUltimateRedirectTarget() {
-               $text = $this->getNativeData();
-               return Title::newFromRedirectRecurse( $text );
-       }
-       */
-
        public static function dataIsCountable() {
                return [
                        [ '',

-- 
To view, visit https://gerrit.wikimedia.org/r/281095
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b957eff7f355493ef6850f7a83dcb619ab6be78
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to