1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-31 10:01:56 +02:00

Ban handling improvements - most checking done before DB opened (much faster if user is banned).

Fix some bugs in ban admin pages.
Separate handler for IP- and ban-related functions (moves them out of e107_class)
This commit is contained in:
e107steved
2011-12-28 10:01:25 +00:00
parent db9b9c1a57
commit 389705683e
10 changed files with 1891 additions and 239 deletions

View File

@@ -10,17 +10,17 @@
+----------------------------------------------------------------------------+
*/
// define("BANLAN_1", "Ban removed.");
define("BANLAN_2", 'No bans in list.');
define("BANLAN_3", "Existing Bans");
define('BANLAN_2', 'No bans in list.');
define('BANLAN_3', 'Existing Bans');
// define("BANLAN_4", "Remove ban");
define("BANLAN_5", "Enter IP, email address, or host");
define("BANLAN_7", "Reason");
define("BANLAN_8", "Ban Address");
define("BANLAN_9", "Ban users from site by email, IP or host address");
define("BANLAN_10", "IP / Email / Reason");
define("BANLAN_11", "Auto-ban: More than 10 failed login attempts");
define("BANLAN_12", "Note: Reverse DNS is currently disabled; it must be enabled to allow banning by host. Banning by IP and email address will still function normally.");
define("BANLAN_13", "Note: To ban a user by user name, go to the users admin page: ");
define('BANLAN_5', 'Enter IP, email address, or host');
define('BANLAN_7', 'Reason');
define('BANLAN_8', 'Ban Address');
define('BANLAN_9', 'Ban users from site by email, IP or host address');
define('BANLAN_10', 'IP / Email / Reason');
define('BANLAN_11', 'Auto-ban: More than 10 failed login attempts');
define('BANLAN_12', 'Note: Reverse DNS is currently disabled; it must be enabled to allow banning by host. Banning by IP and email address will still function normally.');
define('BANLAN_13', 'Note: To ban a user by user name, go to the users admin page: ');
define('BANLAN_14','Ban List');
define('BANLAN_15','Messages/Ban Periods');
define('BANLAN_16','Banning');
@@ -36,7 +36,7 @@ define('BANLAN_25','Add to Banlist');
define('BANLAN_26','Currently ');
define('BANLAN_27','Invalid characters in IP address stripped - now:');
define('BANLAN_28','Ban type');
define('BANLAN_29','Message to show');
define('BANLAN_29','Message to show to banned user');
define('BANLAN_30','Ban duration');
define('BANLAN_31','(Use an empty message if you wish the user to get a blank screen)');
define('BANLAN_32','Indefinite');
@@ -55,7 +55,7 @@ define('BANLAN_44','Use expiry date/time from import');
define('BANLAN_45','Import');
define('BANLAN_46','Import File:');
define('BANLAN_47','File upload error');
//define('BANLAN_48','Error importing file');
define('BANLAN_48','Deleted --NUM-- expired ban list entries');
define('BANLAN_49','CSV import: Unbalanced quotes in line ');
define('BANLAN_50','CSV import: Error writing banlist record at line ');
define('BANLAN_51','CSV import: Success, --NUM-- lines imported from file ');
@@ -88,6 +88,19 @@ define('BANLAN_77','Messages/Ban Periods');
// define('BANLAN_78','Hit count exceeded (--HITS-- requests within allotted time)');
define('BANLAN_79','CSV Export format:');
define('BANLAN_80','CSV Import format:');
define('BANLAN_81','Ban Action Log');
define('BANLAN_82', 'No entries in Ban Action Log');
define('BANLAN_83', 'Date/Time');
define('BANLAN_84', 'IP Address');
define('BANLAN_85', 'Additional information');
define('BANLAN_86', 'Ban-related events');
define('BANLAN_87', 'Total --NUM-- entries in list');
define('BANLAN_88', 'Empty Ban Action Log');
define('BANLAN_89', 'Log File Deleted');
define('BANLAN_90', 'Error deleting log file');
define('BANLAN_91', 'Date/time format for ban log');
define('BANLAN_92', 'See the strftime function page at php.net');
define('BANLAN_93', '');
// Ban types - block reserved 100-109
define('BANLAN_100', 'Unknown');
@@ -113,6 +126,6 @@ define('BANLAN_117', 'Spare reason');
define('BANLAN_118', 'Spare reason');
define('BANLAN_119', 'Indicates an import error - previously imported bans');
define('BANLAN_120', 'Unknown');
define('BANLAN_120', 'Whitelist entry');
?>

View File

@@ -88,6 +88,7 @@ define('LAN_AL_BANLIST_08','Banlist options updated');
define('LAN_AL_BANLIST_09','Banlist entry edited');
define('LAN_AL_BANLIST_10','Whitelist entry edited');
define('LAN_AL_BANLIST_11','Whitelist hit for ban entry');
define('LAN_AL_BANLIST_12','Expired bans cleared');
// Comment-related events

View File

@@ -9,19 +9,19 @@
| $Author$
+----------------------------------------------------------------------------+
*/
define("UC_LAN_0", "Everyone (public)");
define("UC_LAN_1", "Guests");
define("UC_LAN_2", "No One (inactive)");
define("UC_LAN_3", "Members");
define("UC_LAN_4", "Read Only");
define("UC_LAN_5", "Admin");
define("UC_LAN_6", "Main Admin");
define('UC_LAN_0', 'Everyone (public)');
define('UC_LAN_1', 'Guests');
define('UC_LAN_2', 'No One (inactive)');
define('UC_LAN_3', 'Members');
define('UC_LAN_4', 'Read Only');
define('UC_LAN_5', 'Admin');
define('UC_LAN_6', 'Main Admin');
define('UC_LAN_7', 'Forum Moderators');
define('UC_LAN_8','Admins and Mods');
define('UC_LAN_9','New Users');
define('UC_LAN_10', 'Search Bots');
define('UC_LAN_INVERT', "Not --CLASS--");
define('UC_LAN_INVERTLABEL', "Everyone but..");
define('UC_LAN_INVERT', 'Not --CLASS--');
define('UC_LAN_INVERTLABEL', 'Everyone but..');
?>