1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +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

@@ -223,6 +223,9 @@ $e107_paths = compact('ADMIN_DIRECTORY', 'FILES_DIRECTORY', 'IMAGES_DIRECTORY',
$sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
$e107 = e107::getInstance()->initCore($e107_paths, realpath(dirname(__FILE__)), $sql_info, varset($E107_CONFIG, array()));
e107::getSingleton('eIPHandler'); // This auto-handles bans etc
### NEW Register Autoload - do it asap
if(!function_exists('spl_autoload_register'))
{
@@ -777,8 +780,8 @@ if (!class_exists('e107table', false))
$ns = e107::getRender(); //TODO - find & replace $ns, $e107->ns
// EONE-134 - bad e_module could destroy e107 instance
$e107 = e107::getInstance();
$e107->ban();
$e107 = e107::getInstance(); // Is this needed now?
e107::getIPHandler()->ban();
if(varset($pref['force_userupdate']) && USER && !isset($_E107['no_forceuserupdate']))
{