1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-22 05:31:58 +02:00

Fixes - Properly detect antiflood and online tracking prefs

- e_TRACKING_DISABLED is now properly defined when user tracking is turned off ('track_online').
- Use correct antiflood pref ('antiflood1')
- Remove old 'flood_protect' pref (which was not used anymore)
This commit is contained in:
Moc 2020-05-23 15:49:40 +02:00
parent c03945cd63
commit c92b6c5e6b
No known key found for this signature in database
GPG Key ID: AAEA3CC2C5A308F2
4 changed files with 5 additions and 5 deletions
class2.php
e107_core/xml
e107_handlers
e107_plugins/online

@ -2221,9 +2221,10 @@ e107::getDebug()->log("Timezone: ".USERTIMEZONE); // remove later on.
$dbg->logTime('Go online');
if(!isset($_E107['no_online']) && varset($pref['track_online']))
if(!isset($_E107['no_online']))
{
e107::getOnline()->goOnline($pref['track_online'], $pref['flood_protect']);
e107::getOnline()->goOnline($pref['track_online'], $pref['antiflood1']);
}
$dbg->logTime('(After Go online)');

@ -140,7 +140,6 @@
<core name="failed_login_limit">10</core>
<core name="filter_script">0</core>
<core name="flood_hits">100</core>
<core name="flood_protect">1</core>
<core name="flood_time">30</core>
<core name="flood_timeout">5</core>
<core name="forumdate">%a %b %d %Y, %I:%M%p</core>

@ -81,7 +81,7 @@ class e_online
//global $members_online, $total_online; // Not needed as globals
global $listuserson; // FIXME - remove it, make it property, call e_online signleton - e107::getOnline()
if($online_tracking === false && $flood_control === false)
if($online_tracking == false || $flood_control == false)
{
define('e_TRACKING_DISABLED', true); // Used in forum, online menu
define('TOTAL_ONLINE', '');

@ -73,7 +73,7 @@ class online_shortcodes extends e_shortcode
function sc_online_tracking_disabled()
{
$url = e_ADMIN."users.php?mode=main&amp;action=prefs";
$url = e_ADMIN_ABS."users.php?mode=main&amp;action=prefs";
$srch = array("[","]");
$repl = array("<a href='".$url."'>", "</a>");