From 3f4877b1a0e28922ba324eff4ce729e3a746a636 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sat, 7 Aug 2010 21:21:28 +0000 Subject: [PATCH] Revert r70533 and the piece of r70501 that it tried to fix. Note and open bug for the issue. This has been present since introduction of {{#formatdate: }} in r48249 (bug 4582) --- includes/User.php | 2 +- includes/parser/ParserOptions.php | 4 ---- maintenance/parserTests.txt | 6 ------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/includes/User.php b/includes/User.php index 1edbb9fd5f..3df7d202a9 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2705,7 +2705,7 @@ class User { $confstr = $this->getOption( 'math' ); $confstr .= '!' . $this->getStubThreshold(); - if ( $wgUseDynamicDates ) { + if ( $wgUseDynamicDates ) { # This is wrong (bug 24714) $confstr .= '!' . $this->getDatePreference(); } $confstr .= '!' . ( $this->getOption( 'numberheadings' ) ? '1' : '' ); diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index 0ec99c5f38..c8c13e6b1b 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -71,10 +71,6 @@ class ParserOptions { } function getDateFormat() { - if ( !$this->getUseDynamicDates() ) { - throw new MWException( 'Getting DateFormat option without UseDynamicDates.' ); - } - if ( !isset( $this->mDateFormat ) ) { $this->mDateFormat = $this->mUser->getDatePreference(); } diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index ca576caabb..12a2cd1980 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -7792,8 +7792,6 @@ wgUseDynamicDates=1 !!test formatdate parser function -!! config -wgUseDynamicDates=1 !!input {{#formatdate:2009-03-24}} !! result @@ -7803,8 +7801,6 @@ wgUseDynamicDates=1 !!test formatdate parser function, with default format -!! config -wgUseDynamicDates=1 !!input {{#formatdate:2009-03-24|mdy}} !! result @@ -7825,8 +7821,6 @@ wgUseDynamicDates=false !! test Spacing of numbers in formatted dates -!! config -wgUseDynamicDates=1 !! input {{#formatdate:January 15}} !! result -- 2.20.1