More fixes on cache to reduce queries
[mailer.git] / inc / libs / rallye_functions.php
index e67677e419cd6082706fbbc28e779f21cbe559a2..69dc4de3b288695f2e0a66bfd9bb99475a801c42 100644 (file)
@@ -770,22 +770,22 @@ function RALLYE_TEMPLATE_SELECTION($name="template", $default="")
 //
 function RALLYE_GET_REFCOUNT($uid, $old=0)
 {
-       global $REF_SYSTEM, $REF_DEPTHS, $_CONFIG;
+       global $_CONFIG;
        // Check current refs
        if (GET_EXT_VERSION("cache") >= "0.1.2")
        {
                // Get refs from cache
                $cnt = 0;
-               foreach ($REF_SYSTEM['userid'] as $id=>$u_id)
+               foreach ($cacheArray['ref_system']['userid'] as $id=>$u_id)
                {
-                       if (($u_id == $uid) && ($REF_SYSTEM['level'][$id] == 0))
+                       if (($u_id == $uid) && ($cacheArray['ref_system']['level'][$id] == 0))
                        {
-                               foreach ($REF_DEPTHS['level'] as $level)
+                               foreach ($cacheArray['ref_depths']['level'] as $level)
                                {
-                                       if (($level == $REF_SYSTEM['level'][$id]) && ($level == 0))
+                                       if (($level == $cacheArray['ref_system']['level'][$id]) && ($level == 0))
                                        {
                                                // Level does exist so abort here
-                                               $cnt = $REF_SYSTEM['counter'][$id];
+                                               $cnt = $cacheArray['ref_system']['counter'][$id];
                                                //* DEBUG: */ echo "*".$uid."/".$cnt."*<br />";
                                                break;
                                        }
@@ -800,7 +800,7 @@ function RALLYE_GET_REFCOUNT($uid, $old=0)
                        }
                }
                //* DEBUG: */ echo "<PRE>";
-               //* DEBUG: */ print_r($REF_SYSTEM);
+               //* DEBUG: */ print_r($cacheArray['ref_system']);
                //* DEBUG: */ echo "</PRE>";
                //* DEBUG: */ die();