diff -r 1d0152181585 -r b25d34fbc7ab plugins/admin/SecurityLog.php
--- a/plugins/admin/SecurityLog.php Sun Jan 20 20:27:26 2008 -0500
+++ b/plugins/admin/SecurityLog.php Sun Jan 20 22:34:02 2008 -0500
@@ -15,9 +15,12 @@
function page_Admin_SecurityLog()
{
global $db, $session, $paths, $template, $plugins; // Common objects
+ global $lang;
if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
{
- echo '
Error: Not authenticated
It looks like your administration session is invalid or you are not authorized to access this administration page. Please re-authenticate to continue.
';
+ $login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
+ echo '' . $lang->get('adm_err_not_auth_title') . '
';
+ echo '' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '
';
return;
}
@@ -26,7 +29,7 @@
// die('Security log is disabled in demo mode.');
// }
- echo 'System security log
';
+ echo '' . $lang->get('acpsl_heading_main') . '
';
// Not calling the real fetcher because we have to paginate the results
$offset = ( isset($_GET['offset']) ) ? intval($_GET['offset']) : 0;
@@ -49,7 +52,12 @@
50,
array('time_id' => 'seclog_format_inner'),
'
- Type | Date | Username | IP Address |
',
+
+ ' . $lang->get('acpsl_col_type') . ' |
+ ' . $lang->get('acpsl_col_date') . ' |
+ ' . $lang->get('acpsl_col_username') . ' |
+ ' . $lang->get('acpsl_col_ip') . ' |
+
',
'
'
);
@@ -113,6 +121,7 @@
$r =& $f;
}
global $db, $session, $paths, $template, $plugins; // Common objects
+ global $lang;
$return = '';
static $cls = 'row2';
if ( substr($_SERVER['REMOTE_ADDR'], 0, 8) != '192.168.' && defined('ENANO_DEMO_MODE') )
@@ -135,33 +144,33 @@
$return .= '';
switch($r['action'])
{
- case "admin_auth_good": $return .= 'Successful elevated authentication'; if ( !empty($r['page_text']) ) { $level = $session->userlevel_to_string( intval($r['page_text']) ); $return .= " Authentication level: $level"; } break;
- case "admin_auth_bad": $return .= 'Failed elevated authentication'; if ( !empty($r['page_text']) ) { $level = $session->userlevel_to_string( intval($r['page_text']) ); $return .= " Attempted auth level: $level"; } break;
- case "activ_good": $return .= 'Successful account activation'; break;
- case "auth_good": $return .= 'Successful regular user logon'; break;
- case "activ_bad": $return .= 'Failed account activation'; break;
- case "auth_bad": $return .= 'Failed regular user logon'; break;
- case "sql_inject": $return .= 'SQL injection attemptOffending query: ' . htmlspecialchars($r['page_text']) . ' '; break;
- case "db_backup": $return .= 'Database backup created Tables: ' . $r['page_text'] . ''; break;
- case "install_enano": $return .= "Installed Enano version {$r['page_text']}"; break;
- case "upgrade_enano": $return .= "Upgraded Enano to version {$r['page_text']}"; break;
- case "illegal_page": $return .= "Unauthorized viewing attempt Page: {$illegal_link}"; break;
- case "upload_enable": $return .= "Enabled file uploads"; break;
- case "upload_disable": $return .= "Disabled file uploads"; break;
- case "magick_enable": $return .= "Enabled ImageMagick for uploaded images"; break;
- case "magick_disable": $return .= "Disabled ImageMagick for uploaded images"; break;
- case "filehist_enable": $return .= "Enabled revision tracking for uploaded files"; break;
- case "filehist_disable": $return .= "Disabled revision tracking for uploaded files"; break;
- case "magick_path": $return .= "Changed path to ImageMagick executable"; break;
- case "plugin_disable": $return .= "Disabled plugin: {$r['page_text']}"; break;
- case "plugin_enable": $return .= "Enabled plugin: {$r['page_text']}"; break;
- case "seclog_unauth": $return .= "Unauthorized attempt to call security log fetcher"; break;
- case "u_from_admin": $return .= "User {$r['page_text']} demoted from Administrators group"; break;
- case "u_from_mod": $return .= "User {$r['page_text']} demoted from Moderators group"; break;
- case "u_to_admin": $return .= "User {$r['page_text']} added to Administrators group"; break;
- case "u_to_mod": $return .= "User {$r['page_text']} added to Moderators group"; break;
+ case "admin_auth_good" : $return .= $lang->get('acpsl_entry_admin_auth_good' , array('level' => $session->userlevel_to_string( intval($r['page_text']) ))); break;
+ case "admin_auth_bad" : $return .= $lang->get('acpsl_entry_admin_auth_bad' , array('level' => $session->userlevel_to_string( intval($r['page_text']) ))); break;
+ case "activ_good" : $return .= $lang->get('acpsl_entry_activ_good') ; break;
+ case "auth_good" : $return .= $lang->get('acpsl_entry_auth_good') ; break;
+ case "activ_bad" : $return .= $lang->get('acpsl_entry_activ_bad') ; break;
+ case "auth_bad" : $return .= $lang->get('acpsl_entry_auth_bad') ; break;
+ case "sql_inject" : $return .= $lang->get('acpsl_entry_sql_inject' , array('query' => htmlspecialchars($r['page_text']))); break;
+ case "db_backup" : $return .= $lang->get('acpsl_entry_db_backup' , array('tables' => $r['page_text'])) ; break;
+ case "install_enano" : $return .= $lang->get('acpsl_entry_install_enano' , array('version' => $r['page_text'])); break; // version is in $r['page_text']
+ case "upgrade_enano" : $return .= $lang->get('acpsl_entry_upgrade_enano' , array('version' => $r['page_text'])); break; // version is in $r['page_text']
+ case "illegal_page" : $return .= $lang->get('acpsl_entry_illegal_page' , array('illegal_link' => $illegal_link)) ; break;
+ case "upload_enable" : $return .= $lang->get('acpsl_entry_upload_enable') ; break;
+ case "upload_disable" : $return .= $lang->get('acpsl_entry_upload_disable') ; break;
+ case "magick_enable" : $return .= $lang->get('acpsl_entry_magick_enable') ; break;
+ case "magick_disable" : $return .= $lang->get('acpsl_entry_magick_disable') ; break;
+ case "filehist_enable" : $return .= $lang->get('acpsl_entry_filehist_enable') ; break;
+ case "filehist_disable": $return .= $lang->get('acpsl_entry_filehist_disable'); break;
+ case "magick_path" : $return .= $lang->get('acpsl_entry_magick_path') ; break;
+ case "plugin_disable" : $return .= $lang->get('acpsl_entry_plugin_disable' , array('plugin' => $r['page_text'])) ; break;
+ case "plugin_enable" : $return .= $lang->get('acpsl_entry_plugin_enable' , array('plugin' => $r['page_text'])) ; break;
+ case "seclog_unauth" : $return .= $lang->get('acpsl_entry_seclog_unauth') ; break;
+ case "u_from_admin" : $return .= $lang->get('acpsl_entry_u_from_admin' , array('username' => $r['page_text'])) ; break;
+ case "u_from_mod" : $return .= $lang->get('acpsl_entry_u_from_mod' , array('username' => $r['page_text'])) ; break;
+ case "u_to_admin" : $return .= $lang->get('acpsl_entry_u_to_admin' , array('username' => $r['page_text'])) ; break;
+ case "u_to_mod" : $return .= $lang->get('acpsl_entry_u_to_mod' , array('username' => $r['page_text'])) ; break;
}
- $return .= ' | '.enano_date('d M Y h:i a', $r['time_id']).' | '.$r['author'].' | '.$r['edit_summary'].' |
';
+ $return .= ''.enano_date('d M Y h:i a', $r['time_id']).' | '.$r['author'].' | '.$r['edit_summary'].' | ';
return $return;
}