From 545b712ed4f1a3ac92699dec27414b2850430a64 Mon Sep 17 00:00:00 2001 From: "physikerwelt (Moritz Schubotz)" Date: Sun, 3 Nov 2013 22:52:17 +0100 Subject: [PATCH] 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 --- RELEASE-NOTES-1.22 | 1 + includes/parser/ParserOptions.php | 2 ++ languages/Language.php | 2 ++ languages/LanguageConverter.php | 1 + 4 files changed, 6 insertions(+) diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 25d5c429cc..bc4de402ce 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -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 == diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index bde508a29b..e12f32d841 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -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 ) ) { diff --git a/languages/Language.php b/languages/Language.php index dc87bc894e..f54ce83657 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -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 ); diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index ccf9b1e06a..96a71a099e 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -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 -- 2.20.1