X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Frallye_functions.php;h=99c029890f7c38938072886f53007913bd52c03a;hb=500f1a8d2913512f1f5621c2a0320ad81f5133a1;hp=e2b69c0b67472fb841f215a594b98c6ba673b368;hpb=c4823d28fd0bd22250b16d73f2034f36fc54abda;p=mailer.git diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index e2b69c0b67..99c029890f 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -108,7 +108,7 @@ LIMIT 1", // Add userid and his ref count to table $result_ref = SQL_QUERY_ESC("SELECT - SUM(p.points) AS points + SUM(p.points) AS `points` FROM `{?_MYSQL_PREFIX?}_user_points` AS p LEFT JOIN @@ -444,9 +444,6 @@ function markReferalRallyesAsExpired ($result) { // Free result SQL_FREERESULT($result); - // Load users array (!) with assigned prices - $prices = getArrayFromReferalRallyeUsers($id); - // Init array $DATA = array(); $count = '0'; @@ -456,13 +453,16 @@ function markReferalRallyesAsExpired ($result) { $DATA['end'] = generateDateTime($end , 1); $DATA['now_t'] = generateDateTime(time(), 1); + // Load users array (!) with assigned prices + $prices = getArrayFromReferalRallyeUsers($id); + // Just count... $total = '0'; foreach ($prices['userid'] as $key => $userid) { // Check status // active = 1: account is still confirmed // active = 0: account is deleted or locked - $active = countSumTotalData($DATA['userid'][$idx], 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED'"); + $active = countSumTotalData($userid, 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED'"); $prices['active'][$key] = $active; @@ -577,8 +577,8 @@ LIMIT %s", ), __FUNCTION__, __LINE__); while ($content = SQL_FETCHARRAY($result)) { // Construct the message masked and add it - $ret .= sprintf("%s %s %s (%s) - %s\n", - translateGender($content['gender']), + $ret .= sprintf("{%%pipe,translateGender=%s%} %s %s (%s) - %s\n", + $content['gender'], $content['surname'], $content['family'], $content['email'], @@ -645,7 +645,7 @@ function getArrayFromReferalRallyeUsers ($rallye) { // Points of ref's $result_ref = SQL_QUERY_ESC("SELECT - SUM(p.points) AS points + SUM(p.points) AS `points` FROM `{?_MYSQL_PREFIX?}_user_points` AS p LEFT JOIN @@ -952,11 +952,5 @@ function determineReferalRallyeMinimumPrices ($min_prices) { return $return; } -// Filter for extra-autpurge -function FILTER_RALLYE_EXTRA_AUTOPURGE () { - // Check expired rallyes (hard-coded 3 days limit for displaying expired rallyes!) - purgeExpiredReferalRallyes(); -} - // [EOF] ?>