From c92b6c5e6b704f22885d582b24340eb9a5e967a9 Mon Sep 17 00:00:00 2001 From: Moc Date: Sat, 23 May 2020 15:49:40 +0200 Subject: [PATCH] Fixes #3681 - 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) --- class2.php | 5 +++-- e107_core/xml/default_install.xml | 1 - e107_handlers/online_class.php | 2 +- e107_plugins/online/online_shortcodes.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/class2.php b/class2.php index 271d3f2d7..00e4278d1 100755 --- a/class2.php +++ b/class2.php @@ -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)'); diff --git a/e107_core/xml/default_install.xml b/e107_core/xml/default_install.xml index bb79dd9cc..99b25113d 100644 --- a/e107_core/xml/default_install.xml +++ b/e107_core/xml/default_install.xml @@ -140,7 +140,6 @@ 10 0 100 - 1 30 5 %a %b %d %Y, %I:%M%p diff --git a/e107_handlers/online_class.php b/e107_handlers/online_class.php index 162066b11..7f7d68529 100755 --- a/e107_handlers/online_class.php +++ b/e107_handlers/online_class.php @@ -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', ''); diff --git a/e107_plugins/online/online_shortcodes.php b/e107_plugins/online/online_shortcodes.php index 4bd8ebff9..a87556311 100644 --- a/e107_plugins/online/online_shortcodes.php +++ b/e107_plugins/online/online_shortcodes.php @@ -73,7 +73,7 @@ class online_shortcodes extends e_shortcode function sc_online_tracking_disabled() { - $url = e_ADMIN."users.php?mode=main&action=prefs"; + $url = e_ADMIN_ABS."users.php?mode=main&action=prefs"; $srch = array("[","]"); $repl = array("", "");