From 9064861b7b3946aa16d73aa3975f4fe4d89a0d97 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 2 Apr 2011 02:29:48 +0000 Subject: Fixes #3208 setting time_created on update git-svn-id: http://code.elgg.org/elgg/trunk@8904 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/actions/blog/save.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/blog/actions/blog/save.php b/mod/blog/actions/blog/save.php index 3f9e5e355..c42845037 100644 --- a/mod/blog/actions/blog/save.php +++ b/mod/blog/actions/blog/save.php @@ -144,9 +144,8 @@ if (!$error) { add_to_river('river/object/blog/create', 'create', elgg_get_logged_in_user_guid(), $blog->getGUID()); if ($guid) { - $q = "UPDATE {$db_prefix}entities SET time_created = '$date' - WHERE guid = $guid"; - update_data($q); + $blog->time_created = time(); + $blog->save(); } } elseif ($old_status == 'published' && $status == 'draft') { $q = "DELETE FROM {$db_prefix}river -- cgit v1.2.3