From b068b72aea14e184bb0a9d832adfee6e416abbbd Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 23 Apr 2005 11:19:07 +0000 Subject: [PATCH] Rearranged flow to remove unnecessary debug output --- includes/GlobalFunctions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index cb51682315..3c3b199a09 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1001,7 +1001,9 @@ define('TS_RFC2822', 3 ); * @todo document */ function wfTimestamp($outputtype=TS_UNIX,$ts=0) { - if (preg_match("/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/",$ts,$da)) { + if ($ts==0) { + $uts=time(); + } elseif (preg_match("/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/",$ts,$da)) { # TS_DB $uts=gmmktime((int)$da[4],(int)$da[5],(int)$da[6], (int)$da[2],(int)$da[3],(int)$da[1]); @@ -1018,7 +1020,6 @@ function wfTimestamp($outputtype=TS_UNIX,$ts=0) { $uts = 0; } - if ($ts==0) { $uts=time(); } switch($outputtype) { case TS_UNIX: -- 2.20.1