One more found
[mailer.git] / doubler.php
index 2f8b0a234172d0f9c6d54e394ff9e1292eb90d3c..6a259162edbede44c1cfc2bff954296c060a4cbf 100644 (file)
@@ -42,7 +42,7 @@ require('inc/libs/security_functions.php');
 $GLOBALS['startTime'] = microtime(true);
 
 // Set module
-$GLOBALS['module'] = 'doubler';
+$GLOBALS['__module'] = 'doubler';
 $GLOBALS['output_mode'] = '0';
 
 // Load the required file(s)
@@ -102,7 +102,7 @@ if (isFormSent()) {
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`,`refid`,`points`,`remote_ip`,`timemark`,`completed`,`is_ref`) VALUES (%s,%s,%s,'%s', UNIX_TIMESTAMP(), 'N','N')",
                                        array(
                                                getUserData('userid'),
-                                               makeZeroToNull(determineReferalId()),
+                                               convertZeroToNull(determineReferralId()),
                                                bigintval(postRequestElement('points') * 2),
                                                detectRemoteAddr()
                                        ), __FILE__, __LINE__);
@@ -115,17 +115,17 @@ if (isFormSent()) {
                                updateConfiguration('doubler_points', $points, '+');
                                incrementConfigEntry('doubler_points', $points);
 
-                               // Add second line for the referal but only when userid != refid
-                               if ((isValidUserId(determineReferalId())) && (determineReferalId() != getUserData('userid'))) {
+                               // Add second line for the referral but only when userid != refid
+                               if ((isValidUserId(determineReferralId())) && (determineReferralId() != getUserData('userid'))) {
                                        // Okay add a refid line and apply refid percents
                                        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`,`refid`,`points`,`remote_ip`,`timemark`,`completed`,`is_ref`) VALUES (%s,0,%s,'%s',UNIX_TIMESTAMP(),'N','Y')",
                                                array(
-                                                       makeZeroToNull(determineReferalId()),
+                                                       convertZeroToNull(determineReferralId()),
                                                        (postRequestElement('points') * 2 * getConfig('doubler_ref') / 100),
                                                        detectRemoteAddr()
                                                ), __FILE__, __LINE__);
 
-                                       // And that's why we don't want to you more than one referal level of doubler-points. ^^^
+                                       // And that's why we don't want to you more than one referral level of doubler-points. ^^^
                                } // END - if
 
                                // Update usage counter
@@ -191,7 +191,7 @@ if (isUserDataValid()) {
        $content['refid'] = getUserData('userid');
 } else {
        // Transfer userid/nickname to constant
-       $content['refid'] = determineReferalId();
+       $content['refid'] = determineReferralId();
 }
 
 // Text "Enter login"