aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 21:53:48 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 21:53:48 +0000
commitbe37104ac63cd25f2eac831ca03d6d2b19976e1c (patch)
tree5b168134f2b07933831daedd8cf2641ffb6c5c7d /engine/lib/entities.php
parentd45a24be28b2eb2d0c2731708b589788a5b87215 (diff)
downloadelgg-be37104ac63cd25f2eac831ca03d6d2b19976e1c.tar.gz
elgg-be37104ac63cd25f2eac831ca03d6d2b19976e1c.tar.bz2
Merged r6684:6694 from 1.7 branch to trunk (pages plugin was manually merged due to standardization of code in trunk but not branch)
git-svn-id: http://code.elgg.org/elgg/trunk@6848 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 1750f12e1..e6c2baa8e 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -801,7 +801,9 @@ abstract class ElggEntity implements
$this->attributes['subtype'] = get_subtype_id($this->attributes['type'], $this->attributes['subtype']);
// Cache object handle
- if ($this->attributes['guid']) cache_entity($this);
+ if ($this->attributes['guid']) {
+ cache_entity($this);
+ }
return $this->attributes['guid'];
}
@@ -1693,21 +1695,24 @@ function entity_row_to_elggstar($row) {
if (!($new_entity instanceof ElggEntity)) {
throw new ClassException(sprintf(elgg_echo('ClassException:ClassnameNotClass'), $classname, 'ElggEntity'));
}
- }
- else {
+ } else {
error_log(sprintf(elgg_echo('ClassNotFoundException:MissingClass'), $classname));
}
}
else {
switch ($row->type) {
case 'object' :
- $new_entity = new ElggObject($row); break;
+ $new_entity = new ElggObject($row);
+ break;
case 'user' :
- $new_entity = new ElggUser($row); break;
+ $new_entity = new ElggUser($row);
+ break;
case 'group' :
- $new_entity = new ElggGroup($row); break;
+ $new_entity = new ElggGroup($row);
+ break;
case 'site' :
- $new_entity = new ElggSite($row); break;
+ $new_entity = new ElggSite($row);
+ break;
default:
throw new InstallationException(sprintf(elgg_echo('InstallationException:TypeNotSupported'), $row->type));
}