From b7b42548c7d70cee5eb1aa5af93bb10e0fd01394 Mon Sep 17 00:00:00 2001 From: quix0r Date: Sun, 20 Jan 2013 15:50:14 +0000 Subject: [PATCH] Changed order of AND to avoid call of function(s) --- inc/referral-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/referral-functions.php b/inc/referral-functions.php index 267fd27963..4bb7e4305b 100644 --- a/inc/referral-functions.php +++ b/inc/referral-functions.php @@ -277,7 +277,7 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU // Maybe there's another ref? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'points=' . $points . ',refid(var|data)=' . convertNullToZero($refid) . '|' . convertNullToZero(getUserData('refid')) . ',userid=' . $userid . ',paymentMethod=' . $paymentMethod . ',subject=' . $subject . ',ref_level=' . $GLOBALS['ref_level']); - if ((isValidId(getUserData('refid'))) && ($points > 0) && (getUserData('refid') != $userid) && ($paymentMethod == 'REFERRAL')) { + if (($paymentMethod == 'REFERRAL') && (isValidId(getUserData('refid'))) && ($points > 0) && (getUserData('refid') != $userid)) { // Is _ref there? if (substr($subject, -4, 4) == '_ref') { // Then remove it, no double _ref suffix! -- 2.39.5