]> git.mxchange.org Git - friendica.git/blobdiff - src/Console/ArchiveContact.php
Merge pull request #10961 from annando/deprecated
[friendica.git] / src / Console / ArchiveContact.php
index 24251bcce521c37eb6fd11ef78b840681c032f66..e3ccc4811983bf4cc1bb0a5398bc4f919ff8890b 100644 (file)
@@ -24,6 +24,7 @@ namespace Friendica\Console;
 use Friendica\App;
 use Friendica\Database\Database;
 use Friendica\DI;
+use Friendica\Model\Contact;
 use Friendica\Util\Strings;
 use RuntimeException;
 
@@ -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.');