the old item must be removed before the new is created
This commit is contained in:
parent
4379354021
commit
e4e990df06
@ -987,11 +987,18 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid,
|
|||||||
dbesc($jsonobject)
|
dbesc($jsonobject)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
if($y) {
|
if($y) {
|
||||||
$update = true;
|
$update = true;
|
||||||
$object['d_mid'] = $y[0]['mid']; //attach mid of the old object
|
$object['d_mid'] = $y[0]['mid']; //attach mid of the old object
|
||||||
$u_jsonobject = json_encode($object);
|
$u_jsonobject = json_encode($object);
|
||||||
|
|
||||||
|
//we have got the relevant info - delete the old item before we create the new one
|
||||||
|
$z = q("DELETE FROM item WHERE obj_type = '%s' AND verb = '%s' AND mid = '%s'",
|
||||||
|
dbesc(ACTIVITY_OBJ_FILE),
|
||||||
|
dbesc(ACTIVITY_POST),
|
||||||
|
dbesc($y[0]['mid'])
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($update && $verb == 'post' ) {
|
if($update && $verb == 'post' ) {
|
||||||
|
Reference in New Issue
Block a user