From 8af8ff84c0666a78dac14ba811daf1d9aa7de9aa Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Tue, 14 Aug 2018 22:13:18 -0700 Subject: [PATCH] Remove dead code from Title::secureAndSplit() Change-Id: I08810f0ab20fc1608f2d3b2248dcd5106044080b --- includes/Title.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index f2c6adb669..01a28f5f7d 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3695,13 +3695,6 @@ class Title implements LinkTarget { * @return bool True on success */ private function secureAndSplit() { - # Initialisation - $this->mInterwiki = ''; - $this->mFragment = ''; - $this->mNamespace = $this->mDefaultNamespace; # Usually NS_MAIN - - $dbkey = $this->mDbkeyform; - // @note: splitTitleString() is a temporary hack to allow MediaWikiTitleCodec to share // the parsing code with Title, while avoiding massive refactoring. // @todo: get rid of secureAndSplit, refactor parsing code. @@ -3709,7 +3702,7 @@ class Title implements LinkTarget { // splitTitleString method, but the only implementation (MediaWikiTitleCodec) does $titleCodec = MediaWikiServices::getInstance()->getTitleParser(); // MalformedTitleException can be thrown here - $parts = $titleCodec->splitTitleString( $dbkey, $this->getDefaultNamespace() ); + $parts = $titleCodec->splitTitleString( $this->mDbkeyform, $this->getDefaultNamespace() ); # Fill fields $this->setFragment( '#' . $parts['fragment'] ); -- 2.20.1