Ensure Parsoid doesn't throw when <ref> is used w/o Cite installed

Parsoid always enables `<ref>` processing, but our Cite extension
implementation tries to fetch $wgCiteResponsiveReferences, which won't
be set if the Cite extension is not installed.

Change-Id: Idde8af07e5bf40983b2ec878ebf70aabb522a800
(cherry picked from commit 0ca4ae6908b626d34f8445d9048342378d0e3c23)
(cherry picked from commit 29d3e25b4a)
This commit is contained in:
C. Scott Ananian 2020-08-19 12:47:27 -04:00
parent 342ccbf4b3
commit cc95db5afd

View file

@ -396,7 +396,8 @@ class SiteConfig extends ISiteConfig {
public function responsiveReferences(): array {
// @todo This is from the Cite extension, which shouldn't be known about by core
return [
'enabled' => $this->config->get( 'CiteResponsiveReferences' ),
'enabled' => $this->config->has( 'CiteResponsiveReferences' ) ?
$this->config->get( 'CiteResponsiveReferences' ) : false,
'threshold' => 10,
];
}