Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -1951,7 +1951,7 @@ |
1952 | 1952 | function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) { |
1953 | 1953 | $uts = 0; |
1954 | 1954 | $da = array(); |
1955 | | - if ( $ts == 0 ) { |
| 1955 | + if ( $ts === 0 ) { |
1956 | 1956 | $uts = time(); |
1957 | 1957 | } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) { |
1958 | 1958 | # TS_DB |
— | — | @@ -1972,6 +1972,9 @@ |
1973 | 1973 | # TS_POSTGRES |
1974 | 1974 | } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d* GMT$/', $ts, $da ) ) { |
1975 | 1975 | # TS_POSTGRES |
| 1976 | + } elseif ( preg_match( '/^[A-Z][a-z]{2}, \d\d [A-Z][a-z]{2} \d{4} \d\d:\d\d:\d\d/', $ts ) ) { |
| 1977 | + # TS_RFC2822 |
| 1978 | + $uts = strtotime( $ts ); |
1976 | 1979 | } else { |
1977 | 1980 | # Bogus value; fall back to the epoch... |
1978 | 1981 | wfDebug("wfTimestamp() fed bogus time value: $outputtype; $ts\n"); |
Property changes on: trunk/phase3/includes/GlobalFunctions.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
1979 | 1982 | Merged /branches/new-installer/phase3/includes/GlobalFunctions.php:r43664-66004 |
1980 | 1983 | Merged /branches/wmf-deployment/includes/GlobalFunctions.php:r53381 |
1981 | 1984 | Merged /branches/REL1_15/phase3/includes/GlobalFunctions.php:r51646 |
1982 | 1985 | Merged /branches/resourceloader/phase3/includes/GlobalFunctions.php:r71750 |
1983 | 1986 | Merged /branches/sqlite/includes/GlobalFunctions.php:r58211-58321 |