]> git.mxchange.org Git - friendica.git/commitdiff
update timestamp on activity change (comment/like)
authorFriendika <info@friendika.com>
Fri, 16 Sep 2011 13:49:24 +0000 (06:49 -0700)
committerFriendika <info@friendika.com>
Fri, 16 Sep 2011 13:49:24 +0000 (06:49 -0700)
include/items.php
mod/item.php

index facd8b2d4df313e9ed99b2fa24ead393dd2d6873..735adc7170f542801c3e55295a88ae0eb38f873f 100644 (file)
@@ -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),
index 025a12a323bce58d507241a4892accd960e3bf43..38f4c204010854c133c60751aefab0db5127dd32 100644 (file)
@@ -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;