only update the 'changed' timestamp for recent item_store events
This commit is contained in:
parent
b407074281
commit
5833bb3bd4
@ -1847,8 +1847,11 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
|
|||||||
|
|
||||||
call_hooks('post_remote_end',$arr);
|
call_hooks('post_remote_end',$arr);
|
||||||
|
|
||||||
// update the commented timestamp on the parent
|
// update the commented timestamp on the parent - unless this is potentially a 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($arr['created'] > datetime_convert('','','now - 4 days')) {
|
||||||
$z = q("select max(created) as commented from item where parent_mid = '%s' and uid = %d and item_delayed = 0 ",
|
$z = q("select max(created) as commented from item where parent_mid = '%s' and uid = %d and item_delayed = 0 ",
|
||||||
dbesc($arr['parent_mid']),
|
dbesc($arr['parent_mid']),
|
||||||
intval($arr['uid'])
|
intval($arr['uid'])
|
||||||
@ -1859,6 +1862,7 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
|
|||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
intval($parent_id)
|
intval($parent_id)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// If _creating_ a deleted item, don't propagate it further or send out notifications.
|
// If _creating_ a deleted item, don't propagate it further or send out notifications.
|
||||||
|
Reference in New Issue
Block a user