diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-08-22 21:11:36 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-08-22 21:11:36 +0000 |
commit | d45a24be28b2eb2d0c2731708b589788a5b87215 (patch) | |
tree | d73568e65b05c42cc23b8c355a80907684be2cb5 /engine/lib/entities.php | |
parent | 46c278c3603765b623fa441e2435274fbeda05ad (diff) | |
download | elgg-d45a24be28b2eb2d0c2731708b589788a5b87215.tar.gz elgg-d45a24be28b2eb2d0c2731708b589788a5b87215.tar.bz2 |
Merged r6671:6683 from 1.7 branch to trunk
git-svn-id: http://code.elgg.org/elgg/trunk@6847 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r-- | engine/lib/entities.php | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index b684ae822..1750f12e1 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -212,18 +212,23 @@ abstract class ElggEntity implements */ public function set($name, $value) { if (array_key_exists($name, $this->attributes)) { - // Check that we're not trying to change the guid! - if ((array_key_exists('guid', $this->attributes)) && ($name=='guid')) { - return false; + // Certain properties should not be manually changed! + switch ($name) { + case 'guid': + case 'time_created': + case 'time_updated': + case 'last_action': + return FALSE; + break; + default: + $this->attributes[$name] = $value; + break; } - - $this->attributes[$name] = $value; - } - else { + } else { return $this->setMetaData($name, $value); } - return true; + return TRUE; } /** |