]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/refback_functions.php
More templates rewritten
[mailer.git] / inc / libs / refback_functions.php
index 6e5c9112ba2130e48541d207817a57214236657a..83aa8a9e3621b54ff20e26bc8ea6cf4db0690b8a 100644 (file)
@@ -170,7 +170,7 @@ function UPDATE_REFBACK_TABLE($uid) {
        //* DEBUG: */ print "----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n";
        global $cacheArray, $cacheInstance;
 
-       // Make it sure referral level zero (member him-/herself) is at least selected
+       // Make it sure referal level zero (member him-/herself) is at least selected
        if (empty($cacheArray['back_level'])) $cacheArray['back_level'] = 1;
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$cacheArray['back_level']}<br />\n";
 
@@ -178,7 +178,7 @@ function UPDATE_REFBACK_TABLE($uid) {
        $cacheArray['up_refid'][$cacheArray['back_level']] = 0;
        $old = 0; $minus = 0;
 
-       // Check for his referral
+       // Check for his referal
        $result_refid = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE refid=%s ORDER BY userid ASC",
                array(bigintval($uid)), __FILE__, __LINE__);
 
@@ -214,7 +214,7 @@ function UPDATE_REFBACK_TABLE($uid) {
                                        $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_refs (userid,level,refid) VALUES (%s,%s,%s)",
                                                array(bigintval($uid), $cacheArray['back_level'], bigintval($cacheArray['up_refid'][$cacheArray['back_level']])), __FILE__, __LINE__);
 
-                                       // Move to next referral level and count his counter one up!
+                                       // Move to next referal level and count his counter one up!
                                        $cacheArray['back_level']++; UPDATE_REFBACK_TABLE($cacheArray['up_refid'][($cacheArray['back_level'] - 1)]);
                                } // END - if
 
@@ -243,7 +243,7 @@ function UPDATE_REFBACK_TABLE($uid) {
                SQL_FREERESULT($result_refid);
        } // END - if
 
-       // When he has a referral...
+       // When he has a referal...
        if ((($cacheArray['up_refid'][$cacheArray['back_level']] == $uid) || ($cacheArray['up_refid'][$cacheArray['back_level']] == 0)) && (GET_EXT_VERSION("cache") >= "0.1.2") && (!isset($cacheArray['back_cached']))) {
                // Remove cache here
                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},ref={$cacheArray['up_refid'][$cacheArray['back_level']]} - CACHE!<br />\n";
@@ -267,7 +267,7 @@ function GET_USER_REFS ($uid, $level) {
        $ADD = "";
        $refs = array();
 
-       // Do we have nickname installed?
+       // Do we have nickname extension installed?
        if (EXT_IS_ACTIVE("nickname")) {
                $ADD = ", d.nickname";
        } // END - if
@@ -334,7 +334,7 @@ function REFBACK_CHANGE_MEMBER_PERCENTS ($id, $percents) {
                // No member!
                $status['message'] = MEMBER_REFBACK_ERROR_NO_MEMBER;
                return $status;
-       } elseif ("".$id."" != "".bigintval($id)."") {
+       } elseif ("".$id."" != "".($id + 0)."") {
                // No number!
                $status['message'] = MEMBER_REFBACK_ERROR_INVALID_ID_NUMBER;
                return $status;