Fixed a few issues with object type cache
authorAlexander Ebert <ebert@woltlab.com>
Wed, 19 Oct 2011 13:41:21 +0000 (15:41 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 19 Oct 2011 13:41:21 +0000 (15:41 +0200)
wcfsetup/install/files/lib/data/object/type/ObjectTypeCache.class.php
wcfsetup/install/files/lib/system/cache/builder/ObjectTypeCacheBuilder.class.php

index 1c63ed3dc57f65ef8078a9915d09a3ab74f311ab..42e76b61986bf04c3299427393ce2547fd038270 100644 (file)
@@ -43,7 +43,7 @@ class ObjectTypeCache extends SingletonFactory {
         */
        protected function init() {
                // get definition cache
-               CacheHandler::getInstance()->addResource('objectType-'.PACKAGE_ID, WBB_DIR.'cache/cache.objectType-'.PACKAGE_ID.'.php', 'wcf\system\cache\builder\ObjectTypeCacheBuilder');
+               CacheHandler::getInstance()->addResource('objectType-'.PACKAGE_ID, WCF_DIR.'cache/cache.objectType-'.PACKAGE_ID.'.php', 'wcf\system\cache\builder\ObjectTypeCacheBuilder');
                $this->definitions = CacheHandler::getInstance()->get('objectType-'.PACKAGE_ID, 'definitions');
                foreach ($this->definitions as $definition) {
                        $this->definitionsByName[$definition->definitionName] = $definition;
@@ -57,7 +57,7 @@ class ObjectTypeCache extends SingletonFactory {
                                $this->groupedObjectTypes[$definition->definitionName] = array();
                        }
                        
-                       $this->groupedObjectTypes[$definition->definitionName][$objectType->objectTypeName] = $objectType;
+                       $this->groupedObjectTypes[$definition->definitionName][$objectType->objectType] = $objectType;
                }
        }
        
@@ -111,6 +111,7 @@ class ObjectTypeCache extends SingletonFactory {
         */
        public function getObjectTypes($definitionName) {
                if (isset($this->groupedObjectTypes[$definitionName])) {
+                       die('<pre>'.print_r($this->groupedObjectTypes, true));
                        return $this->groupedObjectTypes[$definitionName];
                }
                
index 63102280f5fb982006b2861d932835b27a4557a9..f03b86c460bcfdff725d34e0801b30a5dfd6432f 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 namespace wcf\system\cache\builder;
+use wcf\data\object\type\ObjectType;
 use wcf\data\object\type\definition\ObjectTypeDefinition;
 use wcf\system\WCF;