Report/SendEventErrors.php
authorAlan Knowles <alan@roojs.com>
Thu, 24 Mar 2016 04:06:30 +0000 (12:06 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 24 Mar 2016 04:06:30 +0000 (12:06 +0800)
Report/SendEventErrors.php

index cb331ed..fcf16bd 100644 (file)
@@ -145,11 +145,6 @@ class Pman_Admin_Report_SendEventErrors extends Pman_Roo
         if(empty($summary)){
             $this->jerror('ERROR-REPORT-' . $this->opts['uid'], 'Nothing to be sent');
         }
-        $this->addEvent('ERROR-REPORT-' . $this->opts['uid'], 'false', ;
-        $e = DB_DataObject::factory('Events');
-        $e->init('ERROR-REPORT',false,"Sending");
-        $e->event_when = date('Y-m-d H:i:s');
-        $eid = $e->insert();
         
         $subject = array();
         
@@ -163,6 +158,8 @@ class Pman_Admin_Report_SendEventErrors extends Pman_Roo
             $subject = "{$this->opts['subject']} $subject";
         }
         
+        $this->addEvent('ERROR-REPORT-' . $this->opts['uid'], false, $subject);
+        
         $events = DB_DataObject::factory('Events');
         $events->autoJoin();