Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/237603
Change subject: Mark duplicate code in ItemByTitle code with a FIXME ...................................................................... Mark duplicate code in ItemByTitle code with a FIXME I do not think this is worth our time right now, but let's mark it so my observation does not get lost. Change-Id: I3aa42af39bedd6548bf83e5d02b5a7b2bf88bd55 --- M repo/includes/api/ItemByTitleHelper.php M repo/includes/specials/SpecialItemByTitle.php 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/03/237603/1 diff --git a/repo/includes/api/ItemByTitleHelper.php b/repo/includes/api/ItemByTitleHelper.php index 87e503d..c0cd6e7 100644 --- a/repo/includes/api/ItemByTitleHelper.php +++ b/repo/includes/api/ItemByTitleHelper.php @@ -123,6 +123,7 @@ * @return ItemId|null */ private function getItemId( $siteId, $title, $normalize ) { + // FIXME: This code is duplicated in SpecialItemByTitle::execute! $title = $this->stringNormalizer->trimToNFC( $title ); $id = $this->siteLinkLookup->getItemIdForLink( $siteId, $title ); diff --git a/repo/includes/specials/SpecialItemByTitle.php b/repo/includes/specials/SpecialItemByTitle.php index 23289ea..1f18bab 100644 --- a/repo/includes/specials/SpecialItemByTitle.php +++ b/repo/includes/specials/SpecialItemByTitle.php @@ -115,6 +115,7 @@ // If there are enough data, then try to lookup the item content if ( $site !== '' && $page !== '' ) { + // FIXME: This code is duplicated in ItemByTitleHelper::getItemId! // Try to get a item content $siteId = $this->stringNormalizer->trimToNFC( $site ); // no stripping of underscores here! $pageName = $this->stringNormalizer->trimToNFC( $page ); -- To view, visit https://gerrit.wikimedia.org/r/237603 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3aa42af39bedd6548bf83e5d02b5a7b2bf88bd55 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits