]> git.mxchange.org Git - mailer.git/blobdiff - inc/gen_refback.php
ext-refback is now longer essential for the referal system, please make sure that...
[mailer.git] / inc / gen_refback.php
index 9f137f0bfd6cfd330a9c9102851226a65c6b2c55..fa4a874aca402f6104063845072ecb9e3118b88d 100644 (file)
@@ -40,9 +40,6 @@ if (!defined('__SECURITY')) {
        die();
 } // END - if
 
-// Make sure our functions are there
-loadIncludeOnce('inc/libs/refback_functions.php');
-
 // Sanity-check: Do we have ref level 0?
 $result = SQL_QUERY('SELECT `id` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `level`=0 OR `level` IS NULL', __FILE__, __LINE__);
 if (!SQL_HASZERONUMS($result)) {
@@ -67,13 +64,13 @@ SQL_QUERY('TRUNCATE TABLE `{?_MYSQL_PREFIX?}_user_refs`', __FILE__, __LINE__);
 
 // Begin with all users in level one
 $result_direct = SQL_QUERY('SELECT
-       u.userid
+       `userid`
 FROM
-       `{?_MYSQL_PREFIX?}_user_data` AS u
+       `{?_MYSQL_PREFIX?}_user_data`
 WHERE
-       u.refid=0
+       `refid`=0
 ORDER BY
-       u.userid ASC', __FILE__, __LINE__);
+       `userid` ASC', __FILE__, __LINE__);
 
 // Do we have entries?
 if (!SQL_HASZERONUMS($result_direct)) {
@@ -81,7 +78,7 @@ if (!SQL_HASZERONUMS($result_direct)) {
        while ($content = SQL_FETCHARRAY($result_direct)) {
                // Update refback table
                //* DEBUG: */ debugOutput('userid=' . $content['userid']);
-               updateRefbackTable($content['userid']);
+               updateReferalTable($content['userid']);
        } // END - while
 } // END - if