From 7ed35044deb45bcf59d2432c696129a1651b60cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 29 Jul 2011 00:19:18 +0000 Subject: [PATCH] Wrapper getBonusRanks() more used --- inc/modules/admin/what-list_bonus.php | 2 +- inc/modules/member/what-bonus.php | 8 +++++--- inc/monthly/monthly_bonus.php | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index 085c941d54..9f339426f8 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -105,7 +105,7 @@ ORDER BY // Generate array fore the dynamic template $WIN1 = ''; $WIN2 = ''; - if ($count <= getConfig('bonus_ranks')) { + if ($count <= getBonusRanks()) { // Maybe he can win his active bonus? $WIN1 = ''; $WIN2 = ''; diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index b505ddd0ab..00fa5ac33b 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -69,7 +69,9 @@ if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) { // Let's check if there are some points left we can 'pay'... $result = SQL_QUERY_ESC("SELECT - `userid`, ".$USE." AS `points`,`last_online` + `userid`, + ".$USE." AS `points`, + `last_online` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE @@ -78,8 +80,8 @@ WHERE " . $lastOnline . " ORDER BY `points` DESC, - last_online DESC, - userid ASC + `last_online` DESC, + `userid` ASC LIMIT {?bonus_ranks?}", array( $ONLINE diff --git a/inc/monthly/monthly_bonus.php b/inc/monthly/monthly_bonus.php index 0bde3fb1d4..f41b0e4e9a 100644 --- a/inc/monthly/monthly_bonus.php +++ b/inc/monthly/monthly_bonus.php @@ -49,7 +49,7 @@ if (!defined('__SECURITY')) { // Debug line //* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Monthly reset started.'); -if ((getConfig('bonus_ranks') > 0) && (!isCssOutputMode())) { +if ((getBonusRanks() > 0) && (!isCssOutputMode())) { // Extension 'autopurge' is inactive or purging of inactive accounts is deactivated $whereStatement = "WHERE `status`='CONFIRMED'"; -- 2.39.5