From: Tim Starling Date: Sat, 23 Apr 2005 11:19:07 +0000 (+0000) Subject: Rearranged flow to remove unnecessary debug output X-Git-Tag: 1.5.0alpha1~175 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=b068b72aea14e184bb0a9d832adfee6e416abbbd;p=lhc%2Fweb%2Fwiklou.git Rearranged flow to remove unnecessary debug output --- 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: