Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/351779 )

Change subject: Rename …StorageFrontendUrl settings to …StorageBaseUrl
......................................................................

Rename …StorageFrontendUrl settings to …StorageBaseUrl

This rename was a PM decision when we started exposing these settings
via the API.

This patch obviously changes a public interface, but does not have an
effect, as far as I can see. These two settings are still brand new and
not used anywhere. The defaults are …://commons.wikimedia.org/…. We
will most probably never change these settings on our clusters.

Change-Id: I1bc4f578fe7e219f3e9e0c2ebedbd3d65784a7e9
---
M client/config/WikibaseClient.default.php
M client/includes/WikibaseClient.php
M 
client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
M docs/options.wiki
M repo/Wikibase.hooks.php
M repo/config/Wikibase.default.php
M repo/includes/WikibaseRepo.php
7 files changed, 26 insertions(+), 25 deletions(-)


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

diff --git a/client/config/WikibaseClient.default.php 
b/client/config/WikibaseClient.default.php
index 25eb5e1..ddaa87a 100644
--- a/client/config/WikibaseClient.default.php
+++ b/client/config/WikibaseClient.default.php
@@ -210,15 +210,15 @@
                return $otherProjectsSitesProvider->getOtherProjectsSiteIds( 
$settings->getSetting( 'siteLinkGroups' ) );
        };
 
-       // URL of geo shape storage frontend. Used primarily to build links to 
the geo shapes.
-       // URL will be concatenated with the page title, so should end up with 
'/' or 'title='
-       // Special characters (e.g. space, percent, etc.) in URL should NOT be 
encoded
-       $defaults['geoShapeStorageFrontendUrl'] = 
'https://commons.wikimedia.org/wiki/';
+       // Base URL of geo shape storage frontend. Used primarily to build 
links to the geo shapes. Will
+       // be concatenated with the page title, so should end with "/" or 
"title=". Special characters
+       // (e.g. space, percent, etc.) should NOT be encoded.
+       $defaults['geoShapeStorageBaseUrl'] = 
'https://commons.wikimedia.org/wiki/';
 
-       // URL of tabular data storage frontend. Used primarily to build links 
to the tabular data pages.
-       // URL will be concatenated with the page title, so should end up with 
'/' or 'title='
-       // Special characters (e.g. space, percent, etc.) in URL should NOT be 
encoded
-       $defaults['tabularDataStorageFrontendUrl'] = 
'https://commons.wikimedia.org/wiki/';
+       // Base URL of tabular data storage frontend. Used primarily to build 
links to the tabular data
+       // pages. Will be concatenated with the page title, so should end with 
"/" or "title=". Special
+       // characters (e.g. space, percent, etc.) should NOT be encoded.
+       $defaults['tabularDataStorageBaseUrl'] = 
'https://commons.wikimedia.org/wiki/';
 
        return $defaults;
 } );
diff --git a/client/includes/WikibaseClient.php 
b/client/includes/WikibaseClient.php
index 8ef5723..fd5df56 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -272,8 +272,8 @@
                        new FormatterLabelDescriptionLookupFactory( 
$this->getTermLookup() ),
                        new LanguageNameLookup( 
$this->getUserLanguage()->getCode() ),
                        $this->getRepoItemUriParser(),
-                       $settings->getSetting( 'geoShapeStorageFrontendUrl' ),
-                       $settings->getSetting( 'tabularDataStorageFrontendUrl' 
),
+                       $settings->getSetting( 'geoShapeStorageBaseUrl' ),
+                       $settings->getSetting( 'tabularDataStorageBaseUrl' ),
                        $entityTitleLookup
                );
        }
diff --git 
a/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
 
b/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
index dd79669..47d864f 100644
--- 
a/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
+++ 
b/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
@@ -59,8 +59,8 @@
                $settings = $wikibaseClient->getSettings();
                $siteId = $settings->getSetting( 'siteGlobalID' );
 
-               $settings->setSetting( 'geoShapeStorageFrontendUrl', 
'https://media.something/view/' );
-               $settings->setSetting( 'tabularDataStorageFrontendUrl', 
'https://tabular.data/view/' );
+               $settings->setSetting( 'geoShapeStorageBaseUrl', 
'https://media.something/view/' );
+               $settings->setSetting( 'tabularDataStorageBaseUrl', 
'https://tabular.data/view/' );
                $this->setUpDummyData( $store, $siteId );
        }
 
diff --git a/docs/options.wiki b/docs/options.wiki
index 78a70cd..387f2f2 100644
--- a/docs/options.wiki
+++ b/docs/options.wiki
@@ -24,7 +24,8 @@
 :'''Note''' that if this is <code>true</code>, the 
<code>pruneChanges.php</code> script should be run periodically to remove old 
changes from the database table.
 ;disabledDataTypes: Array listing of disabled data types on a wiki. This 
setting is intended to be used in a new Wikibase installation without items 
yet, or to control deployment of new data types. This setting should be set to 
the same value in both client and repo settings. Defaults to an empty array.
 ;maxSerializedEntitySize: The maximum serialized size of entities, in KB. 
Loading and storing will fail if this size is exceeded. This is intended as a 
hard limit that prevents very large chunks of data being stored or processed 
due to abuse or erroneous code. Defaults to MediaWiki core's 
<code>$wgMaxArticleSize</code> setting.
-;geoShapeStorageFrontendUrl: URL of geo shape storage frontend. Used primarily 
to build links to the geo shapes. URL will be concatenated with the page title, 
so should end up with '/' or 'title='. Special characters (e.g. space, percent, 
etc.) in URL should NOT be encoded
+;geoShapeStorageBaseUrl: Base URL of geo shape storage frontend. Used 
primarily to build links to the geo shapes. Will be concatenated with the page 
title, so should end with <code>/</code> or <code>title=</code>. Special 
characters (e.g. space, percent, etc.) should ''not'' be encoded.
+;tabularDataStorageBaseUrl: Base URL of tabular data storage frontend. Used 
primarily to build links to the tabular data pages. Will be concatenated with 
the page title, so should end with <code>/</code> or <code>title=</code>. 
Special characters (e.g. space, percent, etc.) should ''not'' be encoded.
 
 == Repository Settings ==
 
diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index b08f2f8..6f4eb76 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -835,10 +835,10 @@
                $conceptBaseUri = $wikibaseRepo->getSettings()->getSetting( 
'conceptBaseUri' );
                $data['wikibase-conceptbaseuri'] = $conceptBaseUri;
 
-               $geoShapeStorageBaseUrl = 
$wikibaseRepo->getSettings()->getSetting( 'geoShapeStorageFrontendUrl' );
+               $geoShapeStorageBaseUrl = 
$wikibaseRepo->getSettings()->getSetting( 'geoShapeStorageBaseUrl' );
                $data['wikibase-geoshapestoragebaseurl'] = 
$geoShapeStorageBaseUrl;
 
-               $tabularDataStorageBaseUrl = 
$wikibaseRepo->getSettings()->getSetting( 'tabularDataStorageFrontendUrl' );
+               $tabularDataStorageBaseUrl = 
$wikibaseRepo->getSettings()->getSetting( 'tabularDataStorageBaseUrl' );
                $data['wikibase-tabulardatastoragebaseurl'] = 
$tabularDataStorageBaseUrl;
 
                $sparqlEndpoint = $wikibaseRepo->getSettings()->getSetting( 
'sparqlEndpoint' );
diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php
index 6050679..47a18d3 100644
--- a/repo/config/Wikibase.default.php
+++ b/repo/config/Wikibase.default.php
@@ -203,18 +203,18 @@
        // URL of geo shape storage API endpoint
        'geoShapeStorageApiEndpointUrl' => 
'https://commons.wikimedia.org/w/api.php',
 
-       // URL of geo shape storage frontend. Used primarily to build links to 
the geo shapes.
-       // URL will be concatenated with the page title, so should end up with 
'/' or 'title='
-       // Special characters (e.g. space, percent, etc.) in URL should NOT be 
encoded
-       'geoShapeStorageFrontendUrl' => 'https://commons.wikimedia.org/wiki/',
+       // Base URL of geo shape storage frontend. Used primarily to build 
links to the geo shapes. Will
+       // be concatenated with the page title, so should end with "/" or 
"title=". Special characters
+       // (e.g. space, percent, etc.) should NOT be encoded.
+       'geoShapeStorageBaseUrl' => 'https://commons.wikimedia.org/wiki/',
 
        // URL of tabular data storage API endpoint
        'tabularDataStorageApiEndpointUrl' => 
'https://commons.wikimedia.org/w/api.php',
 
-       // URL of tabular data storage frontend. Used primarily to build links 
to the data.
-       // URL will be concatenated with the page title, so should end up with 
'/' or 'title='
-       // Special characters (e.g. space, percent, etc.) in URL should NOT be 
encoded
-       'tabularDataStorageFrontendUrl' => 
'https://commons.wikimedia.org/wiki/',
+       // Base URL of tabular data storage frontend. Used primarily to build 
links to the tabular data
+       // pages. Will be concatenated with the page title, so should end with 
"/" or "title=". Special
+       // characters (e.g. space, percent, etc.) should NOT be encoded.
+       'tabularDataStorageBaseUrl' => 'https://commons.wikimedia.org/wiki/',
 
        // Name of the lock manager for dispatch changes coordinator
        'dispatchingLockManager' => null,
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index 18e1158..0f64be8 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -448,8 +448,8 @@
                        new FormatterLabelDescriptionLookupFactory( 
$this->getTermLookup() ),
                        $this->getLanguageNameLookup(),
                        $this->getLocalItemUriParser(),
-                       $this->getSettings()->getSetting( 
'geoShapeStorageFrontendUrl' ),
-                       $this->getSettings()->getSetting( 
'tabularDataStorageFrontendUrl' ),
+                       $this->getSettings()->getSetting( 
'geoShapeStorageBaseUrl' ),
+                       $this->getSettings()->getSetting( 
'tabularDataStorageBaseUrl' ),
                        $this->getEntityTitleLookup()
                );
        }

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

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