diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-13 22:59:43 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-10-13 22:59:43 +0000 |
commit | bda4f8190d4add0a2e2cfcdf3e842b26665f4117 (patch) | |
tree | b1b4bdee5f8ca3bdc7fa1657b894cc694fd61367 /engine/lib/entities.php | |
parent | 0ee6d7c936b930d846919e72c70f21c7f0e1d9ac (diff) | |
download | elgg-bda4f8190d4add0a2e2cfcdf3e842b26665f4117.tar.gz elgg-bda4f8190d4add0a2e2cfcdf3e842b26665f4117.tar.bz2 |
Standardized users and entities.
Fleshed out elgg_set_ignore_access() and elgg_get_ignore_access()
git-svn-id: http://code.elgg.org/elgg/trunk@3533 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r-- | engine/lib/entities.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 51d5cac25..211fbc05c 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1951,7 +1951,7 @@ function delete_entity($guid, $recursive = true) { $guid = (int)$guid; if ($entity = get_entity($guid)) { - if (trigger_elgg_event('delete',$entity->type,$entity)) { + if (trigger_elgg_event('delete', $entity->type, $entity)) { if ($entity->canEdit()) { // Delete contained owned and otherwise releated objects (depth first) @@ -2001,8 +2001,9 @@ function delete_entity($guid, $recursive = true) { break; } - if ($sub_table) + if ($sub_table) { delete_data("DELETE from $sub_table where guid={$guid}"); + } } return $res; @@ -2227,11 +2228,14 @@ function can_edit_entity($entity_guid, $user_guid = 0) { $return = true; } if ($container_entity = get_entity($entity->container_guid)) { - if ($container_entity->canEdit()) $return = true; + if ($container_entity->canEdit()) { + $return = true; + } } } - return trigger_plugin_hook('permissions_check', $entity->type,array('entity' => $entity, 'user' => $user), $return); + return trigger_plugin_hook('permissions_check', $entity->type, + array('entity' => $entity, 'user' => $user), $return); } else { return false; @@ -2964,7 +2968,8 @@ function recursive_delete_permissions_check($hook, $entity_type, $returnvalue, $ return true; } - return false; + // consult next function + return NULL; } /** |