More rewrites to make use of (cached) wrapper functions
[mailer.git] / inc / modules / guest / what-stats.php
index 38ea6bbf473a8d561e7d32bb0f2daf5d3be44e3c..9dd3fe910208e201b1f4628c94347de3751c654d 100644 (file)
@@ -194,7 +194,7 @@ switch (getConfig('guest_stats')) {
                $mem_t10   = SQL_QUERY("SELECT `counter`, `title` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `counter` > 0".$AND." ORDER BY `counter` DESC LIMIT 0,10", __FILE__, __LINE__);
                $OUT = ''; 
 
-               if (SQL_NUMROWS($guest_t10) > 0) {
+               if (!SQL_HASZERONUMS($guest_t10)) {
                        // Guest clicks
                        $OUT .= loadTemplate('guest_stats_header', true, '{--GUEST_TOP_GUEST_STATS--}');
                        while ($content = SQL_FETCHARRAY($guest_t10)) {
@@ -203,7 +203,7 @@ switch (getConfig('guest_stats')) {
                        } // END - while
                } // END - if
 
-               if (SQL_NUMROWS($mem_t10) > 0) {
+               if (!SQL_HASZERONUMS($mem_t10)) {
                        // Member clicks
                        $OUT .= loadTemplate('guest_stats_header', true, '{--GUEST_TOP_MEMBER_STATS--}');
                        while ($content = SQL_FETCHARRAY($mem_t10)) {
@@ -212,7 +212,7 @@ switch (getConfig('guest_stats')) {
                        } // END - while
                } // END - if
 
-               if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) {
+               if ((!SQL_HASZERONUMS($guest_t10)) || (!SQL_HASZERONUMS($mem_t10))) {
                        // Prepare content
                        $content = array(
                                'rows'   => $OUT,