From: Joe Hunt Date: Mon, 4 Apr 2011 13:57:32 +0000 (+0200) Subject: Fixed logout error when setting show users online. X-Git-Tag: 2.3-final~721 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=67ec1888ea14a50f6df62e0599e50d209e7b0c6c;p=fa-stable.git Fixed logout error when setting show users online. --- 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)