]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-top10.php
Extension ext-coupon continued, a lot improvements applied:
[mailer.git] / inc / modules / guest / what-top10.php
index 0e1d4904ad2c1771102ca3af4304d9bb1e3165eb..a4dc1f524a2ee0542fd48666cd73d8060540ab2a 100644 (file)
@@ -110,7 +110,7 @@ SQL_FREERESULT($result);
 //// TOP earners
 $result = SQL_QUERY("SELECT
        d.userid,
-       (SUM(p.points) - d.used_points) AS points,
+       (SUM(p.points) - d.used_points) AS `points`,
        d.last_online
 FROM
        `{?_MYSQL_PREFIX?}_user_data` AS d
@@ -198,7 +198,9 @@ while ($content = SQL_FETCHARRAY($result)) {
        $content['nickname'] = '';
 
        // Get nickname
-       if (isExtensionActive('nickname')) $content['nickname'] = getNickname($content['userid']);
+       if (isExtensionActive('nickname')) {
+               $content['nickname'] = getNickname($content['userid']);
+       } // END - if
 
        // Prepare data for template
        $content = array(
@@ -206,7 +208,6 @@ while ($content = SQL_FETCHARRAY($result)) {
                'userid'      => $content['userid'],
                'refs'        => $content['refs'],
                'nickname'    => $content['nickname'],
-               'points'      => getTotalPoints($content['userid']),
                'last_online' => generateDateTime($content['last_online'], 3)
        );