Henning Snater has uploaded a new change for review.

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

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(-)


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

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: newchange
Gerrit-Change-Id: Ib08bbfd2477ba5c7780377890d65884672fb2dd5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>

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

Reply via email to