Changeset 26422


Ignore:
Timestamp:
06/21/10 16:54:06 (7 years ago)
Author:
flack
Message:

make leaf cache work correctly, refs #359

Location:
branches/developers/flack/acltuning/midcom.core/midcom
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/developers/flack/acltuning/midcom.core/midcom/helper/_basicnav.php

    r26415 r26422  
    662662        $entry_name = "{$node[MIDCOM_NAV_ID]}-leaves";
    663663
    664         $leaves = false;//$this->_nap_cache->get_leaves($entry_name);
    665 
    666         if (!$leaves)
     664        $leaves = $this->_nap_cache->get_leaves($entry_name);
     665
     666        if (false === $leaves)
    667667        {
    668668            debug_push_class(__CLASS__, __FUNCTION__);
  • branches/developers/flack/acltuning/midcom.core/midcom/services/cache/module/nap.php

    r26415 r26422  
    212212            }
    213213        }
     214        else if (is_array($data))
     215        {
     216            $result = $data;
     217        }
    214218
    215219        return $result;
     
    267271        {
    268272            //workaround for a strange bug where all ids in Memcache are 0
    269             if (   isset($data[MIDCOM_NAV_OBJECT])
    270                 && is_object($data[MIDCOM_NAV_OBJECT])
    271                 && $data[MIDCOM_NAV_OBJECT]->guid)
     273            if (   isset($node[MIDCOM_NAV_OBJECT])
     274                && is_object($node[MIDCOM_NAV_OBJECT])
     275                && $node[MIDCOM_NAV_OBJECT]->guid)
    272276            {
    273277               
    274                 $data[MIDCOM_NAV_LEAF_DB_ID] = $data[MIDCOM_NAV_OBJECT]->id;
     278                $data[$id][MIDCOM_NAV_LEAF_DB_ID] = $node[MIDCOM_NAV_OBJECT]->id;
    275279            }
    276280        }
Note: See TracChangeset for help on using the changeset viewer.