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

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

Change subject: CacheKeyPrefix is not allowed to contain spaces any more
......................................................................

CacheKeyPrefix is not allowed to contain spaces any more

This is caused by a (unanounced?) breaking change in If3e20c6 and the
following patches.

Change-Id: Ia11c60703435171e24e2bedeef1b7b9c9d00279d
---
M client/config/WikibaseClient.default.php
M client/config/WikibaseClient.example.php
M client/tests/phpunit/ClientDefaultsTest.php
M repo/config/Wikibase.default.php
M repo/config/Wikibase.example.php
5 files changed, 10 insertions(+), 10 deletions(-)


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

diff --git a/client/config/WikibaseClient.default.php 
b/client/config/WikibaseClient.default.php
index bc2069e..b6b8daf 100644
--- a/client/config/WikibaseClient.default.php
+++ b/client/config/WikibaseClient.default.php
@@ -72,7 +72,7 @@
                // For Wikidata production, we set it to 
'wikibase-shared/wikidata_1_25wmf24-wikidatawiki',
                // which is 'wikibase_shared/' + deployment branch name + '-' + 
repo database name,
                // and have it set in both $wgWBClientSettings and 
$wgWBRepoSettings.
-               'sharedCacheKeyPrefix' => 'wikibase_shared/' . WBL_VERSION . 
'-' . $GLOBALS['wgDBname'],
+               'sharedCacheKeyPrefix' => 'wikibase_shared/' . rawurlencode( 
WBL_VERSION ) . '-' . $GLOBALS['wgDBname'],
 
                // The duration of the object cache, in seconds.
                //
diff --git a/client/config/WikibaseClient.example.php 
b/client/config/WikibaseClient.example.php
index 2d072e8..59a23ee 100644
--- a/client/config/WikibaseClient.example.php
+++ b/client/config/WikibaseClient.example.php
@@ -54,7 +54,7 @@
 $wgWBClientSettings['showExternalRecentChanges'] = true;
 
 // Make sure we use the same keys on repo and clients, so we can share cached 
objects.
-$wgWBClientSettings['sharedCacheKeyPrefix'] = 
$wgWBClientSettings['repoDatabase'] . ':WBL/' . WBL_VERSION;
+$wgWBClientSettings['sharedCacheKeyPrefix'] = 
$wgWBClientSettings['repoDatabase'] . ':WBL/' . rawurlencode( WBL_VERSION );
 
 // In order to access a remote repo using a different database server,
 // LBFactoryMulti must be used. In that case, enabled the block below.
diff --git a/client/tests/phpunit/ClientDefaultsTest.php 
b/client/tests/phpunit/ClientDefaultsTest.php
index a139d40..3636f0a 100644
--- a/client/tests/phpunit/ClientDefaultsTest.php
+++ b/client/tests/phpunit/ClientDefaultsTest.php
@@ -25,7 +25,7 @@
                                        'siteGlobalID' => 'mywiki',
                                        'repoDatabase' => 'foo',
                                        'changesDatabase' => 'doo',
-                                       'sharedCacheKeyPrefix' => 
'wikibase_shared/' . WBL_VERSION,
+                                       'sharedCacheKeyPrefix' => 
'wikibase_shared/' . rawurlencode( WBL_VERSION ),
                                ),
                                array( // $wg
                                        'wgServer' => 'http://www.acme.com',
@@ -41,7 +41,7 @@
                                        'siteGlobalID' => 'mywiki',
                                        'repoDatabase' => 'foo',
                                        'changesDatabase' => 'doo',
-                                       'sharedCacheKeyPrefix' => 
'wikibase_shared/' . WBL_VERSION,
+                                       'sharedCacheKeyPrefix' => 
'wikibase_shared/' . rawurlencode( WBL_VERSION ),
                                )
                        ),
 
@@ -62,7 +62,7 @@
                                        'siteGlobalID' => 'mw_mywiki',
                                        'repoDatabase' => null,
                                        'changesDatabase' => null,
-                                       'sharedCacheKeyPrefix' => 
'wikibase_shared/' . WBL_VERSION . '-mw_mywiki',
+                                       'sharedCacheKeyPrefix' => 
'wikibase_shared/' . rawurlencode( WBL_VERSION ) . '-mw_mywiki',
                                )
                        ),
 
@@ -74,7 +74,7 @@
                                        'siteGlobalID' => 'mywiki',
                                        'repoDatabase' => 'foo',
                                        'changesDatabase' => 'doo',
-                                       'sharedCacheKeyPrefix' => 'foo:WBL/' . 
WBL_VERSION,
+                                       'sharedCacheKeyPrefix' => 'foo:WBL/' . 
rawurlencode( WBL_VERSION ),
                                ),
                                array( // $wg
                                        'wgServer' => 'http://www.acme.com',
@@ -90,7 +90,7 @@
                                        'siteGlobalID' => 'mywiki',
                                        'repoDatabase' => 'foo',
                                        'changesDatabase' => 'doo',
-                                       'sharedCacheKeyPrefix' => 'foo:WBL/' . 
WBL_VERSION,
+                                       'sharedCacheKeyPrefix' => 'foo:WBL/' . 
rawurlencode( WBL_VERSION ),
                                )
                        ),
 
@@ -111,7 +111,7 @@
                                        'siteGlobalID' => 'mw_mywiki',
                                        'repoDatabase' => false,
                                        'changesDatabase' => false,
-                                       'sharedCacheKeyPrefix' => 
'wikibase_shared/' . WBL_VERSION . '-mw_mywiki',
+                                       'sharedCacheKeyPrefix' => 
'wikibase_shared/' . rawurlencode( WBL_VERSION ) . '-mw_mywiki',
                                )
                        ),
 
diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php
index 45f13cf..175cb14 100644
--- a/repo/config/Wikibase.default.php
+++ b/repo/config/Wikibase.default.php
@@ -117,7 +117,7 @@
                //
                // Please note that $wgWBClientSettings overrides settings such 
as this one in the repo,
                // if client is enabled on the same wiki.
-               'sharedCacheKeyPrefix' => 'wikibase_shared/' . WBL_VERSION . 
'-' . $GLOBALS['wgDBname'],
+               'sharedCacheKeyPrefix' => 'wikibase_shared/' . rawurlencode( 
WBL_VERSION ) . '-' . $GLOBALS['wgDBname'],
 
                // The duration of the object cache, in seconds.
                //
diff --git a/repo/config/Wikibase.example.php b/repo/config/Wikibase.example.php
index 310ce95..11fe652 100644
--- a/repo/config/Wikibase.example.php
+++ b/repo/config/Wikibase.example.php
@@ -41,7 +41,7 @@
        $wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_PROPERTY] 
= WB_NS_PROPERTY;
 
        // Make sure we use the same keys on repo and clients, so we can share 
cached objects.
-       $wgWBRepoSettings['sharedCacheKeyPrefix'] = $wgDBname . ':WBL/' . 
WBL_VERSION;
+       $wgWBRepoSettings['sharedCacheKeyPrefix'] = $wgDBname . ':WBL/' . 
rawurlencode( WBL_VERSION );
 
        // NOTE: no need to set up $wgNamespaceContentModels, Wikibase will do 
that automatically based on $wgWBRepoSettings
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia11c60703435171e24e2bedeef1b7b9c9d00279d
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