Variable DEPTH must be deleted before ADD_POINTS_REFSYSTEM() is being called :(
[mailer.git] / inc / modules / guest / what-confirm.php
index 22acf14e50f137206fba410d4117ddcf32e67645..1eba1b02c7deb1b5694d35185f6190a387046253 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
 
 if (!empty($_GET['hash'])) {
        // Initialize the user ID
@@ -60,9 +60,9 @@ if (!empty($_GET['hash'])) {
                        // And send him right away the confirmation mail
                        SEND_EMAIL($email, GUEST_THANX_CONFIRM, $msg);
 
-                       // Maybe he got "referraled"?
+                       // Maybe he got "referaled"?
                        if (($rid > 0) && ($rid != $uid)) {
-                               // Select the referral userid
+                               // Select the referal userid
                                $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
                                 array(bigintval($rid)), __FILE__, __LINE__);
                                if (SQL_NUMROWS($result) == 1) {
@@ -72,7 +72,7 @@ if (!empty($_GET['hash'])) {
                                        // Ok, write the ref-points to this user and his parent-ref
                                        unset($DEPTH);
 
-                                       // Shall I "pay" the referral points imidiately?
+                                       // Shall I "pay" the referal points imidiately?
                                        if ($_CONFIG['ref_payout'] == "0") {
                                                // Yes, "pay" it now
                                                $locked = false;
@@ -91,8 +91,8 @@ if (!empty($_GET['hash'])) {
                                                BONUS_POINTS_HANDLER($_CONFIG['bonus_ref']);
                                        } // END - if
 
-                                       // Add one-time referral bonus over referral system or directly
-                                       $DEPTH = 0;
+                                       // Add one-time referal bonus over referal system or directly
+                                       unset($DEPTH);
                                        ADD_POINTS_REFSYSTEM($rid, $_CONFIG['points_ref'], true, bigintval($uid), $locked, $_CONFIG['reg_points_mode']);
                                } // END - if
                        } // END - if