aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-03-24 09:12:48 +0100
committerMario Vavti <mario@mariovavti.com>2018-03-24 09:12:48 +0100
commit9f9b9dfd82fa518961b11387e3a6c3e048280acc (patch)
tree51f310e1b99b5a8e87d8c349b44f73ea7c3ba6e0
parent09567da292e4ff1eb89a781b685b26b2f9ba82b4 (diff)
parentabe6ab477531916158c04e3d387cb02e839d28b6 (diff)
downloadvolse-hubzilla-9f9b9dfd82fa518961b11387e3a6c3e048280acc.tar.gz
volse-hubzilla-9f9b9dfd82fa518961b11387e3a6c3e048280acc.tar.bz2
volse-hubzilla-9f9b9dfd82fa518961b11387e3a6c3e048280acc.zip
Merge remote-tracking branch 'mike/master' into dev
-rwxr-xr-xinclude/items.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index 53d1a3c02..a2068868a 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1977,11 +1977,19 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
*/
call_hooks('post_remote_end', $arr);
+ $update_parent = true;
+
// update the commented timestamp on the parent - unless this is a moderated comment or a potential clone of an older item
// which we don't wish to bring to the surface. As the queue only holds deliveries for 3 days, it's
// suspected of being an older cloned item if the creation time is older than that.
- if((intval($arr['item_blocked']) != ITEM_MODERATED) || ($arr['created'] > datetime_convert('','','now - 4 days'))) {
+ if(intval($arr['item_blocked']) === ITEM_MODERATED)
+ $update_parent = false;
+
+ if($arr['created'] < datetime_convert('','','now - 4 days'))
+ $update_parent = false;
+
+ if($update_parent) {
$z = q("select max(created) as commented from item where parent_mid = '%s' and uid = %d and item_delayed = 0 ",
dbesc($arr['parent_mid']),
intval($arr['uid'])