Fixed logout error when setting show users online.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 4 Apr 2011 13:57:32 +0000 (15:57 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 4 Apr 2011 13:57:32 +0000 (15:57 +0200)
admin/db/users_db.inc

index 00acb48e2dc71c1919a2a4c1d3fabf6b48943961..3d7645cee375d1d0e75ad3a2d6a4efc1a4428d86 100644 (file)
@@ -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)