From 0c1fecb0f73fd678defa4d9eef74d29940d284a6 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 19 Oct 2011 15:41:21 +0200 Subject: [PATCH] Fixed a few issues with object type cache --- .../files/lib/data/object/type/ObjectTypeCache.class.php | 5 +++-- .../system/cache/builder/ObjectTypeCacheBuilder.class.php | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/data/object/type/ObjectTypeCache.class.php b/wcfsetup/install/files/lib/data/object/type/ObjectTypeCache.class.php index 1c63ed3dc5..42e76b6198 100644 --- a/wcfsetup/install/files/lib/data/object/type/ObjectTypeCache.class.php +++ b/wcfsetup/install/files/lib/data/object/type/ObjectTypeCache.class.php @@ -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('
'.print_r($this->groupedObjectTypes, true));
 			return $this->groupedObjectTypes[$definitionName];
 		}
 		
diff --git a/wcfsetup/install/files/lib/system/cache/builder/ObjectTypeCacheBuilder.class.php b/wcfsetup/install/files/lib/system/cache/builder/ObjectTypeCacheBuilder.class.php
index 63102280f5..f03b86c460 100644
--- a/wcfsetup/install/files/lib/system/cache/builder/ObjectTypeCacheBuilder.class.php
+++ b/wcfsetup/install/files/lib/system/cache/builder/ObjectTypeCacheBuilder.class.php
@@ -1,5 +1,6 @@