Aude has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337538 )

Change subject: Remove fixLegacyContentModelSetting from WikibaseRepo factory
......................................................................

Remove fixLegacyContentModelSetting from WikibaseRepo factory

Remove the fixLegacyContentModelSetting code, which was temporarily
needed for deploying changes to the content model settings and
allowing others some time (it's been 6+ months) to adjust.

Wikidata config has been updated to the new settings:

https://github.com/wikimedia/operations-mediawiki-config/commit/81535563b1463d8c154a7dd10970c16706e0de19#diff-01f4cd9b9585049d676035224d9b5464

Change-Id: I264b268c69b40303dc6ad9111cc31c3c706578c6
---
M repo/includes/WikibaseRepo.php
1 file changed, 1 insertion(+), 19 deletions(-)


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

diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index ee8ce12..fa64739 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -1606,10 +1606,7 @@
         * @return int[]
         */
        private function getEntityNamespacesSetting() {
-               $namespaces = $this->fixLegacyContentModelSetting(
-                       $this->settings->getSetting( 'entityNamespaces' ),
-                       'entityNamespaces'
-               );
+               $namespaces = $this->settings->getSetting( 'entityNamespaces' );
 
                Hooks::run( 'WikibaseEntityNamespaces', array( &$namespaces ) );
                return $namespaces;
@@ -1818,21 +1815,6 @@
 
        public function getEntityTypesConfigValueProvider() {
                return new EntityTypesConfigValueProvider( 
$this->entityTypeDefinitions );
-       }
-
-       private function fixLegacyContentModelSetting( array $setting, $name ) {
-               if ( isset( $setting[ 'wikibase-item' ] ) || isset( $setting[ 
'wikibase-property' ] ) ) {
-                       wfWarn( "The specified value for the Wikibase setting 
'$name' uses content model ids as keys. This is deprecated. " .
-                               "Please update to plain entity types, e.g. 
'item' instead of 'wikibase-item'." );
-                       $oldSetting = $setting;
-                       $setting = [];
-                       $prefix = 'wikibase-';
-                       foreach ( $oldSetting as $contentModel => $namespace ) {
-                               $pos = strpos( $contentModel, $prefix );
-                               $setting[ $pos === 0 ? substr( $contentModel, 
strlen( $prefix ) ) : $contentModel ] = $namespace;
-                       }
-               }
-               return $setting;
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I264b268c69b40303dc6ad9111cc31c3c706578c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <aude.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to