John Erling Blad has uploaded a new change for review.

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


Change subject: (Bug ) Fix removed underscores in site id
......................................................................

(Bug ) Fix removed underscores in site id

A fix in ItemByTitle that should only strip underscores in "page"
also strips underscores in "site". That makes some language code
fail, and then the page lookup fail.

Change-Id: I61acaeabdf44d80dde9b129c4de51e10e4004cd8
---
M repo/includes/specials/SpecialItemByTitle.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/51/55451/1

diff --git a/repo/includes/specials/SpecialItemByTitle.php 
b/repo/includes/specials/SpecialItemByTitle.php
index c085971..5b8c36f 100644
--- a/repo/includes/specials/SpecialItemByTitle.php
+++ b/repo/includes/specials/SpecialItemByTitle.php
@@ -66,7 +66,7 @@
                // If ther are enough data, then try to lookup the item content
                if ( isset( $site ) && isset( $page ) ) {
                        // Try to get a item content
-                       $siteId = \Wikibase\Utils::trimToNFC( str_replace( '_', 
' ', $site ) );
+                       $siteId = \Wikibase\Utils::trimToNFC( $site ); // no 
stripping of underscores here!
                        $pageName = \Wikibase\Utils::trimToNFC( str_replace( 
'_', ' ', $page ) );
                        $itemHandler = new \Wikibase\ItemHandler();
                        $itemContent = $itemHandler->getFromSiteLink( $siteId, 
$pageName );

-- 
To view, visit https://gerrit.wikimedia.org/r/55451
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61acaeabdf44d80dde9b129c4de51e10e4004cd8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: John Erling Blad <[email protected]>

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

Reply via email to