# HG changeset patch
# User Dan
# Date 1200886442 18000
# Node ID b25d34fbc7abde9c57ccd6be0022d57b5e571099
# Parent 1d0152181585beb432585f27d15182da388f8f34
Completed l10n on admin panel. Exception is Admin:ThemeManager, which is pending a rewrite.
diff -r 1d0152181585 -r b25d34fbc7ab language/english/admin.json
--- a/language/english/admin.json Sun Jan 20 20:27:26 2008 -0500
+++ b/language/english/admin.json Sun Jan 20 22:34:02 2008 -0500
@@ -18,7 +18,8 @@
var enano_lang = {
categories: [
'adm', 'acl', 'adminusers',
- 'acphome', 'acpgc', 'acpup', 'acpft', 'acppl', 'acppm', 'acped', 'acpdb', 'acppg', 'acpum', 'acpug', 'acpcp', 'acpmm',
+ 'acphome', 'acpgc', 'acpup', 'acpft', 'acppl', 'acppm', 'acped', 'acpdb', 'acppg', 'acpum', 'acpug', 'acpcp', 'acpmm', 'acpsl', 'acpbc',
+ 'acplo',
],
strings: {
meta: {
@@ -37,6 +38,9 @@
acpug: 'ACP: User group management',
acpcp: 'ACP: COPPA support',
acpmm: 'ACP: Mass e-mail',
+ acpsl: 'ACP: Security log',
+ acpbc: 'ACP: Ban control',
+ acplo: 'ACP: Logout page',
},
adm: {
cat_general: 'General',
@@ -699,6 +703,69 @@
btn_send: 'Send message',
msg_send_takeawhile: 'Please be warned: it may take a LONG time to send this message. Please do not stop the script until the process is finished.',
},
+ acpsl: {
+ heading_main: 'System security log',
+ col_type: 'Type',
+ col_date: 'Date',
+ col_username: 'Username',
+ col_ip: 'IP Address',
+ entry_admin_auth_good: 'Successful elevated authentication
Authentication level: %level%',
+ entry_admin_auth_bad: 'Failed elevated authentication
Attempted auth level: %level%',
+ entry_activ_good: 'Successful account activation',
+ entry_auth_good: 'Successful regular user logon',
+ entry_activ_bad: 'Failed account activation',
+ entry_auth_bad: 'Failed regular user logon',
+ entry_sql_inject: 'SQL injection attempt
Offending query: %query%
',
+ entry_db_backup: 'Database backup created
Tables: %tables%',
+ entry_install_enano: 'Installed Enano version %version%',
+ entry_upgrade_enano: 'Upgraded Enano to version %version%',
+ entry_illegal_page: 'Unauthorized viewing attempt
Page: %illegal_link%',
+ entry_upload_enable: 'Enabled file uploads',
+ entry_upload_disable: 'Disabled file uploads',
+ entry_magick_enable: 'Enabled ImageMagick for uploaded images',
+ entry_magick_disable: 'Disabled ImageMagick for uploaded images',
+ entry_filehist_enable: 'Enabled revision tracking for uploaded files',
+ entry_filehist_disable: 'Disabled revision tracking for uploaded files',
+ entry_magick_path: 'Changed path to ImageMagick executable',
+ entry_plugin_disable: 'Disabled plugin: %plugin%',
+ entry_plugin_enable: 'Enabled plugin: %plugin%',
+ entry_seclog_unauth: 'Unauthorized attempt to call security log fetcher',
+ entry_u_from_admin: 'User %username% demoted from Administrators group',
+ entry_u_from_mod: 'User %username% demoted from Moderators group',
+ entry_u_to_admin: 'User %username% added to Administrators group',
+ entry_u_to_mod: 'User %username% added to Moderators group',
+ tip_reverse_dns: 'Click for reverse DNS info',
+ },
+ acpbc: {
+ err_empty: 'Please enter something to ban.',
+ err_invalid_ip_range: 'The IP address range you entered is invalid.',
+ err_demo: 'This function is disabled in the demo. Just because you don\'t like %ban_target% doesn\'t mean we don\'t like %ban_target%.',
+ col_type: 'Type',
+ col_value: 'Value',
+ col_regex: 'Regular Expression',
+ msg_no_rules: 'No ban rules yet.',
+ ban_type_ip: 'IP address',
+ ban_type_username: 'Username',
+ ban_type_email: 'E-mail address',
+ btn_delete: 'Delete',
+ // Some languages like Chinese don't literally have the word "yes", so this would be something
+ // along the lines of "This is a regular expression" / "This is not..." in Chinese. Hence the
+ // separation of this from a generic "yes" string.
+ ban_regex_yes: 'Yes',
+ ban_regex_no: 'No',
+ heading_create_new: 'Create new ban rule',
+ field_type: 'Type:',
+ field_rule: 'Rule:',
+ field_rule_hint: 'You can ban multiple IP addresses, users, or e-mail addresses by separating entries with a single comma (User1,User2). Do not put a space after the comma. For IP addresses, you may specify ranges like 172|192.168.4-30|90-167.1-90, which will turn into 172 and 192 . 168 . 4-30 and 90-167 . 1 - 90, which matches 18,899 IP addresses.',
+ field_reason: 'Reason to show to the banned user:',
+ field_regex: 'This rule is a regular expression',
+ field_regex_hint: '(advanced users only)',
+ btn_create: 'Create new ban rule',
+ },
+ acplo: {
+ heading_main: 'You have now been logged out of the administration panel.',
+ msg_logout_complete: 'You will continue to be logged into the website, but you will need to re-authenticate before you can access the administration panel again.Return to the Main Page.',
+ }
}
};
diff -r 1d0152181585 -r b25d34fbc7ab plugins/SpecialAdmin.php
--- a/plugins/SpecialAdmin.php Sun Jan 20 20:27:26 2008 -0500
+++ b/plugins/SpecialAdmin.php Sun Jan 20 22:34:02 2008 -0500
@@ -1969,7 +1969,8 @@
if(isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['id']) && $_GET['id'] != '')
{
$e = $db->sql_query('DELETE FROM '.table_prefix.'banlist WHERE ban_id=' . intval($_GET['id']) . '');
- if(!$e) $db->_die('The ban list entry was not deleted.');
+ if ( !$e )
+ $db->_die('The ban list entry was not deleted.');
}
if(isset($_POST['create']) && !defined('ENANO_DEMO_MODE'))
{
@@ -1981,7 +1982,7 @@
}
else if ( empty($value) )
{
- echo '
Please enter something to ban.
';
+ echo '' . $lang->get('acpbc_err_empty') . '
';
}
else
{
@@ -1993,7 +1994,7 @@
$entry = trim($entry);
if ( empty($entry) )
{
- echo 'Malformed entry.
';
+ echo '' . $lang->get('acpbc_err_invalid_ip_range') . '
';
$error = true;
break;
}
@@ -2033,35 +2034,66 @@
}
else if ( isset($_POST['create']) && defined('ENANO_DEMO_MODE') )
{
- echo 'This function is disabled in the demo. Just because you don\'t like ' . htmlspecialchars($_POST['value']) . ' doesn\'t mean we don\'t like ' . htmlspecialchars($_POST['value']) . '.
';
+ echo '' . $lang->get('acpbc_err_demo', array('ban_target' => htmlspecialchars($_POST['value']))) . '
';
}
$q = $db->sql_query('SELECT ban_id,ban_type,ban_value,is_regex FROM '.table_prefix.'banlist ORDER BY ban_type;');
- if(!$q) $db->_die('The banlist data could not be selected.');
+ if ( !$q )
+ $db->_die('The banlist data could not be selected.');
echo '
';
- echo 'Type | Value | Regular Expression | |
';
- if($db->numrows() < 1) echo 'No ban rules yet. | ';
+ echo '
+ ' . $lang->get('acpbc_col_type') . ' |
+ ' . $lang->get('acpbc_col_value') . ' |
+ ' . $lang->get('acpbc_col_regex') . ' |
+ |
+
';
+ if ( $db->numrows() < 1 )
+ {
+ echo '' . $lang->get('acpbc_msg_no_rules') . ' | ';
+ }
$cls = 'row2';
- while($r = $db->fetchrow())
+ while ( $r = $db->fetchrow() )
{
$cls = ( $cls == 'row1' ) ? 'row2' : 'row1';
- if($r['ban_type']==BAN_IP) $t = 'IP address';
- elseif($r['ban_type']==BAN_USER) $t = 'Username';
- elseif($r['ban_type']==BAN_EMAIL) $t = 'E-mail address';
- if($r['is_regex']) $g = 'Yes'; else $g = 'No';
- echo ''.$t.' | '.$r['ban_value'].' | '.$g.' | Delete |
';
+ if ( $r['ban_type'] == BAN_IP )
+ $t = $lang->get('acpbc_ban_type_ip');
+ else if ( $r['ban_type'] == BAN_USER )
+ $t = $lang->get('acpbc_ban_type_username');
+ else if ( $r['ban_type'] == BAN_EMAIL )
+ $t = $lang->get('acpbc_ban_type_email');
+ $g = ( $r['is_regex'] ) ? '' . $lang->get('acpbc_ban_regex_yes') . '' : $lang->get('acpbc_ban_regex_no');
+ echo '
+ '.$t.' |
+ '.htmlspecialchars($r['ban_value']).' |
+ '.$g.' |
+ ' . $lang->get('acpbc_btn_delete') . ' |
+
';
}
$db->free_result();
echo '
';
- echo 'Create new ban rule
';
+ echo '' . $lang->get('acpbc_heading_create_new') . '
';
echo '