mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-24 15:44:33 +00:00
a429c8cc35
Actual changes: * Let the special page accept the subpage parameter, e.g. [[Special:MathWikibase/Q6203]]. * Fix some of the message escaping issues in SpecialMathWikibase. Messages that are just plain text and not supposed to contain any parameters, wikitext, HTML, or something like this should be properly escaped, either via Html::rawElement( $msg->escaped() ) or better Html::element( $msg->plain ). The later approach is cheaper. Other code cleanups that don't affect production: * Reduce the amount of duplicate code in SpecialMathWikibase. * Make use of the preg_match() return value. * Remove default parameters from parent::__construct() call. * Remove some auto-generated comments. * Remove some comments that don't add new information, but just repeat what the code already says. * Make use of PHPUnit's assertCount(). We can split this patch into smaller patches, if you prefer. This should especially be done if one of the changes is controversial, to not block the other changes. Please tell me. Change-Id: I8c20014435af3d2ac9c7381fe5fd00b9fe49b2c2
17 lines
630 B
PHP
17 lines
630 B
PHP
<?php
|
|
|
|
if ( function_exists( 'wfLoadExtension' ) ) {
|
|
wfLoadExtension( 'Math' );
|
|
// Keep i18n globals so mergeMessageFileList.php doesn't break
|
|
$wgMessagesDirs['Math'] = __DIR__ . '/i18n';
|
|
$wgExtensionMessagesFiles['Math'] = __DIR__ . '/Math.alias.php';
|
|
$wgExtensionMessagesFiles['MathAliasNoTranslate'] = __DIR__ . '/Math.alias.noTranslate.php';
|
|
wfWarn(
|
|
'Deprecated PHP entry point used for Math extension. Please use wfLoadExtension instead, ' .
|
|
'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
|
|
);
|
|
return;
|
|
} else {
|
|
die( 'This version of the Math extension requires MediaWiki 1.32+' );
|
|
}
|