mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Issue #5487 Additional logging.
This commit is contained in:
@@ -348,7 +348,10 @@ class e_admin_log
|
||||
'dblog_remarks' => $explain
|
||||
);
|
||||
|
||||
$this->rldb->insert('admin_log', $adminLogInsert);
|
||||
if(!$this->rldb->insert('admin_log', $adminLogInsert))
|
||||
{
|
||||
trigger_error('Error inserting admin log entry: '.print_r($adminLogInsert,true), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------
|
||||
@@ -431,12 +434,18 @@ class e_admin_log
|
||||
);
|
||||
|
||||
|
||||
$this->rldb->insert('dblog', '0, ' . intval($time_sec) . ', ' . intval($time_usec) . ", '{$importance}', '{$eventcode}', {$userid}, '{$userstring}', '{$userIP}', '{$source_call}', '{$event_title}', '{$explain}' ");
|
||||
if(!$this->rldb->insert('dblog', '0, ' . intval($time_sec) . ', ' . intval($time_usec) . ", '{$importance}', '{$eventcode}', {$userid}, '{$userstring}', '{$userIP}', '{$source_call}', '{$event_title}', '{$explain}' "))
|
||||
{
|
||||
trigger_error("Error inserting admin rolling log entry: $eventcode", E_USER_WARNING);
|
||||
}
|
||||
|
||||
// Now delete any old stuff
|
||||
if(!empty($this->_roll_log_days))
|
||||
{
|
||||
$this->rldb->delete('dblog', "dblog_datestamp < '" . intval(time() - ($this->_roll_log_days * 86400)) . "' ");
|
||||
if(!$this->rldb->delete('dblog', "dblog_datestamp < '" . intval(time() - ($this->_roll_log_days * 86400)) . "' "))
|
||||
{
|
||||
// trigger_error("Error deleting old rolling log entries.", E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user