From 61274b8cec92ee86dec24c99fd6ef180c1681ab2 Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Fri, 1 Jun 2012 17:02:18 -0400 Subject: Fixes #4290: adds volatile metadata cache, unit tests, and pre-loading for fetched entities --- engine/classes/ElggPlugin.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'engine/classes/ElggPlugin.php') diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php index 8c9093834..3e43c8e81 100644 --- a/engine/classes/ElggPlugin.php +++ b/engine/classes/ElggPlugin.php @@ -101,7 +101,6 @@ class ElggPlugin extends ElggObject { $missing_attributes = array_diff_key($expected_attributes, $row); if ($missing_attributes) { $needs_loaded = true; - $old_guid = $guid; $guid = $row['guid']; } else { $this->attributes = $row; @@ -132,10 +131,7 @@ class ElggPlugin extends ElggObject { // guid needs to be an int http://trac.elgg.org/ticket/4111 $this->attributes['guid'] = (int)$this->attributes['guid']; - // cache the entity - if ($this->attributes['guid']) { - cache_entity($this); - } + cache_entity($this); return true; } -- cgit v1.2.3