Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/281095

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/281095/1

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 12fb06e..1b43d05 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -396,6 +396,7 @@
 * Skin::newFromKey() was removed (deprecated since 1.24).
 * Skin::getUsableSkins() was removed (deprecated since 1.23).
 * LoadBalancer::pickRandom() was removed (deprecated in 1.21).
+* Title::newFromRedirectRecurse() was removed (deprecated in 1.21).
 
 == Compatibility ==
 
diff --git a/includes/Title.php b/includes/Title.php
index ec17ef5..2b42004 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();
-       }
-
-       /**
         * Extract a redirect destination from a string and return an
         * array of Titles, or null if the text doesn't contain a valid redirect
         * The last element in the array is the final destination after all 
redirects
diff --git a/tests/phpunit/includes/content/JavaScriptContentTest.php 
b/tests/phpunit/includes/content/JavaScriptContentTest.php
index 8cbbfb8..32c1adb 100644
--- a/tests/phpunit/includes/content/JavaScriptContentTest.php
+++ b/tests/phpunit/includes/content/JavaScriptContentTest.php
@@ -151,16 +151,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 93bf716..ed91172 100644
--- a/tests/phpunit/includes/content/TextContentTest.php
+++ b/tests/phpunit/includes/content/TextContentTest.php
@@ -190,16 +190,6 @@
        }
        */
 
-       /**
-        * @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: newchange
Gerrit-Change-Id: I8b957eff7f355493ef6850f7a83dcb619ab6be78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>

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

Reply via email to