aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2012-01-04 15:05:21 -0800
committerBrett Profitt <brett.profitt@gmail.com>2012-01-04 15:05:21 -0800
commit24a369c78df14469097dd440bba3cee087a39e7b (patch)
treee41123d9dbdbc2b0d813f3ec82dc115d93868290 /engine
parent25d11f6cdcc200ae00332197c9bd86858e3620b8 (diff)
downloadelgg-24a369c78df14469097dd440bba3cee087a39e7b.tar.gz
elgg-24a369c78df14469097dd440bba3cee087a39e7b.tar.bz2
Fixes #3710. Returning false from update, <type> event no longer deletes entity.
Returning false from create, <type> still deletes the entity because of the "return false to halt events" approach. This will be reviewed for #3784.
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/objects.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/engine/lib/objects.php b/engine/lib/objects.php
index 63d0f5cef..f186c66cb 100644
--- a/engine/lib/objects.php
+++ b/engine/lib/objects.php
@@ -52,11 +52,8 @@ function create_object_entity($guid, $title, $description) {
if ($result != false) {
// Update succeeded, continue
$entity = get_entity($guid);
- if (elgg_trigger_event('update', $entity->type, $entity)) {
- return $guid;
- } else {
- $entity->delete();
- }
+ elgg_trigger_event('update', $entity->type, $entity);
+ return $guid;
}
} else {
// Update failed, attempt an insert.