From 67ec1888ea14a50f6df62e0599e50d209e7b0c6c Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Mon, 4 Apr 2011 15:57:32 +0200 Subject: [PATCH] Fixed logout error when setting show users online. --- admin/db/users_db.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/db/users_db.inc b/admin/db/users_db.inc index 00acb48e..3d7645ce 100644 --- a/admin/db/users_db.inc +++ b/admin/db/users_db.inc @@ -147,9 +147,10 @@ function check_user_activity($id) //----------------------------------------------------------------------------------------------- function show_users_online() { - global $show_users_online; + global $show_users_online, $db; - if (!isset($show_users_online) || $show_users_online == 0 || !defined('TB_PREF') || !isset($_SESSION['get_text'])) + if (!isset($show_users_online) || $show_users_online == 0 || !defined('TB_PREF') || + !isset($_SESSION['get_text']) || !isset($db)) return ""; $result = db_query("SHOW TABLES LIKE '".TB_PREF."useronline'"); if (db_num_rows($result) == 1) -- 2.30.2