]> git.mxchange.org Git - friendica.git/blobdiff - src/Console/ArchiveContact.php
Added comment
[friendica.git] / src / Console / ArchiveContact.php
index 24251bcce521c37eb6fd11ef78b840681c032f66..4990d99e0bdd9de1141f181ea3ed84e5db726c75 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -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.');