Mark Math-specific functions in core as deprecated

The math specific functions in core are not needed
anymore and should be removed in future versions.
Math can access these settings in the same way as
all other extensions do.

Since Math 2.0 the rendered element has the property
"markerType" => 'nowiki'

Change-Id: I20d3714bed9da864146f133a08cf4ca90eda42ab
This commit is contained in:
physikerwelt (Moritz Schubotz) 2013-11-03 22:52:17 +01:00 committed by Bartosz Dziewoński
parent 547c7eacde
commit 545b712ed4
4 changed files with 6 additions and 0 deletions

View file

@ -533,6 +533,7 @@ changes to languages because of Bugzilla reports.
The file never contained any re-usable components. To use it in a skin, load
'mediawiki.legacy.wikibits' (which IEFixes depends on) and that will import
IEFixes automatically if user agent conditions are met.
* Code specific to the Math extension was marked as deprecated.
== Compatibility ==

View file

@ -240,6 +240,7 @@ class ParserOptions {
function getExternalLinkTarget() { return $this->mExternalLinkTarget; }
function getDisableContentConversion() { return $this->mDisableContentConversion; }
function getDisableTitleConversion() { return $this->mDisableTitleConversion; }
/** @deprecated since 1.22 use User::getOption('math') instead */
function getMath() { $this->optionUsed( 'math' );
return $this->mMath; }
function getThumbSize() { $this->optionUsed( 'thumbsize' );
@ -338,6 +339,7 @@ class ParserOptions {
function setExternalLinkTarget( $x ) { return wfSetVar( $this->mExternalLinkTarget, $x ); }
function disableContentConversion( $x = true ) { return wfSetVar( $this->mDisableContentConversion, $x ); }
function disableTitleConversion( $x = true ) { return wfSetVar( $this->mDisableTitleConversion, $x ); }
/** @deprecated since 1.22 */
function setMath( $x ) { return wfSetVar( $this->mMath, $x ); }
function setUserLang( $x ) {
if ( is_string( $x ) ) {

View file

@ -63,6 +63,7 @@ class FakeConverter {
function markNoConversion( $text, $noParse = false ) { return $text; }
function convertCategoryKey( $key ) { return $key; }
function convertLinkToAllVariants( $text ) { return $this->autoConvertToAllVariants( $text ); }
/** @deprecated since 1.22 is no longer used */
function armourMath( $text ) { return $text; }
function validateVariant( $variant = null ) { return $variant === $this->mLang->getCode() ? $variant : null; }
function translate( $text, $variant ) { return $text; }
@ -3811,6 +3812,7 @@ class Language {
*
* @param $text string
* @return string
* @deprecated since 1.22 is no longer used
*/
public function armourMath( $text ) {
return $this->mConverter->armourMath( $text );

View file

@ -1103,6 +1103,7 @@ class LanguageConverter {
* @param $text String: text to armour against conversion
* @return String: armoured text where { and } have been converted to
* { and }
* @deprecated since 1.22 is no longer used
*/
public function armourMath( $text ) {
// convert '-{' and '}-' to '-{' and '}-' to prevent