jenkins-bot has submitted this change and it was merged.
Change subject: Fixed check in isTitleInEntityNamespace
......................................................................
Fixed check in isTitleInEntityNamespace
$namespace is a namespace id while entityNamespaces contains the namespace
names indexed by the
corresponding ids. This led to always return false when items are not stored in
the main namespace.
Change-Id: Ib08bbfd2477ba5c7780377890d65884672fb2dd5
---
M repo/Wikibase.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Aude: Looks good to me, approved
WikidataJenkins: Verified
jenkins-bot: Verified
diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index fdf579e..5023977 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -50,8 +50,8 @@
$entityNamespaces = array_flip(
NamespaceUtils::getEntityNamespaces() );
$namespace = $title->getNamespace();
- return in_array( $namespace, $entityNamespaces );
- }
+ return array_key_exists( $namespace, $entityNamespaces );
+ }
/**
* Handler for the BeforePageDisplay hook, simply injects
wikibase.ui.entitysearch module
--
To view, visit https://gerrit.wikimedia.org/r/118673
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib08bbfd2477ba5c7780377890d65884672fb2dd5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: WikidataJenkins <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits