X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FConsole%2FArchiveContact.php;h=4bd832a616b520adca308a5e8a7d89d873c0c288;hb=9fbdcb5459e4acb158961427837612999253e046;hp=c6fcd7c1a7ead64a898497234f2827b926c2a130;hpb=097620b62799c96d610d73410ec07a6b8cdf82f0;p=friendica.git diff --git a/src/Console/ArchiveContact.php b/src/Console/ArchiveContact.php index c6fcd7c1a7..4bd832a616 100644 --- a/src/Console/ArchiveContact.php +++ b/src/Console/ArchiveContact.php @@ -1,6 +1,6 @@ l10n = $l10n; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); @@ -104,7 +105,7 @@ HELP; if (!$this->dba->exists('contact', ['nurl' => $nurl, 'archive' => false])) { throw new RuntimeException(DI::l10n()->t('Could not find any unarchived contact entry for this URL (%s)', $nurl)); } - if ($this->dba->update('contact', ['archive' => true], ['nurl' => $nurl])) { + if (Contact::update(['archive' => true], ['nurl' => $nurl])) { $this->out($this->l10n->t('The contact entries have been archived')); } else { throw new RuntimeException('The contact archival failed.');