Large code cleanups:
[mailer.git] / inc / libs / user_functions.php
index 688640aa4d72d7e521ecf6e93c49d7ed5ee1226b..80fcaf50ea493ff9d55480fc7ef4979fe53ad49f 100644 (file)
@@ -223,9 +223,9 @@ LIMIT 1",
        return $email;
 }
 
-// Selects a random user id as the new referal id if they have at least X confirmed mails in this run
+// Selects a random user id as the new referral id if they have at least X confirmed mails in this run
 // @TODO Double-check configuration entry here
-function determineRandomReferalId () {
+function determineRandomReferralId () {
        // Default is zero refid
        $refid = NULL;
 
@@ -245,7 +245,7 @@ function determineRandomReferalId () {
 
                        // Do we have one entry there?
                        if (SQL_NUMROWS($result) == 1) {
-                               // Use that userid as new referal id
+                               // Use that userid as new referral id
                                list($refid) = SQL_FETCHROW($result);
                        } // END - if
 
@@ -334,7 +334,7 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p
                                // Is the timeout reached?
                                if ($probe >= getConfig('login_timeout')) {
                                        // Add login bonus to user's account
-                                       $add = ', `login_bonus`=`login_bonus`+{?login_bonus?}';
+                                       $add = ',`login_bonus`=`login_bonus`+{?login_bonus?}';
                                        $GLOBALS['bonus_payed'] = true;
 
                                        // Subtract login bonus from userid's account or jackpot
@@ -601,12 +601,12 @@ LIMIT 1",
                        // And send him right away the confirmation mail
                        sendEmail($userid, '{--GUEST_THANX_CONFIRM--}', $message);
 
-                       // Maybe he got "referaled"?
+                       // Maybe he got "referraled"?
                        if ((isValidUserId($refid)) && ($refid != $userid)) {
-                               // Select the referal userid
+                               // Select the referral userid
                                if (fetchUserData($refid)) {
                                        // Update ref counter...
-                                       updateReferalCounter($refid);
+                                       updateReferralCounter($refid);
 
                                        // If version matches add ref bonus to refid's account
                                        if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (isBonusRallyeActive())) {
@@ -618,15 +618,15 @@ LIMIT 1",
                                                handleBonusPoints(getConfig('bonus_ref'), $refid);
                                        } // END - if
 
-                                       // Add one-time referal bonus over referal system or directly
-                                       initReferalSystem();
-                                       addPointsThroughReferalSystem('referal_bonus', $refid, getPointsRef(), bigintval($userid));
+                                       // Add one-time referral bonus over referral system or directly
+                                       initReferralSystem();
+                                       addPointsThroughReferralSystem('referral_bonus', $refid, getPointsRef(), bigintval($userid));
                                } // END - if
                        } // END - if
 
                        if (isExtensionActive('rallye')) {
                                // Add user to rallye (or not?)
-                               addUserToReferalRallye(bigintval($userid));
+                               addUserToReferralRallye(bigintval($userid));
                        } // END - if
 
                        // Account confirmed!