Example #1
0
 public function Log($type, $data = array(), $date = null, $siteid = null, $migrated = false)
 {
     // create new occurrence
     $occ = new WSAL_DB_Occurrence();
     $occ->is_migrated = $migrated;
     $occ->created_on = $date;
     $occ->alert_id = $type;
     $occ->site_id = !is_null($siteid) ? $siteid : (function_exists('get_current_blog_id') ? get_current_blog_id() : 0);
     $occ->Save();
     // set up meta data
     $occ->SetMeta($data);
 }
Example #2
0
 public function Log($type, $data = array(), $date = null, $siteid = null, $migrated = false)
 {
     // is this a php alert, and if so, are we logging such alerts?
     if ($type < 010 && !$this->plugin->settings->IsPhpErrorLoggingEnabled()) {
         return;
     }
     // create new occurrence
     $occ = new WSAL_DB_Occurrence();
     $occ->is_migrated = $migrated;
     $occ->created_on = $date;
     $occ->alert_id = $type;
     $occ->site_id = !is_null($siteid) ? $siteid : (function_exists('get_current_blog_id') ? get_current_blog_id() : 0);
     $occ->Save();
     // set up meta data
     $occ->SetMeta($data);
 }