Addshore has uploaded a new change for review.
https://gerrit.wikimedia.org/r/227222
Change subject: Rm EntityParserOutputGeneratorFactory bad opts
......................................................................
Rm EntityParserOutputGeneratorFactory bad opts
This class sets an option with the ValueFormatter::OPT_LANG
key. This key a) should not be used with SerializationOptions
and b) is not used anywhere when set in this case
So it is removed, as it was stupid, and shouldn't do anything..
Change-Id: I79085263db81c75346d23baa6a7fdc1b3a91afa6
---
M repo/includes/EntityParserOutputGeneratorFactory.php
1 file changed, 3 insertions(+), 23 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/22/227222/1
diff --git a/repo/includes/EntityParserOutputGeneratorFactory.php
b/repo/includes/EntityParserOutputGeneratorFactory.php
index c3f4153..4e12f38 100644
--- a/repo/includes/EntityParserOutputGeneratorFactory.php
+++ b/repo/includes/EntityParserOutputGeneratorFactory.php
@@ -91,7 +91,7 @@
return new EntityParserOutputGenerator(
$this->entityViewFactory,
- $this->newParserOutputJsConfigBuilder( $languageCode ),
+ $this->newParserOutputJsConfigBuilder(),
$this->entityTitleLookup,
$this->valuesFinder,
$this->entityInfoBuilderFactory,
@@ -104,14 +104,10 @@
}
/**
- * @param string $languageCode
- *
* @return ParserOutputJsConfigBuilder
*/
- private function newParserOutputJsConfigBuilder( $languageCode ) {
- return new ParserOutputJsConfigBuilder(
- $this->makeJsConfigSerializationOptions( $languageCode )
- );
+ private function newParserOutputJsConfigBuilder() {
+ return new ParserOutputJsConfigBuilder( new
SerializationOptions() );
}
/**
@@ -125,22 +121,6 @@
return $this->languageFallbackChainFactory->newFromLanguageCode(
$languageCode
);
- }
-
- /**
- * @param string $languageCode
- *
- * @return SerializationOptions
- */
- private function makeJsConfigSerializationOptions( $languageCode ) {
- // NOTE: when serializing the full entity to be stored in the
- // wbEntity JS config variable, we currently do not want any
- // language fallback to be applied.
-
- $options = new SerializationOptions();
- $options->setOption( ValueFormatter::OPT_LANG, $languageCode );
-
- return $options;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/227222
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I79085263db81c75346d23baa6a7fdc1b3a91afa6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits