Fix for 'ref_system'
authorRoland Häder <roland@mxchange.org>
Mon, 22 Dec 2008 18:42:48 +0000 (18:42 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 22 Dec 2008 18:42:48 +0000 (18:42 +0000)
inc/databases.php
inc/libs/rallye_functions.php
inc/loader/load_cache-refsystem.php

index 77d3bd1..be879c1 100644 (file)
@@ -115,7 +115,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // Current SVN revision
-define('CURR_SVN_REVISION', "700");
+define('CURR_SVN_REVISION', "701");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index c313fa7..ac949d0 100644 (file)
@@ -743,15 +743,15 @@ function RALLYE_GET_REFCOUNT($uid, $old=0) {
        if (GET_EXT_VERSION("cache") >= "0.1.2") {
                // Get refs from cache
                $cnt = 0;
-               foreach ($cacheArray['ref_system']['userid'] as $id => $u_id) {
+               foreach ($cacheArray['refsystem']['userid'] as $id => $u_id) {
                        // Do we have a ref for this user?
-                       //* DEBUG: */ echo "id={$id},u_id={$u_id},uid={$uid},old={$old},level={$cacheArray['ref_system']['level'][$id]}<br />\n";
-                       if (($u_id == $uid) && ($cacheArray['ref_system']['level'][$id] == 1)) {
+                       //* DEBUG: */ echo "id={$id},u_id={$u_id},uid={$uid},old={$old},level={$cacheArray['refsystem']['level'][$id]}<br />\n";
+                       if (($u_id == $uid) && ($cacheArray['refsystem']['level'][$id] == 1)) {
                                //* DEBUG: */ echo "uid matches!<br />\n";
                                foreach ($cacheArray['ref_depths']['level'] as $level) {
-                                       if (($level == $cacheArray['ref_system']['level'][$id]) && ($level == 1)) {
+                                       if (($level == $cacheArray['refsystem']['level'][$id]) && ($level == 1)) {
                                                // Level does exist so abort here
-                                               $cnt = $cacheArray['ref_system']['counter'][$id];
+                                               $cnt = $cacheArray['refsystem']['counter'][$id];
                                                //* DEBUG: */ echo "*".$uid."/".$cnt."*<br />";
                                                break;
                                        } elseif ($level > 1) {
@@ -765,7 +765,7 @@ function RALLYE_GET_REFCOUNT($uid, $old=0) {
                        }
                }
                //* DEBUG: */ echo "<PRE>";
-               //* DEBUG: */ print_r($cacheArray['ref_system']);
+               //* DEBUG: */ print_r($cacheArray['refsystem']);
                //* DEBUG: */ echo "</PRE>";
                //* DEBUG: */ die();
 
index 4c17522..5025371 100644 (file)
@@ -44,7 +44,7 @@ global $cacheInstance;
 if (($cacheInstance->loadCacheFile("refsystem")) && ($cacheInstance->extensionVersionMatches("sql_patches"))) {
        // Load referal system from cache
        global $cacheArray;
-       $cacheArray['ref_system'] = $cacheInstance->getArrayFromCache();
+       $cacheArray['refsystem'] = $cacheInstance->getArrayFromCache();
 } elseif ((getConfig('cache_refsys') == "Y") && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file here
        $cacheInstance->init("REFSYSTEM");