From 5165d83505158e81077d6759cde888d06bf5ab2d Mon Sep 17 00:00:00 2001 From: robin Date: Thu, 5 Jul 2012 00:00:44 +0200 Subject: [PATCH] Make dates in sortable tables depend on page content language Make javascript variables wgDefaultDateFormat, wgMonthNames and wgMonthNames, used to sort dates in tables, depend on the page content language. Change-Id: I18a53ba004f3dd877e2d06ed722491167e31b473 --- RELEASE-NOTES-1.20 | 2 ++ includes/OutputPage.php | 3 +++ includes/resourceloader/ResourceLoaderStartUpModule.php | 3 --- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index e56cf60953..fdd4c1e29f 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -93,6 +93,8 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki. * (bug 34678) Added InternalParseBeforeSanitize hook which gets called during Parser's internalParse method just before the parser removes unwanted/dangerous HTML tags. * (bug 36783) Implement jQuery Promise interface in mediawiki.api module. +* Make dates in sortable tables sort according to the page content language + instead of the site content language === Bug fixes in 1.20 === * (bug 30245) Use the correct way to construct a log page title. diff --git a/includes/OutputPage.php b/includes/OutputPage.php index ac90e6741b..1b4bc4942b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2963,6 +2963,9 @@ $templates 'wgPageContentLanguage' => $lang->getCode(), 'wgSeparatorTransformTable' => $compactSeparatorTransTable, 'wgDigitTransformTable' => $compactDigitTransTable, + 'wgDefaultDateFormat' => $lang->getDefaultDateFormat(), + 'wgMonthNames' => $lang->getMonthNamesArray(), + 'wgMonthNamesShort' => $lang->getMonthAbbreviationsArray(), 'wgRelevantPageName' => $relevantTitle->getPrefixedDBKey(), ); if ( $wgContLang->hasVariants() ) { diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 467a1ac0f6..c86ed1d756 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -79,9 +79,6 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { 'wgVersion' => $wgVersion, 'wgEnableAPI' => $wgEnableAPI, 'wgEnableWriteAPI' => $wgEnableWriteAPI, - 'wgDefaultDateFormat' => $wgContLang->getDefaultDateFormat(), - 'wgMonthNames' => $wgContLang->getMonthNamesArray(), - 'wgMonthNamesShort' => $wgContLang->getMonthAbbreviationsArray(), 'wgMainPageTitle' => $mainPage->getPrefixedText(), 'wgFormattedNamespaces' => $wgContLang->getFormattedNamespaces(), 'wgNamespaceIds' => $namespaceIds, -- 2.20.1