From 05ebac45eec0b77743fc87c07abd07d41e3450b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 22 Jun 2012 00:05:44 +0000 Subject: [PATCH] Sort reversed --- inc/referral-functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/referral-functions.php b/inc/referral-functions.php index 9d5146c85c..087914d9ac 100644 --- a/inc/referral-functions.php +++ b/inc/referral-functions.php @@ -576,6 +576,9 @@ function addMissingReferralLevels ($userid) { } // END - if //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',count()=' . count($GLOBALS['referral_refid'][$userid])); + // Sort the array reversed + krsort($GLOBALS['referral_refid']); + // Now walk through the array, first levels foreach ($GLOBALS['referral_refid'][$userid] as $level => $levelArray) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',count()=' . count($levelArray)); -- 2.39.5