mirror of
https://github.com/e107inc/e107.git
synced 2025-04-16 18:42:01 +02:00
Fixes for user audit log and rolling log. Removed some debug information from logs. Corrected bounce-handler line-ending encoding (could cause the following PHP error "Error in argument 1, char 3: option not found ")
This commit is contained in:
parent
97ac03e9aa
commit
e28997f420
@ -203,7 +203,7 @@ class admin_log_ui extends e_admin_ui
|
||||
$perPage = e107::getConfig()->get('sys_log_perpage');
|
||||
$this->perPage = vartrue($perPage,10);
|
||||
|
||||
$this->prefs['sys_log_perpage']['writeParms'] = array(10=>10, 20=>20, 30=>30, 40=>40, 50=>50);
|
||||
$this->prefs['sys_log_perpage']['writeParms'] = array(10=>10, 15=>15, 20=>20, 30=>30, 40=>40, 50=>50);
|
||||
|
||||
|
||||
$sql = e107::getDb();
|
||||
@ -706,33 +706,36 @@ class audit_log_ui extends e_admin_ui
|
||||
protected $pluginName = 'adminlog';
|
||||
protected $table = 'audit_log';
|
||||
protected $pid = 'dblog_id';
|
||||
protected $perPage = 10;
|
||||
protected $perPage = 10;
|
||||
protected $listOrder = 'dblog_id DESC';
|
||||
protected $batchDelete = true;
|
||||
|
||||
protected $fields = array (
|
||||
// 'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => null, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ),
|
||||
'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => null, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ),
|
||||
'dblog_id' => array ( 'title' => LAN_ID, 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_datestamp' => array ( 'title' => LAN_DATESTAMP, 'type' => 'method', 'data' => 'int', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_microtime' => array ( 'title' => 'Microtime', 'type' => 'method', 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'dblog_datestamp' => array ( 'title' => LAN_DATESTAMP, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_microtime' => array ( 'title' => 'Microtime', 'type' => 'text', 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'dblog_eventcode' => array ( 'title' => 'Eventcode', 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'dblog_user_id' => array ( 'title' => LAN_USER, 'type' => 'user', 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_user_name' => array ( 'title' => LAN_USER, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_ip' => array ( 'title' => LAN_IP, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'dblog_title' => array ( 'title' => LAN_TITLE, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_remarks' => array ( 'title' => 'Remarks', 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'dblog_ip' => array ( 'title' => LAN_IP, 'type' => 'ip', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_title' => array ( 'title' => LAN_TITLE, 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_remarks' => array ( 'title' => 'Remarks', 'type' => 'method', 'data' => 'str', 'width' => '30%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'options' => array ( 'title' => 'Options', 'type' => null, 'nolist'=>true, 'data' => null, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center last', 'forced' => '1', ),
|
||||
);
|
||||
|
||||
protected $fieldpref = array('dblog_id', 'dblog_datestamp', 'dblog_microtime', 'dblog_eventcode', 'dblog_user_id', 'dblog_user_name', 'dblog_ip', 'dblog_title');
|
||||
protected $fieldpref = array('dblog_id', 'dblog_datestamp', 'dblog_microtime', 'dblog_eventcode', 'dblog_user_id', 'dblog_user_name', 'dblog_ip', 'dblog_title','dblog_remarks');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
// optional
|
||||
public function init()
|
||||
{
|
||||
|
||||
$perPage = e107::getConfig()->get('sys_log_perpage');
|
||||
$this->perPage = vartrue($perPage,10);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
public function customPage()
|
||||
{
|
||||
$ns = e107::getRender();
|
||||
@ -761,23 +764,31 @@ class dblog_ui extends e_admin_ui
|
||||
protected $listOrder = 'dblog_id desc';
|
||||
|
||||
protected $fields = array (
|
||||
// 'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => null, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ),
|
||||
'dblog_id' => array ( 'title' => LAN_ID, 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => null, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ),
|
||||
// 'dblog_id' => array ( 'title' => LAN_ID, 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_datestamp' => array ( 'title' => LAN_DATESTAMP, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_microtime' => array ( 'title' => 'Microtime', 'type' => 'method', 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'dblog_type' => array ( 'title' => LAN_TYPE, 'type' => 'method', 'data' => 'int', 'width' => 'auto', 'batch' => true, 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_eventcode' => array ( 'title' => 'Eventcode', 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'dblog_user_id' => array ( 'title' => LAN_ID, 'type' => 'user', 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_user_name' => array ( 'title' => LAN_USER, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'filter' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_ip' => array ( 'title' => LAN_IP, 'type' => 'ip', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'dblog_ip' => array ( 'title' => LAN_IP, 'type' => 'ip', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_caller' => array ( 'title' => 'Caller', 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'dblog_title' => array ( 'title' => LAN_TITLE, 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_remarks' => array ( 'title' => 'Remarks', 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'dblog_remarks' => array ( 'title' => 'Remarks', 'type' => 'method', 'data' => 'str', 'width' => '30%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'options' => array ( 'title' => 'Options', 'type' => null, 'nolist'=>true, 'data' => null, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center last', 'forced' => '1', ),
|
||||
);
|
||||
|
||||
protected $fieldpref = array('dblog_id', 'dblog_datestamp', 'dblog_microtime', 'dblog_type', 'dblog_eventcode', 'dblog_user_id', 'dblog_user_name', 'dblog_ip', 'dblog_caller', 'dblog_title', 'dblog_remarks');
|
||||
|
||||
|
||||
// optional
|
||||
public function init()
|
||||
{
|
||||
$perPage = e107::getConfig()->get('sys_log_perpage');
|
||||
$this->perPage = vartrue($perPage,10);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -303,7 +303,7 @@ class e_admin_log
|
||||
'dblog_remarks' => $explain
|
||||
);
|
||||
|
||||
$this->rldb->db_Insert("admin_log", $adminLogInsert);
|
||||
$this->rldb->insert("admin_log", $adminLogInsert);
|
||||
}
|
||||
|
||||
//---------------------------------------
|
||||
@ -360,10 +360,14 @@ class e_admin_log
|
||||
// else $source_call is a string
|
||||
|
||||
// Save new rolling log record
|
||||
$this->rldb->db_Insert("dblog", "0, ".intval($time_sec).', '.intval($time_usec).", '{$importance}', '{$eventcode}', {$userid}, '{$userstring}', '{$userIP}', '{$source_call}', '{$event_title}', '{$explain}' ");
|
||||
$this->rldb->insert("dblog", "0, ".intval($time_sec).', '.intval($time_usec).", '{$importance}', '{$eventcode}', {$userid}, '{$userstring}', '{$userIP}', '{$source_call}', '{$event_title}', '{$explain}' ");
|
||||
|
||||
// Now delete any old stuff
|
||||
$this->rldb->db_Delete("dblog", "dblog_datestamp < '".intval(time() - (varset($pref['roll_log_days'], 7) * 86400))."' ");
|
||||
if(!empty($pref['roll_log_days']))
|
||||
{
|
||||
$days = intval($pref['roll_log_days']);
|
||||
$this->rldb->delete("dblog", "dblog_datestamp < '".intval(time() - ($days * 86400))."' ");
|
||||
}
|
||||
}
|
||||
|
||||
if ($finished)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,8 +17,9 @@
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
define ('CRON_MAIL_DEBUG', TRUE);
|
||||
define ('CRON_RETRIGGER_DEBUG', TRUE);
|
||||
define ('CRON_MAIL_DEBUG', false);
|
||||
define ('CRON_RETRIGGER_DEBUG', false);
|
||||
|
||||
class _system_cron
|
||||
{
|
||||
|
||||
|
@ -1032,7 +1032,8 @@ class e107MailManager
|
||||
}
|
||||
else
|
||||
{
|
||||
e107::getAdminLog()->addDebug("Couldn't select emails", true);
|
||||
|
||||
// e107::getAdminLog()->addDebug("Couldn't select emails", true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -425,9 +425,9 @@ class signup
|
||||
validatorClass::addFieldTypes($userMethods->userVettingInfo,$dbData);
|
||||
$newID = $sql->update('user',$dbData);
|
||||
|
||||
if($newID === FALSE)
|
||||
if($newID === false)
|
||||
{
|
||||
$log->e_log_event(10,debug_backtrace(),'USER','Verification Fail',print_r($row,TRUE),FALSE,LOG_TO_ROLLING);
|
||||
$log->e_log_event(10,debug_backtrace(),'USER','Verification Fail', print_r($row,true),false, LOG_TO_ROLLING);
|
||||
$ns->tablerender(LAN_SIGNUP_75, LAN_SIGNUP_101);
|
||||
return false;
|
||||
}
|
||||
@ -455,9 +455,10 @@ class signup
|
||||
else
|
||||
{
|
||||
// Invalid activation code
|
||||
$log->e_log_event(10,debug_backtrace(),'USER','Invalid Verification URL', print_r($qs,true),false, LOG_TO_ROLLING);
|
||||
echo e107::getMessage()->addError("Invalid URL")->render();
|
||||
// header("location: ".e_BASE."index.php");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user