Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Use factory instead of accessing configuration
......................................................................

Use factory instead of accessing configuration

Change-Id: I2c3e4c47741927d0cc3150ecf37bbd65d1202ade
---
M repo/Wikibase.hooks.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index bc5e7d9..a3a52b0 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -76,14 +76,14 @@
        public static function onSetupAfterCache() {
                global $wgNamespaceContentModels;
 
-               $namespaces = WikibaseRepo::getDefaultInstance()->
-                       getSettings()->getSetting( 'entityNamespaces' );
+               $entityNamespaceLookup = 
WikibaseRepo::getDefaultInstance()->getEntityNamespaceLookup();
+               $namespaces = $entityNamespaceLookup->getEntityNamespaces();
 
                if ( empty( $namespaces ) ) {
                        throw new MWException( 'Wikibase: Incomplete 
configuration: '
-                               . '$wgWBRepoSettings["entityNamespaces"] has to 
be set to an '
+                               . '$wgWBRepoSettings[\'entityNamespaces\'] has 
to be set to an '
                                . 'array mapping content model IDs to namespace 
IDs. '
-                               . 'See ExampleSettings.php for details and 
examples.' );
+                               . 'See Wikibase.example.php for details and 
examples.' );
                }
 
                foreach ( $namespaces as $contentModel => $namespace ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c3e4c47741927d0cc3150ecf37bbd65d1202ade
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

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

Reply via email to