1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 17:44:37 +02:00

Code cleanup

PDO class accepts bind params with select() method.
This commit is contained in:
Cameron
2019-02-21 17:29:49 -08:00
parent b03611922f
commit 8f19149adf
2 changed files with 64 additions and 41 deletions

View File

@@ -415,7 +415,7 @@ class e_admin_log
* @param string $u_name
* both $id and $u_name are left blank except for admin edits and user login, where they specify the id and login name of the 'target' user
*
* @return none
* @return bool
*/
function user_audit($event_type, $event_data, $id = '', $u_name = '')
{
@@ -477,15 +477,6 @@ class e_admin_log
$eventcode = 'USER_'.$event_type;
$title = 'LAN_AUDIT_LOG_0'.$event_type; // This creates a string which will be displayed as a constant
/* $spacer = '';
$detail = '';
foreach ($event_data as $k=>$v)
{
$detail .= $spacer.$k.'=>'.$v;
$spacer = '<br />';
}
*/
$insertQry = array(
'dblog_id' => 0,
@@ -499,10 +490,12 @@ class e_admin_log
'dblog_remarks' => print_r($event_data,true),
);
$this->rldb->insert("audit_log", $insertQry);
if($this->rldb->insert("audit_log", $insertQry))
{
return true;
}
return true;
// $this->rldb->insert("audit_log", "0, ".intval($time_sec).', '.intval($time_usec).", '{$eventcode}', {$userid}, '{$userstring}', '{$userIP}', '{$title}', '{$detail}' ");
return false;
}