aboutsummaryrefslogtreecommitdiff
path: root/mod/blog
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-02 02:29:48 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-02 02:29:48 +0000
commit9064861b7b3946aa16d73aa3975f4fe4d89a0d97 (patch)
tree2bc0b1faf3c50b879e310df01c41cb31d5788eca /mod/blog
parentda7dbb5d2d72d146dfdac71382afb63f2038432e (diff)
downloadelgg-9064861b7b3946aa16d73aa3975f4fe4d89a0d97.tar.gz
elgg-9064861b7b3946aa16d73aa3975f4fe4d89a0d97.tar.bz2
Fixes #3208 setting time_created on update
git-svn-id: http://code.elgg.org/elgg/trunk@8904 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog')
-rw-r--r--mod/blog/actions/blog/save.php5
1 files changed, 2 insertions, 3 deletions
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