From 46ab365925f00ccff14d82d396619b359540fcd6 Mon Sep 17 00:00:00 2001 From: icewing Date: Tue, 29 Apr 2008 11:42:12 +0000 Subject: Marcus Povey * BUGFIX: Import functionality works, removed update but no change error on update git-svn-id: https://code.elgg.org/elgg/trunk@553 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 87ace72d7..d71cf2170 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -657,8 +657,15 @@ 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"); - } + $ret = update_data("UPDATE {$CONFIG->dbprefix}entities set owner_guid='$owner_guid', access_id='$access_id', time_updated='$time' WHERE guid=$guid"); + + // Handle cases where there was no error BUT no rows were updated! + if ($ret===false) + return false; + + return true; + } + } } -- cgit v1.2.3