X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FConsole%2FArchiveContact.php;h=7e1b07af2479973ecd56e4470da8ce540eee8a35;hb=f87eeb2f2866f21511069df9adf199bf68610c1d;hp=24251bcce521c37eb6fd11ef78b840681c032f66;hpb=befc2af5043a3afde251721c0d27df695db1bb7e;p=friendica.git diff --git a/src/Console/ArchiveContact.php b/src/Console/ArchiveContact.php index 24251bcce5..7e1b07af24 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.');