Depublish public posts when archiving a contact
This commit is contained in:
parent
7de5c7ebe1
commit
2871fd4793
|
@ -169,6 +169,7 @@ function mark_for_death($contact) {
|
||||||
q("update contact set `archive` = 1 where id = %d limit 1",
|
q("update contact set `archive` = 1 where id = %d limit 1",
|
||||||
intval($contact['id'])
|
intval($contact['id'])
|
||||||
);
|
);
|
||||||
|
q("UPDATE `item` SET `private` = 2 WHERE `contact-id` = %d AND `uid` = %d", intval($contact['id']), intval($contact['uid']));
|
||||||
|
|
||||||
//contact_remove($contact['id']);
|
//contact_remove($contact['id']);
|
||||||
|
|
||||||
|
|
|
@ -211,6 +211,9 @@ function contacts_content(&$a) {
|
||||||
intval($contact_id),
|
intval($contact_id),
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
|
if ($archived) {
|
||||||
|
q("UPDATE `item` SET `private` = 2 WHERE `contact-id` = %d AND `uid` = %d", intval($contact_id), intval(local_user()));
|
||||||
|
}
|
||||||
if($r) {
|
if($r) {
|
||||||
//notice( t('Contact has been ') . (($archived) ? t('archived') : t('unarchived')) . EOL );
|
//notice( t('Contact has been ') . (($archived) ? t('archived') : t('unarchived')) . EOL );
|
||||||
info( (($archived) ? t('Contact has been archived') : t('Contact has been unarchived')) . EOL );
|
info( (($archived) ? t('Contact has been archived') : t('Contact has been unarchived')) . EOL );
|
||||||
|
|
Loading…
Reference in a new issue