Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / modules / admin / what-usr_online.php
index f0bba0d91067194d88c3e868b56ca69c82344a23..0ca3fc427d899ff3979a1a663b0f458a485382eb 100644 (file)
@@ -55,9 +55,23 @@ if (isExtensionActive('online')) {
        loadTemplate('admin_mini_online', FALSE, $content);
 
        // Check for online users
-       $result = sqlQuery("SELECT `id`, `ip`, `userid`, `refid`, `module`, `action`, `what`, `is_member`, `is_admin`, `timestamp` FROM `{?_MYSQL_PREFIX?}_online` ORDER by `timestamp` DESC",
-               __FILE__, __LINE__);
-       if (!ifSqlHasZeroNums($result)) {
+       $result = sqlQuery("SELECT
+       `id`,
+       `ip`,
+       `userid`,
+       `refid`,
+       `module`,
+       `action`,
+       `what`,
+       `is_member`,
+       `is_admin`,
+       `timestamp`
+FROM
+       `{?_MYSQL_PREFIX?}_online`
+ORDER BY
+       `timestamp` DESC", __FILE__, __LINE__);
+
+       if (!ifSqlHasZeroNumRows($result)) {
                // List all online users
                $OUT = '';
                while ($row = sqlFetchArray($result)) {