From 3b6c308055831e6f82c8f6ce64864a03c9591d7c Mon Sep 17 00:00:00 2001 From: nlstart Date: Fri, 12 Aug 2011 19:27:13 +0000 Subject: [PATCH] Bugtracker #5255: only perform online query if the plugin is activated. Thanks Fanat1k. --- class2.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/class2.php b/class2.php index b87dfce25..f8a8c5d90 100644 --- a/class2.php +++ b/class2.php @@ -817,7 +817,10 @@ if ((e_QUERY == 'logout')/* || (($pref['user_tracking'] == 'session') && isset($ $udata = (USER === true ? USERID.'.'.USERNAME : '0'); // TODO - should be done inside online handler, more core areas need it (session handler for example) - $sql->db_Update('online', "online_user_id = 0, online_pagecount=online_pagecount+1 WHERE online_user_id = '{$udata}' LIMIT 1"); + if (isset($pref['track_online']) && $pref['track_online']) + { + $sql->db_Update('online', "online_user_id = 0, online_pagecount=online_pagecount+1 WHERE online_user_id = '{$udata}' LIMIT 1"); + } if ($pref['user_tracking'] == 'session') {