Improve backwards compatibility for $wgMathDisableTexFilter

* Only rewrite true to the new format

Change-Id: I94e92599b08766521ab529934915eecd550a453b
This commit is contained in:
physikerwelt 2016-03-01 15:47:14 +01:00
parent 0be6cdb08d
commit 585114270d

View file

@ -408,8 +408,8 @@ class MathHooks {
public static function registerExtension() { public static function registerExtension() {
global $wgDefaultUserOptions, $wgMathValidModes, $wgMathDisableTexFilter; global $wgDefaultUserOptions, $wgMathValidModes, $wgMathDisableTexFilter;
$wgMathValidModes = MathRenderer::getValidModes(); $wgMathValidModes = MathRenderer::getValidModes();
if ( $wgMathDisableTexFilter == true ) { // ensure backwards compatibility if ( $wgMathDisableTexFilter === true ) { // ensure backwards compatibility
$wgMathDisableTexFilter = 1; $wgMathDisableTexFilter = 'never';
} }
$wgMathDisableTexFilter = MathRenderer::getDisableTexFilter(); $wgMathDisableTexFilter = MathRenderer::getDisableTexFilter();
$wgDefaultUserOptions['math'] = self::mathModeToString( $wgDefaultUserOptions['math'] ); $wgDefaultUserOptions['math'] = self::mathModeToString( $wgDefaultUserOptions['math'] );