diff options
author | Friendika <info@friendika.com> | 2011-08-22 20:35:34 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-08-22 20:35:34 -0700 |
commit | b9e4668f68321bd767dfffb626be940e0b1be460 (patch) | |
tree | e70872f5a50e7d208cb0bd0d8812347dbb82ed72 /mod | |
parent | b0211499c1990792eaa501e86c984d67d4cd4f39 (diff) | |
download | volse-hubzilla-b9e4668f68321bd767dfffb626be940e0b1be460.tar.gz volse-hubzilla-b9e4668f68321bd767dfffb626be940e0b1be460.tar.bz2 volse-hubzilla-b9e4668f68321bd767dfffb626be940e0b1be460.zip |
d* retractions
Diffstat (limited to 'mod')
-rw-r--r-- | mod/contacts.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index efb0dc75b..4d9385026 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -163,9 +163,9 @@ function contacts_content(&$a) { if($cmd === 'block') { $blocked = (($orig_record[0]['blocked']) ? 0 : 1); $r = q("UPDATE `contact` SET `blocked` = %d WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($blocked), - intval($contact_id), - intval(local_user()) + intval($blocked), + intval($contact_id), + intval(local_user()) ); if($r) { //notice( t('Contact has been ') . (($blocked) ? t('blocked') : t('unblocked')) . EOL ); @@ -178,9 +178,9 @@ function contacts_content(&$a) { if($cmd === 'ignore') { $readonly = (($orig_record[0]['readonly']) ? 0 : 1); $r = q("UPDATE `contact` SET `readonly` = %d WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($readonly), - intval($contact_id), - intval(local_user()) + intval($readonly), + intval($contact_id), + intval(local_user()) ); if($r) { info( (($readonly) ? t('Contact has been ignored') : t('Contact has been unignored')) . EOL ); @@ -193,7 +193,7 @@ function contacts_content(&$a) { // create an unfollow slap - if($orig_record[0]['network'] === 'stat') { + if($orig_record[0]['network'] === NETWORK_OSTATUS) { $tpl = get_markup_template('follow_slap.tpl'); $slap = replace_macros($tpl, array( '$name' => $a->user['username'], @@ -215,13 +215,15 @@ function contacts_content(&$a) { slapper($a->user,$orig_record[0]['notify'],$slap); } } - - if($orig_record[0]['network'] === 'dfrn') { + elseif($orig_record[0]['network'] === NETWORK_DIASPORA) { + require_once('include/diaspora.php'); + diaspora_unshare($a->user,$orig_record[0]); + } + elseif($orig_record[0]['network'] === NETWORK_DFRN) { require_once('include/items.php'); dfrn_deliver($a->user,$orig_record[0],'placeholder', 1); } - contact_remove($orig_record[0]['id']); info( t('Contact has been removed.') . EOL ); goaway($a->get_baseurl() . '/contacts'); |