Follow up r77407. Do it Right.
authorPlatonides <platonides@users.mediawiki.org>
Sun, 28 Nov 2010 22:51:25 +0000 (22:51 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sun, 28 Nov 2010 22:51:25 +0000 (22:51 +0000)
Fixes wfTimestamp() returning 0 instead of now.

includes/GlobalFunctions.php

index 771c009..0e977ba 100644 (file)
@@ -1990,7 +1990,7 @@ function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) {
        
        if ( $ts === 0 ) {
                $uts = time();
-               $strtime = "@$ts";
+               $strtime = "@$uts";
        } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {
                # TS_DB
        } elseif ( preg_match( '/^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {