goaway($a->get_baseurl(true) . '/contacts');
return; // NOTREACHED
}
-
+
if($cmd === 'update') {
_contact_update($contact_id);
goaway($a->get_baseurl(true) . '/contacts/' . $contact_id);
if($cmd === 'block') {
$r = _contact_block($contact_id, $orig_record[0]);
if($r) {
- info( (($blocked) ? t('Contact has been blocked') : t('Contact has been unblocked')) . EOL );
+ $blocked = (($orig_record[0]['blocked']) ? 0 : 1);
+ info((($blocked) ? t('Contact has been blocked') : t('Contact has been unblocked')).EOL);
}
-
+
goaway($a->get_baseurl(true) . '/contacts/' . $contact_id);
return; // NOTREACHED
}
if($cmd === 'ignore') {
$r = _contact_ignore($contact_id, $orig_record[0]);
if($r) {
- info( (($readonly) ? t('Contact has been ignored') : t('Contact has been unignored')) . EOL );
+ $readonly = (($orig_record[0]['readonly']) ? 0 : 1);
+ info((($readonly) ? t('Contact has been ignored') : t('Contact has been unignored')).EOL);
}
-
+
goaway($a->get_baseurl(true) . '/contacts/' . $contact_id);
return; // NOTREACHED
}
if($cmd === 'archive') {
$r = _contact_archive($contact_id, $orig_record[0]);
if($r) {
- info( (($archived) ? t('Contact has been archived') : t('Contact has been unarchived')) . EOL );
- }
-
+ $archived = (($orig_record[0]['archive']) ? 0 : 1);
+ info((($archived) ? t('Contact has been archived') : t('Contact has been unarchived')).EOL);
+ }
+
goaway($a->get_baseurl(true) . '/contacts/' . $contact_id);
return; // NOTREACHED
}