aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-29 11:10:47 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-29 11:10:47 +0000
commitc57b6bb290fecd8c75b63ed360cf4b0d7ba0e791 (patch)
tree810baf0e812898a553b3e32b946c062943dcd969 /engine/lib/entities.php
parentfa763e03865b0426332c61f2f3cfa05c43347659 (diff)
downloadelgg-c57b6bb290fecd8c75b63ed360cf4b0d7ba0e791.tar.gz
elgg-c57b6bb290fecd8c75b63ed360cf4b0d7ba0e791.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Fixed incorrect if condition logic git-svn-id: https://code.elgg.org/elgg/trunk@550 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index b83b9f4b5..87ace72d7 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -654,7 +654,8 @@
$entity = get_entity($guid);
- if ($entity->canEdit()) {
+ if ($entity->canEdit()) {
+
if (trigger_event('update',$entity->type,$entity)) {
return update_data("UPDATE {$CONFIG->dbprefix}entities set owner_guid='$owner_guid', access_id='$access_id', time_updated='$time' WHERE guid=$guid");
}
@@ -976,10 +977,10 @@
}
} else {
$user = get_entity($user_guid);
- }
- if ($entity = get_entity($entity_guid) && !is_null($user)) {
+ }
+
+ if (($entity = get_entity($entity_guid)) && (!is_null($user))) {
- $entity = get_entity($entity_guid);
if ($entity->getOwner() == $user->getGUID()) return true;
if ($entity->type == "user" && $entity->getGUID() == $user->getGUID()) return true;