From bcd40463a738f866b4ae1332c93b3d98f8058b5a Mon Sep 17 00:00:00 2001 From: e107steved Date: Wed, 16 Jan 2008 22:18:27 +0000 Subject: [PATCH] Simplify admin logging messages --- e107_admin/banlist.php | 27 +++---- e107_admin/banlist_export.php | 11 +-- e107_admin/userclass.php | 6 +- e107_admin/userclass2.php | 21 +++--- e107_admin/users.php | 28 +++---- e107_handlers/admin_log_class.php | 20 ++++- e107_handlers/e107_class.php | 14 ++-- .../English/admin/lan_log_messages.php | 74 +++++++++---------- usersettings.php | 6 +- 9 files changed, 111 insertions(+), 96 deletions(-) diff --git a/e107_admin/banlist.php b/e107_admin/banlist.php index 94fa02a5a..4f8436daa 100644 --- a/e107_admin/banlist.php +++ b/e107_admin/banlist.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/banlist.php,v $ -| $Revision: 1.8 $ -| $Date: 2008-01-13 10:51:34 $ +| $Revision: 1.9 $ +| $Date: 2008-01-16 22:18:19 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -67,7 +67,7 @@ if (isset($_POST['update_ban_prefs'])) $pref['ban_durations'][$i] = intval(varset($_POST['ban_time'][$i],0)); } save_prefs(); - banlist_adminlog("AL_BAN_LAN_08","",8); + banlist_adminlog('08',""); $ns->tablerender(BANLAN_9, "
".BANLAN_33.'
'); } @@ -112,11 +112,11 @@ if (isset($_POST['ban_ip'])) admin_update($sql -> db_Insert("banlist",$new_vals), 'insert'); if ($_POST['entry_intent'] == 'add') { - banlist_adminlog("AL_BAN_LAN_01",$new_vals['banlist_ip'],1); + banlist_adminlog('01',$new_vals['banlist_ip']); } else { - banlist_adminlog("AL_BAN_LAN_04",$new_vals['banlist_ip'],4); + banlist_adminlog('04',$new_vals['banlist_ip']); } } else @@ -131,11 +131,11 @@ if (isset($_POST['ban_ip'])) admin_update($sql -> db_Update("banlist", $qry." WHERE banlist_ip='".$_POST['old_ip']."'")); if ($_POST['entry_intent'] == 'edit') { - banlist_adminlog("AL_BAN_LAN_09",$new_vals['banlist_ip'],9); + banlist_adminlog("09",$new_vals['banlist_ip']); } else { - banlist_adminlog("AL_BAN_LAN_10",$new_vals['banlist_ip'],10); + banlist_adminlog("10",$new_vals['banlist_ip']); } } unset($ban_ip); @@ -151,12 +151,12 @@ if (($action == "remove" || $action == "whremove") && isset($_POST['ban_secure'] if ($action == "remove") { $action = 'list'; - banlist_adminlog("AL_BAN_LAN_02",$sub_action,2); + banlist_adminlog("02",$sub_action); } else { $action = 'white'; - banlist_adminlog("AL_BAN_LAN_05",$sub_action,5); + banlist_adminlog("05",$sub_action); } } @@ -166,7 +166,7 @@ if ($action == 'newtime') { $end_time = $id ? time() + ($id*60*60) : 0; admin_update($sql -> db_Update("banlist", "banlist_banexpires='".intval($end_time)."' WHERE banlist_ip='".$sub_action."'")); - banlist_adminlog("AL_BAN_LAN_03",$sub_action,3); + banlist_adminlog("03",$sub_action); $action = 'list'; } @@ -493,7 +493,7 @@ switch ($action) intval(varset($_POST['ban_over_expiry'],0)), $separator_char[intval(varset($_POST['ban_separator'],1))], $quote_char[intval(varset($_POST['ban_quote'],3))]); - banlist_adminlog("AL_BAN_LAN_07",'File: '.e_FILE."public/".$files[0]['name'].'
'.$message,7); + banlist_adminlog("07",'File: '.e_FILE."public/".$files[0]['name'].'
'.$message); } } @@ -745,11 +745,12 @@ function process_csv($filename, $override_imports, $override_expiry, $separator // Log event to admin log -function banlist_adminlog($title, $woffle,$msg_num='00') +function banlist_adminlog($msg_num='00', $woffle='') { global $pref, $admin_log; // if (!varset($pref['admin_log_log']['admin_banlist'],0)) return; - $admin_log->log_event($title,$woffle,E_LOG_INFORMATIVE,'BANLIST_'.$msg_num); +// $admin_log->log_event($title,$woffle,E_LOG_INFORMATIVE,'BANLIST_'.$msg_num); + $admin_log->log_event('BANLIST_'.$msg_num,$woffle,E_LOG_INFORMATIVE,''); } ?> diff --git a/e107_admin/banlist_export.php b/e107_admin/banlist_export.php index b3db2b63d..74484ff59 100644 --- a/e107_admin/banlist_export.php +++ b/e107_admin/banlist_export.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/banlist_export.php,v $ -| $Revision: 1.2 $ -| $Date: 2007-12-23 21:15:48 $ +| $Revision: 1.3 $ +| $Date: 2008-01-16 22:18:19 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -73,7 +73,7 @@ if ($error_string = do_export($filename, $type_list, $format_array, $use_separat // Need to report an error here echo "Error report: {$error_string}
"; } -banlist_adminlog("AL_BAN_LAN_06","File: ".$filename.'
'.$error_string,6); +banlist_adminlog('06',"File: ".$filename.'
'.$error_string); function do_export($filename, $type_list='',$format_array, $sep = ',', $quot = '"') @@ -136,11 +136,12 @@ function do_export($filename, $type_list='',$format_array, $sep = ',', $quot = ' } // Log event to admin log -function banlist_adminlog($title, $woffle,$msg_num='00') +function banlist_adminlog($msg_num='00', $woffle='') { global $pref, $admin_log; // if (!varset($pref['admin_log_log']['admin_banlist'],0)) return; - $admin_log->log_event($title,$woffle,E_LOG_INFORMATIVE,'BANLIST_'.$msg_num); +// $admin_log->log_event($title,$woffle,E_LOG_INFORMATIVE,'BANLIST_'.$msg_num); + $admin_log->log_event('BANLIST_'.$msg_num,$woffle,E_LOG_INFORMATIVE,''); } diff --git a/e107_admin/userclass.php b/e107_admin/userclass.php index e5f81faa7..dedb04b2b 100644 --- a/e107_admin/userclass.php +++ b/e107_admin/userclass.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/userclass.php,v $ -| $Revision: 1.2 $ -| $Date: 2008-01-01 18:18:05 $ +| $Revision: 1.3 $ +| $Date: 2008-01-16 22:18:19 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -72,7 +72,7 @@ if (isset($_POST['updateclass'])) // $admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"DBG","User class change",str_replace("\n","
",$message),FALSE,LOG_TO_ROLLING); sendemail($send_to, $subject, $message); } - $admin_log->log_event('LAN_ADMIN_LOG_016',str_replace(array('--UID--','--CLASSES--'),array($id,$svar),UCSLAN_11),E_LOG_INFORMATIVE,'USET_14'); + $admin_log->log_event('USET_14',str_replace(array('--UID--','--CLASSES--'),array($id,$svar),UCSLAN_11),E_LOG_INFORMATIVE); header("location: ".$_POST['adminreturn']); diff --git a/e107_admin/userclass2.php b/e107_admin/userclass2.php index 5957e7cdb..51e2362c0 100644 --- a/e107_admin/userclass2.php +++ b/e107_admin/userclass2.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/userclass2.php,v $ -| $Revision: 1.7 $ -| $Date: 2008-01-13 17:47:27 $ +| $Revision: 1.8 $ +| $Date: 2008-01-16 22:18:19 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -77,7 +77,7 @@ if (isset($_POST['set_initial_classes'])) { $pref['initial_user_classes'] = $newval; save_prefs(); - userclass2_adminlog("AL_UC_LAN_05","New: {$newval}, Old: {$temp}, Stage: ".$pref['init_class_stage'],5); + userclass2_adminlog("05","New: {$newval}, Old: {$temp}, Stage: ".$pref['init_class_stage']); $message = UCSLAN_41; } else @@ -103,7 +103,7 @@ if (isset($_POST['delete'])) if ($e_userclass->delete_class($class_id) !== FALSE) { // $sql->db_Delete('userclass_classes', "userclass_id='".$class_id."' "); - userclass2_adminlog("AL_UC_LAN_02","ID:{$class_id} (".$e_userclass->uc_get_classname($class_id).")",2); + userclass2_adminlog("02","ID:{$class_id} (".$e_userclass->uc_get_classname($class_id).")"); if ($sql->db_Select('user', 'user_id, user_class', "user_class = '{$class_id}' OR user_class REGEXP('^{$class_id},') OR user_class REGEXP(',{$class_id},') OR user_class REGEXP(',{$class_id}$')")) { // Delete existing users from class while ($row = $sql->db_Fetch()) @@ -153,7 +153,7 @@ if (isset($_POST['updateclass']) || isset($_POST['createclass'])) check_allowed($_POST['userclass_id']); $class_record['userclass_id'] = intval($_POST['userclass_id']); $e_userclass->save_edited_class($class_record); - userclass2_adminlog("AL_UC_LAN_03","ID:{$class_record['userclass_id']} (".$class_record['userclass_name'].")",3); + userclass2_adminlog("03","ID:{$class_record['userclass_id']} (".$class_record['userclass_name'].")"); $do_tree = TRUE; $message = UCSLAN_5; } @@ -172,7 +172,7 @@ if (isset($_POST['updateclass']) || isset($_POST['createclass'])) { $class_record['userclass_id'] = $i; $e_userclass->add_new_class($class_record); - userclass2_adminlog("AL_UC_LAN_01","ID:{$class_record['userclass_id']} (".$class_record['userclass_name'].")",1); + userclass2_adminlog("01","ID:{$class_record['userclass_id']} (".$class_record['userclass_name'].")"); $do_tree = TRUE; } $message = UCSLAN_6; @@ -648,7 +648,7 @@ $ns->tablerender(UCSLAN_21, $text); } $uclass->class_remove($class_id, $uidList); $message = UCSLAN_1; - userclass2_adminlog("AL_UC_LAN_06","ID:{$class_id} (".$e_userclass->uc_get_classname($class_id).")",6); + userclass2_adminlog("06","ID:{$class_id} (".$e_userclass->uc_get_classname($class_id).")"); } } elseif($params) @@ -675,7 +675,7 @@ $ns->tablerender(UCSLAN_21, $text); } $uclass->class_add($class_id, $uidList); } - userclass2_adminlog("AL_UC_LAN_04","ID:{$class_id} (".$e_userclass->uc_get_classname($class_id).")",4); + userclass2_adminlog("04","ID:{$class_id} (".$e_userclass->uc_get_classname($class_id).")"); } @@ -847,11 +847,12 @@ if(isset($_POST['class_members_edit'])) // Log event to admin log -function userclass2_adminlog($title, $woffle,$msg_num='00') +function userclass2_adminlog($msg_num='00', $woffle='') { global $pref, $admin_log; if (!varset($pref['admin_log_log']['admin_userclass'],0)) return; - $admin_log->log_event($title,$woffle,E_LOG_INFORMATIVE,'UCLASS_'.$msg_num); +// $admin_log->log_event($title,$woffle,E_LOG_INFORMATIVE,'UCLASS_'.$msg_num); + $admin_log->log_event('UCLASS_'.$msg_num,$woffle,E_LOG_INFORMATIVE,''); } diff --git a/e107_admin/users.php b/e107_admin/users.php index 0c04f162c..7dd127dfa 100644 --- a/e107_admin/users.php +++ b/e107_admin/users.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $ -| $Revision: 1.12 $ -| $Date: 2008-01-02 20:14:05 $ +| $Revision: 1.13 $ +| $Date: 2008-01-16 22:18:19 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -150,7 +150,7 @@ if (isset($_POST['update_options'])) $pref['memberlist_access'] = $_POST['memberlist_access']; save_prefs(); unset($_POST['update_options']); // So we don't log it - $admin_log->log_event('LAN_ADMIN_LOG_005',$tp->toDB(implode('; ',$_POST)),E_LOG_INFORMATIVE,'USET_03'); + $admin_log->log_event('USET_03',$tp->toDB(implode('; ',$_POST)),E_LOG_INFORMATIVE); $user->show_message(USRLAN_1); } @@ -171,7 +171,7 @@ if (isset($_POST['prune'])) $sql->db_Delete("user", "user_id='{$u['user_id']}' "); $sql->db_Delete("user_extended", "user_extended_id='{$u['user_id']}' "); } - $admin_log->log_event('LAN_ADMIN_LOG_006',str_replace(array('--COUNT--','--TYPE--'),array(count($uList),$bantype),USRLAN_160),E_LOG_INFORMATIVE,'USET_04'); + $admin_log->log_event('USET_04',str_replace(array('--COUNT--','--TYPE--'),array(count($uList),$bantype),USRLAN_160),E_LOG_INFORMATIVE); } $ns->tablerender(USRLAN_57, "
".$text."
"); unset($text); @@ -277,7 +277,7 @@ if (isset($_POST['adduser'])) if (admin_update($sql -> db_Insert("user", $user_data), 'insert', USRLAN_70)) { // Add to admin log - $admin_log->log_event('LAN_ADMIN_LOG_004',"UName: {$user_data['user_name']}; Email: {$user_data['user_email']}",E_LOG_INFORMATIVE,'USET_02'); + $admin_log->log_event('USET_02',"UName: {$user_data['user_name']}; Email: {$user_data['user_email']}",E_LOG_INFORMATIVE); // Add to user audit trail $admin_log->user_audit(USER_AUDIT_ADD_ADMIN,$user_data, 0,$user_data['user_loginname']); if (isset($_POST['sendconfemail'])) @@ -329,7 +329,7 @@ if (isset($_POST['useraction']) && $_POST['useraction'] == "ban") { if($sql->db_Update("user", "user_ban='1' WHERE user_id='".$_POST['userid']."' ")) { - $admin_log->log_event('LAN_ADMIN_LOG_007',str_replace(array('--UID--','--NAME--'),array($row['user_id'],$row['user_name']),USRLAN_161),E_LOG_INFORMATIVE,'USET_05'); + $admin_log->log_event('USET_05',str_replace(array('--UID--','--NAME--'),array($row['user_id'],$row['user_name']),USRLAN_161),E_LOG_INFORMATIVE); $user->show_message(USRLAN_8); } if(trim($row['user_ip']) == "") @@ -367,7 +367,7 @@ if (isset($_POST['useraction']) && $_POST['useraction'] == "unban") $row = $sql->db_Fetch(); $sql->db_Update("user", "user_ban='0' WHERE user_id='".$_POST['userid']."' "); $sql -> db_Delete("banlist", " banlist_ip='{$row['user_ip']}' "); - $admin_log->log_event('LAN_ADMIN_LOG_008',str_replace(array('--UID--','--NAME--'),array($_POST['userid'],$row['user_name']),USRLAN_162),E_LOG_INFORMATIVE,'USET_06'); + $admin_log->log_event('USET_06',str_replace(array('--UID--','--NAME--'),array($_POST['userid'],$row['user_name']),USRLAN_162),E_LOG_INFORMATIVE); $user->show_message(USRLAN_9); $action = "main"; if(!$sub_action){$sub_action = "user_id"; } @@ -426,7 +426,7 @@ if (isset($_POST['useraction']) && $_POST['useraction'] == 'deluser') if ($sql->db_Delete("user", "user_id='".$_POST['userid']."' AND user_perms != '0' AND user_perms != '0.'")) { $sql->db_Delete("user_extended", "user_extended_id='".$_POST['userid']."' "); - $admin_log->log_event('LAN_ADMIN_LOG_009',str_replace('--UID--',$_POST['userid'],USRLAN_163),E_LOG_INFORMATIVE,'USET_07'); + $admin_log->log_event('USET_07',str_replace('--UID--',$_POST['userid'],USRLAN_163),E_LOG_INFORMATIVE); $user->show_message(USRLAN_10); } if(!$sub_action){ $sub_action = "user_id"; } @@ -464,7 +464,7 @@ if (isset($_POST['useraction']) && $_POST['useraction'] == "admin" && getperms(' $sql->db_Select("user", "user_id, user_name", "user_id='".$_POST['userid']."'"); $row = $sql->db_Fetch(); $sql->db_Update("user", "user_admin='1' WHERE user_id='".$_POST['userid']."' "); - $admin_log->log_event('LAN_ADMIN_LOG_010',str_replace(array('--UID--','--NAME--'),array($row['user_id'],$row['user_name']),USRLAN_164),E_LOG_INFORMATIVE,'USET_08'); + $admin_log->log_event('USET_08',str_replace(array('--UID--','--NAME--'),array($row['user_id'],$row['user_name']),USRLAN_164),E_LOG_INFORMATIVE); $user->show_message($row['user_name']." ".USRLAN_3." ".USRLAN_4.""); $action = "main"; if(!$sub_action){ $sub_action = "user_id"; } @@ -488,7 +488,7 @@ if (isset($_POST['useraction']) && $_POST['useraction'] == "unadmin" && getperms else { $sql->db_Update("user", "user_admin='0', user_perms='' WHERE user_id='".$_POST['userid']."'"); - $admin_log->log_event('LAN_ADMIN_LOG_011',str_replace(array('--UID--','--NAME--'),array($row['user_id'],$row['user_name']),USRLAN_165),E_LOG_INFORMATIVE,'USET_09'); + $admin_log->log_event('USET_09',str_replace(array('--UID--','--NAME--'),array($row['user_id'],$row['user_name']),USRLAN_165),E_LOG_INFORMATIVE); $user->show_message($user_name." ".USRLAN_6); $action = "main"; if(!$sub_action){ $sub_action = "user_id"; } @@ -520,7 +520,7 @@ if (isset($_POST['useraction']) && $_POST['useraction'] == "verify") } } $sql->db_Update("user", "user_ban='0'{$init_classes} WHERE user_id='".$uid."' "); - $admin_log->log_event('LAN_ADMIN_LOG_012',str_replace(array('--UID--','--NAME--'),array($row['user_id'],$row['user_name']),USRLAN_166),E_LOG_INFORMATIVE,'USET_10'); + $admin_log->log_event('USET_10',str_replace(array('--UID--','--NAME--'),array($row['user_id'],$row['user_name']),USRLAN_166),E_LOG_INFORMATIVE); // $e_event->trigger("userveri", $row); // We do this from signup.php - should we do it here? $user->show_message(USRLAN_86); @@ -1220,7 +1220,7 @@ class users if(sendemail($email, LAN_404." ".SITENAME, $message)) { // echo str_replace("\n","
",$message); - $admin_log->log_event('LAN_ADMIN_LOG_013',str_replace(array('--ID--','--NAME--','--EMAIL--'),array($id,$name,$email),USRLAN_167),E_LOG_INFORMATIVE,'USET_11'); + $admin_log->log_event('USET_11',str_replace(array('--ID--','--NAME--','--EMAIL--'),array($id,$name,$email),USRLAN_167),E_LOG_INFORMATIVE); $this->show_message(USRLAN_140.": ".$name." (".$row['user_language'].") "); } else @@ -1268,7 +1268,7 @@ class users } if ($count) { - $admin_log->log_event('LAN_ADMIN_LOG_014',str_replace('--COUNT--',$count,USRLAN_168),E_LOG_INFORMATIVE,'USET_12'); + $admin_log->log_event('USET_12',str_replace('--COUNT--',$count,USRLAN_168),E_LOG_INFORMATIVE); } } @@ -1409,7 +1409,7 @@ class users if ($del_count) { - $admin_log->log_event('LAN_ADMIN_LOG_015',str_replace('--COUNT--',$del_count,USRLAN_169),E_LOG_INFORMATIVE,'USET_13'); + $admin_log->log_event('USET_13',str_replace('--COUNT--',$del_count,USRLAN_169),E_LOG_INFORMATIVE); } diff --git a/e107_handlers/admin_log_class.php b/e107_handlers/admin_log_class.php index 30cae7fb6..1dc63806a 100644 --- a/e107_handlers/admin_log_class.php +++ b/e107_handlers/admin_log_class.php @@ -12,8 +12,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/admin_log_class.php,v $ -| $Revision: 1.8 $ -| $Date: 2008-01-01 21:26:16 $ +| $Revision: 1.9 $ +| $Date: 2008-01-16 22:18:19 $ | $Author: e107steved $ To do: @@ -91,14 +91,26 @@ class e_admin_log { // Alternative admin log entry point - compatible with legacy calls, and a bit simpler to use than the generic entry point. // ($eventcode has been added - give it a reference to identify the source module, such as 'NEWS_12' or 'ECAL_03') // We also log everything (unlike 0.7, where admin log and debug stuff were all mixed up together) - function log_event($event_title, $event_detail, $event_type = E_LOG_INFORMATIVE, $eventcode='ADMIN') + function log_event($event_title, $event_detail, $event_type = E_LOG_INFORMATIVE, $event_code='') { global $e107, $tp; + if ($event_code == '') + { + if (strlen($event_title) <= 10) + { // Assume the title is actually a reference to the event + $event_code = $event_title; + $event_title = 'LAN_AL_'.$event_title; + } + else + { + $event_code = 'ADMIN'; + } + } if($this->_options['backtrace'] == true) { $event_detail .= "\n\n".debug_backtrace(); } - $this->e_log_event($event_type,-1,$eventcode,$event_title,$event_detail,FALSE,LOG_TO_ADMIN); + $this->e_log_event($event_type,-1,$event_code,$event_title,$event_detail,FALSE,LOG_TO_ADMIN); } /* diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index ef07c8581..d01385cc0 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/e107_class.php,v $ -| $Revision: 1.14 $ -| $Date: 2008-01-16 10:55:42 $ -| $Author: e107coders $ +| $Revision: 1.15 $ +| $Date: 2008-01-16 22:18:20 $ +| $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -203,7 +203,7 @@ class e107{ // If return permitted, will never display a message for a banned user; otherwise will display any message then exit function check_ban($query,$show_error=TRUE, $do_return = FALSE) { - global $sql, $tp, $pref, $admin_log; + global $sql, $tp, $pref, $admin_log, $e107; // $admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"DBG","Check for Ban",$query,FALSE,LOG_TO_ROLLING); if ($sql->db_Select('banlist','*',$query.' ORDER BY `banlist_bantype` DESC')) { @@ -251,7 +251,7 @@ class e107{ // Returns FALSE if ban not accepted (i.e. because on whitelist, or invalid IP specified) function add_ban($bantype,$ban_message='',$ban_ip='',$ban_user = 0,$ban_notes='') { - global $sql, $pref; + global $sql, $pref, $e107; if (!$ban_message) $ban_message = 'No explanation given'; if (!$ban_ip) $ban_ip = $this->getip(); $ban_ip = preg_replace("/[^\w@\.]*/",'',urldecode($ban_ip)); // Make sure no special characters @@ -259,12 +259,12 @@ class e107{ // See if the address is in the whitelist if ($sql->db_Select('banlist','*','`banlist_bantype` >= '.BAN_TYPE_WHITELIST)) { // Got a whitelist entry for this - $admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"BANLIST_11",'AL_BAN_LAN_11',$ban_ip,FALSE,LOG_TO_ROLLING); + $admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"BANLIST_11",'LAN_AL_BANLIST_11',$ban_ip,FALSE,LOG_TO_ROLLING); return FALSE; } if (varsettrue($pref['enable_rdns_on_ban'])) { - $ban_message .= 'Host: '.$e107->get_host_name(getenv('REMOTE_ADDR')); + $ban_message .= 'Host: '.$e107->get_host_name($ban_ip); } // Add using an array - handles DB changes better $sql->db_Insert('banlist',array('banlist_ip' => $ban_ip, 'banlist_bantype' => $bantype, 'banlist_datestamp' => time(), diff --git a/e107_languages/English/admin/lan_log_messages.php b/e107_languages/English/admin/lan_log_messages.php index 8f3f5affb..67dac7248 100644 --- a/e107_languages/English/admin/lan_log_messages.php +++ b/e107_languages/English/admin/lan_log_messages.php @@ -1,6 +1,6 @@ log_event('LAN_ADMIN_LOG_001',"UID: {$udata['user_id']}. UName: {$udata['user_name']}",E_LOG_INFORMATIVE,'USET_01'); + $admin_log->log_event('USET_01',"UID: {$udata['user_id']}. UName: {$udata['user_name']}",E_LOG_INFORMATIVE); // Check against the class of the target user, not the admin! if (!check_class(varset($pref['user_audit_class'],''),$udata['user_class'])) $user_logging_opts = array(); }