MTrackWeb/Cron/Notify.php
authorAlan Knowles <alan@akbkhome.com>
Sun, 27 Mar 2011 06:01:02 +0000 (14:01 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sun, 27 Mar 2011 06:01:02 +0000 (14:01 +0800)
MTrackWeb/Cron/Notify.php

index cac2c45..993169f 100644 (file)
@@ -31,8 +31,8 @@ class MTrackWeb_Cron_Notify extends MTrackWeb
         $e->action = 'MTRACK.NOTIFY';
         $e->selectAdd();
         $e->selectAdd('MAX(event_when) as event_when');
-        
-        if (!$e->find(true)) {
+        $e->find(true)
+        if (empty($e->event_when) {
             $e->event_when = date('Y-m-d H:i:s', strtotime("NOW - 2 days")); // should be a long time ago..
         }