aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/ServiceWiring.php2
-rw-r--r--includes/parser/Parsoid/ParsoidOutputAccess.php12
-rw-r--r--tests/phpunit/integration/includes/Rest/Handler/HtmlOutputRendererHelperTest.php2
-rw-r--r--tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php2
-rw-r--r--tests/phpunit/integration/includes/Rest/Handler/ParsoidOutputAccessTest.php2
-rw-r--r--tests/phpunit/integration/includes/Rest/Handler/RevisionHTMLHandlerTest.php2
6 files changed, 14 insertions, 8 deletions
diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php
index 5c4ddade0d90..c4a45623a05a 100644
--- a/includes/ServiceWiring.php
+++ b/includes/ServiceWiring.php
@@ -1358,7 +1358,7 @@ return [
new ServiceOptions(
ParsoidOutputAccess::CONSTRUCTOR_OPTIONS,
$services->getMainConfig(),
- [ 'WikiID' => WikiMap::getCurrentWikiId() ]
+ [ 'ParsoidWikiID' => WikiMap::getCurrentWikiId() ]
),
$services->getParserCacheFactory(),
$services->getPageStore(),
diff --git a/includes/parser/Parsoid/ParsoidOutputAccess.php b/includes/parser/Parsoid/ParsoidOutputAccess.php
index f6fa0250f481..ac7e5b581c18 100644
--- a/includes/parser/Parsoid/ParsoidOutputAccess.php
+++ b/includes/parser/Parsoid/ParsoidOutputAccess.php
@@ -72,7 +72,7 @@ class ParsoidOutputAccess {
public const CONSTRUCTOR_OPTIONS = [
MainConfigNames::ParsoidCacheConfig,
MainConfigNames::ParsoidSettings,
- 'WikiID'
+ 'ParsoidWikiID'
];
/** @var RevisionOutputCache */
@@ -109,7 +109,7 @@ class ParsoidOutputAccess {
private $options;
/** @var string */
- private $wikiId;
+ private $parsoidWikiId;
/**
* @param ServiceOptions $options
@@ -146,6 +146,12 @@ class ParsoidOutputAccess {
$this->parsoid = $parsoid;
$this->siteConfig = $siteConfig;
$this->parsoidPageConfigFactory = $parsoidPageConfigFactory;
+
+ // NOTE: This is passed as the "prefix" option to parsoid, which it uses
+ // to locate wiki specific configuration in the baseconfig directory.
+ // This should probably be managed by SiteConfig instead, so
+ // we hopefully will not need it here in the future.
+ $this->parsoidWikiId = $options->get( 'ParsoidWikiID' );
}
/**
@@ -240,7 +246,7 @@ class ParsoidOutputAccess {
): Status {
$defaultOptions = [
'pageBundle' => true,
- 'prefix' => $this->wikiId,
+ 'prefix' => $this->parsoidWikiId,
'pageName' => $page,
'htmlVariantLanguage' => $languageOverride ? $languageOverride->getCode() : null,
'outputContentVersion' => Parsoid::defaultHTMLVersion(),
diff --git a/tests/phpunit/integration/includes/Rest/Handler/HtmlOutputRendererHelperTest.php b/tests/phpunit/integration/includes/Rest/Handler/HtmlOutputRendererHelperTest.php
index 39b9f4038cd2..b577c421a3ed 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/HtmlOutputRendererHelperTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/HtmlOutputRendererHelperTest.php
@@ -435,7 +435,7 @@ class HtmlOutputRendererHelperTest extends MediaWikiIntegrationTestCase {
new ServiceOptions(
ParsoidOutputAccess::CONSTRUCTOR_OPTIONS,
$this->getServiceContainer()->getMainConfig(),
- [ 'WikiID' => 'MyWiki' ]
+ [ 'ParsoidWikiID' => 'MyWiki' ]
),
$this->getServiceContainer()->getParserCacheFactory(),
$this->createNoOpMock( PageLookup::class ),
diff --git a/tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php b/tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php
index 7f8d2bc601df..26f91aef4456 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php
@@ -102,7 +102,7 @@ class PageHTMLHandlerTest extends MediaWikiIntegrationTestCase {
new ServiceOptions(
ParsoidOutputAccess::CONSTRUCTOR_OPTIONS,
$services->getMainConfig(),
- [ 'WikiID' => 'MyWiki' ]
+ [ 'ParsoidWikiID' => 'MyWiki' ]
),
$parserCacheFactory,
$services->getPageStore(),
diff --git a/tests/phpunit/integration/includes/Rest/Handler/ParsoidOutputAccessTest.php b/tests/phpunit/integration/includes/Rest/Handler/ParsoidOutputAccessTest.php
index b653bc69dafb..1708ac3558c2 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/ParsoidOutputAccessTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/ParsoidOutputAccessTest.php
@@ -90,7 +90,7 @@ class ParsoidOutputAccessTest extends MediaWikiIntegrationTestCase {
'ParsoidSettings' => MainConfigSchema::getDefaultValue(
MainConfigNames::ParsoidSettings
),
- 'WikiID' => 'MyWiki'
+ 'ParsoidWikiID' => 'MyWiki'
]
),
$parserCacheFactory,
diff --git a/tests/phpunit/integration/includes/Rest/Handler/RevisionHTMLHandlerTest.php b/tests/phpunit/integration/includes/Rest/Handler/RevisionHTMLHandlerTest.php
index 48b2eea629c9..104f68d9b1dd 100644
--- a/tests/phpunit/integration/includes/Rest/Handler/RevisionHTMLHandlerTest.php
+++ b/tests/phpunit/integration/includes/Rest/Handler/RevisionHTMLHandlerTest.php
@@ -114,7 +114,7 @@ class RevisionHTMLHandlerTest extends MediaWikiIntegrationTestCase {
new ServiceOptions(
ParsoidOutputAccess::CONSTRUCTOR_OPTIONS,
$services->getMainConfig(),
- [ 'WikiID' => 'MyWiki' ]
+ [ 'ParsoidWikiID' => 'MyWiki' ]
),
$parserCacheFactory,
$services->getPageStore(),