From 0f90798a066b2d0e1fa376136b1bdfc7ca52f519 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 10 Mar 2009 21:52:48 +0000 Subject: [PATCH] Refactured old lost code --- inc/modules/guest/action-online.php | 5 +++-- inc/mysql-manager.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/modules/guest/action-online.php b/inc/modules/guest/action-online.php index 3dd9737ab6..b398f9f035 100644 --- a/inc/modules/guest/action-online.php +++ b/inc/modules/guest/action-online.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { } // Total visitors online -$total = SQL_NUMROWS($result_guests) + SQL_NUMROWS($result_members) + SQL_NUMROWS($result_admins); +$total = GET_TOTAL_DATA("", "online", "id", "userid", true); if (getConfig('mad_count') < $total) { // Update counter @@ -57,7 +57,8 @@ if (getConfig('mad_count') < $total) { $content = array( 'guests' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='N'")), 'members' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='Y'")), - 'admins' => TRANSLATE_COMMA(GET_TOTAL_DATA("Y", "online", "id", "is_admin", true)) + 'admins' => TRANSLATE_COMMA(GET_TOTAL_DATA("Y", "online", "id", "is_admin", true)), + 'total' => TRANSLATE_COMMA($total) ); // Output table diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 43a2e1d37b..fd67f992d2 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1058,7 +1058,7 @@ function REMOVE_RECEIVER (&$receivers, $key, $uid, $pool_id, $stats_id="", $bonu } // Calculate sum (default) or count records of given criteria -function GET_TOTAL_DATA ($search, $tableName, $lookFor, $whereStatement = "userid", $countRows = false, $add = "") { +function GET_TOTAL_DATA ($search, $tableName, $lookFor = "id", $whereStatement = "userid", $countRows = false, $add = "") { $ret = 0; //* DEBUG: */ echo $search."/".$tableName."/".$lookFor."/".$whereStatement."/".$add."
\n"; if (empty($search)) { -- 2.39.5