From 3b5f60f2c8ef0e154193cd27ae876f2ed98dac4d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 31 Jan 2014 08:42:05 -0800 Subject: [PATCH] Remove old Esperanto character conversion support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Deletes LanguageEo.php class which only had remains of the server-side character conversion (sx <-> ŝ, etc). This is being obsoleted in favor of client-side IMEs provided by UniversalLanguageSelector extension. Removes deprecated $wgEditEncoding, which was only used for this. Turns Language::recodeInput() and Language::recordForEdit() into no-ops for any old or extension code that happened to still use them. Bug: T62677 Change-Id: Ib647353538d258dee941f2f7c571191060bc9c7d --- RELEASE-NOTES-1.28 | 3 + autoload.php | 1 - includes/DefaultSettings.php | 9 -- includes/EditPage.php | 9 +- includes/Setup.php | 1 - includes/WebRequest.php | 9 +- includes/specials/SpecialMovepage.php | 4 +- languages/Language.php | 36 ++------ languages/classes/LanguageEo.php | 121 -------------------------- 9 files changed, 18 insertions(+), 175 deletions(-) delete mode 100644 languages/classes/LanguageEo.php diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28 index 42b65ba948..ff8e0386b6 100644 --- a/RELEASE-NOTES-1.28 +++ b/RELEASE-NOTES-1.28 @@ -16,6 +16,9 @@ production. * $wgForeignUploadTargets now defaults to `[ 'local' ]`, where `'local'` signifies local uploads. A value of `[]` (empty array) now means that no upload targets are allowed, effectively disabling the upload dialog. +* The deprecated $wgEditEncoding variable has been removed; it was only used + for Esperanto language character conversion. You are now recommended to use + input methods provided by the UniversalLanguageSelector extension. === New features in 1.28 === * User::isBot() method for checking if an account is a bot role account. diff --git a/autoload.php b/autoload.php index d82d6993c6..61c97c6ac2 100644 --- a/autoload.php +++ b/autoload.php @@ -664,7 +664,6 @@ $wgAutoloadLocalClasses = [ 'LanguageConverter' => __DIR__ . '/languages/LanguageConverter.php', 'LanguageCu' => __DIR__ . '/languages/classes/LanguageCu.php', 'LanguageDsb' => __DIR__ . '/languages/classes/LanguageDsb.php', - 'LanguageEo' => __DIR__ . '/languages/classes/LanguageEo.php', 'LanguageEs' => __DIR__ . '/languages/classes/LanguageEs.php', 'LanguageEt' => __DIR__ . '/languages/classes/LanguageEt.php', 'LanguageFi' => __DIR__ . '/languages/classes/LanguageFi.php', diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index f3c50739f0..88110bbfa0 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2882,15 +2882,6 @@ $wgDummyLanguageCodes = [ 'zh-yue' => 'yue', ]; -/** - * Character set for use in the article edit box. Language-specific encodings - * may be defined. - * - * This historic feature is one of the first that was added by former MediaWiki - * team leader Brion Vibber, and is used to support the Esperanto x-system. - */ -$wgEditEncoding = ''; - /** * Set this to true to replace Arabic presentation forms with their standard * forms in the U+0600-U+06FF block. This only works if $wgLanguageCode is diff --git a/includes/EditPage.php b/includes/EditPage.php index 9c7ccdf1e4..fa741034f4 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3026,7 +3026,7 @@ class EditPage { * @param string $summary The text of the summary to display */ protected function showSummaryInput( $isSubjectPreview, $summary = "" ) { - global $wgOut, $wgContLang; + global $wgOut; # Add a class if 'missingsummary' is triggered to allow styling of the summary line $summaryClass = $this->missingSummary ? 'mw-summarymissed' : 'mw-summary'; if ( $isSubjectPreview ) { @@ -3038,7 +3038,6 @@ class EditPage { return; } } - $summary = $wgContLang->recodeForEdit( $summary ); $labelText = wfMessage( $isSubjectPreview ? 'subject' : 'summary' )->parse(); list( $label, $input ) = $this->getSummaryInput( $summary, @@ -4175,11 +4174,9 @@ HTML * @return string */ protected function safeUnicodeOutput( $text ) { - global $wgContLang; - $codedText = $wgContLang->recodeForEdit( $text ); return $this->checkUnicodeCompliantBrowser() - ? $codedText - : $this->makeSafe( $codedText ); + ? $text + : $this->makesafe( $text ); } /** diff --git a/includes/Setup.php b/includes/Setup.php index cb1bd716bf..da224a0b54 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -705,7 +705,6 @@ $ps_globals = Profiler::instance()->scopedProfileIn( $fname . '-globals' ); * @var Language $wgContLang */ $wgContLang = Language::factory( $wgLanguageCode ); -$wgContLang->initEncoding(); $wgContLang->initContLang(); // Now that variant lists may be available... diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 152a3d2d19..30efb3b49f 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -567,19 +567,16 @@ class WebRequest { * Fetch a text string from the given array or return $default if it's not * set. Carriage returns are stripped from the text, and with some language * modules there is an input transliteration applied. This should generally - * be used for form "