mirror of
https://github.com/friendica/friendica
synced 2025-04-27 12:30:11 +00:00
Detect and remove contact duplicates
This commit is contained in:
parent
636325efcc
commit
79b64cc44f
15 changed files with 281 additions and 60 deletions
|
@ -23,6 +23,7 @@ namespace Friendica\Console;
|
|||
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Model\Contact;
|
||||
|
||||
/**
|
||||
* tool to find and merge duplicated contact entries.
|
||||
|
@ -137,7 +138,7 @@ HELP;
|
|||
$this->updateTable('post-thread-user', 'contact-id', $from, $to, false);
|
||||
$this->updateTable('user-contact', 'cid', $from, $to, true);
|
||||
|
||||
if (!$this->dba->delete('contact', ['id' => $from])) {
|
||||
if (!Contact::deleteById($from)) {
|
||||
$this->err($this->l10n->t('Deletion of id %d failed', $from));
|
||||
} else {
|
||||
$this->out($this->l10n->t('Deletion of id %d was successful', $from));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue