Andrew Bogott has submitted this change and it was merged.
Change subject: Include Wikibase query config only if those components are
enabled
......................................................................
Include Wikibase query config only if those components are enabled
currently we get php notice:
PHP Notice: Use of undefined constant WB_NS_QUERY - assumed 'WB_NS_QUERY' in
/srv/mediawiki/wikidata_repo_requires.php on line 70
Change-Id: Ie2d56faae8b7ac6467fb51a5387000458127d342
---
M modules/wikidata_singlenode/templates/wikidata-repo-requires.php
1 file changed, 9 insertions(+), 5 deletions(-)
Approvals:
Andrew Bogott: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/wikidata_singlenode/templates/wikidata-repo-requires.php
b/modules/wikidata_singlenode/templates/wikidata-repo-requires.php
index 6de5d6d..aa19185 100644
--- a/modules/wikidata_singlenode/templates/wikidata-repo-requires.php
+++ b/modules/wikidata_singlenode/templates/wikidata-repo-requires.php
@@ -57,8 +57,6 @@
// NOTE: do *not* define WB_NS_ITEM and WB_NS_ITEM_TALK when using a core
namespace for items!
define( 'WB_NS_PROPERTY', $baseNs +2 );
define( 'WB_NS_PROPERTY_TALK', $baseNs +3 );
-define( 'WB_NS_QUERY', $baseNs +4 );
-define( 'WB_NS_QUERY_TALK', $baseNs +5 );
// You can set up an alias for the main namespace, if you like.
$wgNamespaceAliases['Item'] = NS_MAIN;
@@ -67,14 +65,20 @@
// No extra namespace for items, using a core namespace for that.
$wgExtraNamespaces[WB_NS_PROPERTY] = 'Property';
$wgExtraNamespaces[WB_NS_PROPERTY_TALK] = 'Property_talk';
-$wgExtraNamespaces[WB_NS_QUERY] = 'Query';
-$wgExtraNamespaces[WB_NS_QUERY_TALK] = 'Query_talk';
// Tell Wikibase which namespace to use for which kind of entity
$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_ITEM] = NS_MAIN;
// <=== Use main namespace for items!!!
$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_PROPERTY] =
WB_NS_PROPERTY; // use custom namespace
-$wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_QUERY] =
WB_NS_QUERY; // use custom namespace
+if ( defined( 'CONTENT_MODEL_WIKIBASE_QUERY' ) ) {
+ define( 'WB_NS_QUERY', $baseNs +4 );
+ define( 'WB_NS_QUERY_TALK', $baseNs +5 );
+
+ $wgExtraNamespaces[WB_NS_QUERY] = 'Query';
+ $wgExtraNamespaces[WB_NS_QUERY_TALK] = 'Query_talk';
+
+ $wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_QUERY] =
WB_NS_QUERY; // use custom namespace
+}
$wgShowExceptionDetails = true;
$wgContentHandlerUseDB = true;
--
To view, visit https://gerrit.wikimedia.org/r/67408
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2d56faae8b7ac6467fb51a5387000458127d342
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits