mirror of
https://github.com/friendica/friendica
synced 2024-11-10 09:02:53 +00:00
Fix not working unarchive contact batch action
This commit is contained in:
parent
7d5494dd67
commit
76c9d37006
1 changed files with 2 additions and 2 deletions
|
@ -138,7 +138,7 @@ class Contact extends BaseModule
|
|||
|
||||
$contacts_id = $_POST['contact_batch'];
|
||||
|
||||
$stmt = DBA::select('contact', ['id'], ['id' => $contacts_id, 'uid' => local_user(), 'self' => false]);
|
||||
$stmt = DBA::select('contact', ['id', 'archive'], ['id' => $contacts_id, 'uid' => local_user(), 'self' => false]);
|
||||
$orig_records = DBA::toArray($stmt);
|
||||
|
||||
$count_actions = 0;
|
||||
|
@ -336,7 +336,7 @@ class Contact extends BaseModule
|
|||
|
||||
private static function archiveContact($contact_id, $orig_record)
|
||||
{
|
||||
$archived = (($orig_record['archive']) ? 0 : 1);
|
||||
$archived = (defaults($orig_record, 'archive', '') ? 0 : 1);
|
||||
$r = DBA::update('contact', ['archive' => $archived], ['id' => $contact_id, 'uid' => local_user()]);
|
||||
|
||||
return DBA::isResult($r);
|
||||
|
|
Loading…
Reference in a new issue