From 9064861b7b3946aa16d73aa3975f4fe4d89a0d97 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 2 Apr 2011 02:29:48 +0000 Subject: Fixes #3208 setting time_created on update git-svn-id: http://code.elgg.org/elgg/trunk@8904 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ElggEntity.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engine/classes/ElggEntity.php') diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php index 41f19a4c1..cfdaede71 100644 --- a/engine/classes/ElggEntity.php +++ b/engine/classes/ElggEntity.php @@ -95,6 +95,7 @@ abstract class ElggEntity extends ElggData implements $this->attributes['site_guid'] = NULL; $this->attributes['access_id'] = ACCESS_PRIVATE; + $this->attributes['time_created'] = NULL; $this->attributes['time_updated'] = NULL; $this->attributes['last_action'] = NULL; $this->attributes['enabled'] = "yes"; @@ -222,7 +223,6 @@ abstract class ElggEntity extends ElggData implements // Certain properties should not be manually changed! switch ($name) { case 'guid': - case 'time_created': case 'time_updated': case 'last_action': return FALSE; @@ -1244,7 +1244,8 @@ abstract class ElggEntity extends ElggData implements $this->get('guid'), $this->get('owner_guid'), $this->get('access_id'), - $this->get('container_guid') + $this->get('container_guid'), + $this->get('time_created') ); } else { // Create a new entity (nb: using attribute array directly -- cgit v1.2.3