From: quix0r Date: Sun, 20 Jan 2013 15:50:14 +0000 (+0000) Subject: Changed order of AND to avoid call of function(s) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b7b42548c7d70cee5eb1aa5af93bb10e0fd01394;p=mailer.git Changed order of AND to avoid call of function(s) --- 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!