use Friendica\App;
use Friendica\Database\Database;
use Friendica\DI;
+use Friendica\Model\Contact;
use Friendica\Util\Strings;
use RuntimeException;
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.');