aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-16 06:49:24 -0700
committerFriendika <info@friendika.com>2011-09-16 06:49:24 -0700
commit9c3503a706d445bcbf7a14c2adcd8d344df3e46b (patch)
treedb8b035c53bfcde8ec9c3efa18b9080f5bfdec24
parent80f94bb12bd6d445554579def2bec0de333e4fb2 (diff)
downloadvolse-hubzilla-9c3503a706d445bcbf7a14c2adcd8d344df3e46b.tar.gz
volse-hubzilla-9c3503a706d445bcbf7a14c2adcd8d344df3e46b.tar.bz2
volse-hubzilla-9c3503a706d445bcbf7a14c2adcd8d344df3e46b.zip
update timestamp on activity change (comment/like)
-rw-r--r--include/items.php7
-rw-r--r--mod/item.php6
2 files changed, 13 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index facd8b2d4..735adc717 100644
--- a/include/items.php
+++ b/include/items.php
@@ -865,6 +865,13 @@ function item_store($arr,$force_parent = false) {
intval($current_post)
);
+ // update the timestamp on the parent
+
+ q("UPDATE `item` set `changed` = '%s' WHERE `id` = %d LIMIT 1",
+ dbesc(datetime_convert()),
+ intval($parent_id)
+ );
+
if($dsprsig) {
q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
intval($current_post),
diff --git a/mod/item.php b/mod/item.php
index 025a12a32..38f4c2040 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -803,6 +803,12 @@ function item_post(&$a) {
// NOTREACHED
}
+ // update the timestamp on the parent
+
+ q("UPDATE `item` set `changed` = '%s' WHERE `id` = %d LIMIT 1",
+ dbesc(datetime_convert()),
+ intval($parent)
+ );
$datarray['id'] = $post_id;
$datarray['plink'] = $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id;