https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111866
Revision: 111866 Author: siebrand Date: 2012-02-19 15:16:32 +0000 (Sun, 19 Feb 2012) Log Message: ----------- Remove 1.17 compatibility code. Modified Paths: -------------- trunk/extensions/Translate/README trunk/extensions/Translate/Translate.php trunk/extensions/Translate/TranslateHooks.php trunk/extensions/Translate/specials/SpecialImportTranslations.php trunk/extensions/Translate/tag/PageTranslationHooks.php trunk/extensions/Translate/utils/TranslationHelpers.php Modified: trunk/extensions/Translate/README =================================================================== --- trunk/extensions/Translate/README 2012-02-19 14:47:45 UTC (rev 111865) +++ trunk/extensions/Translate/README 2012-02-19 15:16:32 UTC (rev 111866) @@ -30,6 +30,8 @@ https://translatewiki.net/docs/Translate/html/ == Change log == +* 2012-02-19 +- MediaWiki 1.18 or later is now required. * 2012-02-13 - Updated some deprecated function calls - New translation memory called TTMServer comes with the extension and is enabled Modified: trunk/extensions/Translate/Translate.php =================================================================== --- trunk/extensions/Translate/Translate.php 2012-02-19 14:47:45 UTC (rev 111865) +++ trunk/extensions/Translate/Translate.php 2012-02-19 15:16:32 UTC (rev 111866) @@ -269,13 +269,6 @@ 'scripts' => 'resources/jquery.autoresize.js', ) + $resourcePaths; -// Doesn't exist in 1.17, but declaring twice causes an error -if ( version_compare( $wgVersion, '1.18', '<' ) ) { -$wgResourceModules['jquery.form'] = array( - 'scripts' => 'resources/jquery.form.js', -) + $resourcePaths; -} - /** @endcond */ Modified: trunk/extensions/Translate/TranslateHooks.php =================================================================== --- trunk/extensions/Translate/TranslateHooks.php 2012-02-19 14:47:45 UTC (rev 111865) +++ trunk/extensions/Translate/TranslateHooks.php 2012-02-19 15:16:32 UTC (rev 111866) @@ -84,10 +84,6 @@ define( 'NS_TRANSLATIONS_TALK', $wgPageTranslationNamespace + 1 ); } - if ( version_compare( $wgVersion, '1.17alpha', '<' ) ) { - efTranslateNamespaces( $wgExtraNamespaces ); - } - $wgNamespacesWithSubpages[NS_TRANSLATIONS] = true; $wgNamespacesWithSubpages[NS_TRANSLATIONS_TALK] = true; Modified: trunk/extensions/Translate/specials/SpecialImportTranslations.php =================================================================== --- trunk/extensions/Translate/specials/SpecialImportTranslations.php 2012-02-19 14:47:45 UTC (rev 111865) +++ trunk/extensions/Translate/specials/SpecialImportTranslations.php 2012-02-19 15:16:32 UTC (rev 111866) @@ -158,9 +158,6 @@ $this->request->getText( 'upload-type' ) === 'wiki' ) . "\n" . Xml::closeElement( 'td' ) . Xml::openElement( 'td' ) . "\n" . Xml::input( 'upload-wiki', 50, - /** - * @todo Needs i18n in content language. - */ $this->request->getText( 'upload-wiki', 'File:' ), array( 'id' => 'mw-translate-up-wiki-input' ) + $class ) . "\n" . Xml::closeElement( 'td' ) . Xml::closeElement( 'tr' ) . Modified: trunk/extensions/Translate/tag/PageTranslationHooks.php =================================================================== --- trunk/extensions/Translate/tag/PageTranslationHooks.php 2012-02-19 14:47:45 UTC (rev 111865) +++ trunk/extensions/Translate/tag/PageTranslationHooks.php 2012-02-19 15:16:32 UTC (rev 111866) @@ -203,12 +203,7 @@ $options = $parser->getOptions(); - if ( method_exists( $options, 'getUserLang' ) ) { - $userLangCode = $options->getUserLang(); - } else { // Backward compat for MediaWiki 1.17 - global $wgLang; - $userLangCode = $wgLang->getCode(); - } + $userLangCode = $options->getUserLang(); // BC for <1.19 $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; Modified: trunk/extensions/Translate/utils/TranslationHelpers.php =================================================================== --- trunk/extensions/Translate/utils/TranslationHelpers.php 2012-02-19 14:47:45 UTC (rev 111865) +++ trunk/extensions/Translate/utils/TranslationHelpers.php 2012-02-19 15:16:32 UTC (rev 111866) @@ -1376,13 +1376,6 @@ public static function addModules( OutputPage $out ) { $out->addModules( 'ext.translate.quickedit' ); - - // Might be needed, but ajax doesn't load it - // Globals :( - /// @todo: remove when 1.17 is no longer supported. - // The RL module name is different in 1.17 and >1.17 - $diff = new DifferenceEngine; - $diff->showDiffStyle(); } /// @since 2012-01-04 _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs