r70651 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70650‎ | r70651 | r70652 >
Date:21:21, 7 August 2010
Author:platonides
Status:ok
Tags:
Comment:
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)
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/includes/parser/ParserOptions.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -7792,8 +7792,6 @@
77937793
77947794 !!test
77957795 formatdate parser function
7796 -!! config
7797 -wgUseDynamicDates=1
77987796 !!input
77997797 {{#formatdate:2009-03-24}}
78007798 !! result
@@ -7803,8 +7801,6 @@
78047802
78057803 !!test
78067804 formatdate parser function, with default format
7807 -!! config
7808 -wgUseDynamicDates=1
78097805 !!input
78107806 {{#formatdate:2009-03-24|mdy}}
78117807 !! result
@@ -7825,8 +7821,6 @@
78267822
78277823 !! test
78287824 Spacing of numbers in formatted dates
7829 -!! config
7830 -wgUseDynamicDates=1
78317825 !! input
78327826 {{#formatdate:January 15}}
78337827 !! result
Index: trunk/phase3/includes/User.php
@@ -2705,7 +2705,7 @@
27062706
27072707 $confstr = $this->getOption( 'math' );
27082708 $confstr .= '!' . $this->getStubThreshold();
2709 - if ( $wgUseDynamicDates ) {
 2709+ if ( $wgUseDynamicDates ) { # This is wrong (bug 24714)
27102710 $confstr .= '!' . $this->getDatePreference();
27112711 }
27122712 $confstr .= '!' . ( $this->getOption( 'numberheadings' ) ? '1' : '' );
Index: trunk/phase3/includes/parser/ParserOptions.php
@@ -71,10 +71,6 @@
7272 }
7373
7474 function getDateFormat() {
75 - if ( !$this->getUseDynamicDates() ) {
76 - throw new MWException( 'Getting DateFormat option without UseDynamicDates.' );
77 - }
78 -
7975 if ( !isset( $this->mDateFormat ) ) {
8076 $this->mDateFormat = $this->mUser->getDatePreference();
8177 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r70783Use only the page relevant pieces in the parser cache key. Eg. two users with...platonides21:53, 9 August 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r48249* (bug 4582) Provide preference-based autoformatting of unlinked dates with t...werdna01:07, 10 March 2009
r70501Move the math option inside ParserOptions instead of having Math.php directly...platonides15:24, 5 August 2010
r70533Fix failing parserTests by defineing wgUseDynamicDates=1 as required by r70501...mah00:37, 6 August 2010

Status & tagging log