From: Kunal Mehta Date: Wed, 27 Apr 2016 21:26:34 +0000 (-0700) Subject: Title: Update conversion functions for LinkTarget interwiki support X-Git-Tag: 1.31.0-rc.0~7156 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=222f9b48bbf439dff0e815b3408b4e2411de247b;p=lhc%2Fweb%2Fwiklou.git Title: Update conversion functions for LinkTarget interwiki support Title::newFromLinkTarget() will now take the interwiki component from the LinkTarget object, and Title::getTitleValue() will pass on the interwiki part if there is one. Follows-up 9b1f8b4ca331e45. Change-Id: If1fecc9d71e58c476d6cebe6164cdc95f183048d --- diff --git a/includes/Title.php b/includes/Title.php index 6f38283a5d..7887890474 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -256,7 +256,9 @@ class Title implements LinkTarget { return self::makeTitle( $linkTarget->getNamespace(), $linkTarget->getText(), - $linkTarget->getFragment() ); + $linkTarget->getFragment(), + $linkTarget->getInterwiki() + ); } /** @@ -871,7 +873,9 @@ class Title implements LinkTarget { $this->mTitleValue = new TitleValue( $this->getNamespace(), $this->getDBkey(), - $this->getFragment() ); + $this->getFragment(), + $this->getInterwiki() + ); } catch ( InvalidArgumentException $ex ) { wfDebug( __METHOD__ . ': Can\'t create a TitleValue for [[' . $this->getPrefixedText() . ']]: ' . $ex->getMessage() . "\n" );