Samwilson has uploaded a new change for review. https://gerrit.wikimedia.org/r/322848
Change subject: Don't worry about recursive redirects, just use one ...................................................................... Don't worry about recursive redirects, just use one The Person's title was following any number of redirects, but as this optimisation is already done in the database it's not required. Change-Id: I5a598cc4e71a6d27c64fafae8cc2c0d881d39aeb --- M src/Person.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Genealogy refs/changes/48/322848/1 diff --git a/src/Person.php b/src/Person.php index 8dfbb51..a794c05 100644 --- a/src/Person.php +++ b/src/Person.php @@ -51,8 +51,8 @@ */ public function getTitle() { $page = WikiPage::factory( $this->title ); - while ( $page->isRedirect() ) { - $page = WikiPage::factory( $page->getRedirectTarget() ); + if ( $page->isRedirect() ) { + return $page->getRedirectTarget(); } return $page->getTitle(); } -- To view, visit https://gerrit.wikimedia.org/r/322848 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a598cc4e71a6d27c64fafae8cc2c0d881d39aeb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Genealogy Gerrit-Branch: master Gerrit-Owner: Samwilson <s...@samwilson.id.au> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits