]> git.mxchange.org Git - mailer.git/blobdiff - inc/loader/load-refsystem.php
Large code cleanups:
[mailer.git] / inc / loader / load-refsystem.php
index 9e96d7de394a0e38ada584a088ae393ffc5565b6..5215581fd86e39d294960498b9412c5e7c8a0c96 100644 (file)
@@ -43,16 +43,27 @@ if (!defined('__SECURITY')) {
        return;
 }
 
-// Next cached table is the referal system (refsystem)...
+// Next cached table is the referral system (refsystem)...
 if (($GLOBALS['cache_instance']->loadCacheFile('refsystem')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
-       // Load referal system from cache
+       // Load referral system from cache
        $GLOBALS['cache_array']['refsystem'] = $GLOBALS['cache_instance']->getArrayFromCache();
 } elseif (isHtmlOutputMode()) {
        // Create cache file here
        $GLOBALS['cache_instance']->init();
 
-       // Load all modules and their data
-       $result = SQL_QUERY('SELECT `id`,`userid`,`level`,`counter` FROM `{?_MYSQL_PREFIX?}_refsystem` ORDER BY `userid` ASC, `level` ASC', __FILE__, __LINE__);
+       // Query for all referrals
+       $result = SQL_QUERY('SELECT
+       `id`,
+       `userid`,
+       `level`,
+       `counter`
+FROM
+       `{?_MYSQL_PREFIX?}_refsystem`
+ORDER BY
+       `userid` ASC,
+       `level` ASC', __FILE__, __LINE__);
+
+       // Load all entries
        while ($content = SQL_FETCHARRAY($result)) {
                // Add row to cache file
                $GLOBALS['cache_instance']->addRow($content);