]> git.mxchange.org Git - friendica.git/blobdiff - src/Console/GlobalCommunitySilence.php
Merge pull request #11524 from annando/cache-endpoints
[friendica.git] / src / Console / GlobalCommunitySilence.php
index bb381d99ae828f6ada412903b7ac03ea54f20501..a493bbcb86d32ffdb8383f837a73909f48d1bae8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -50,7 +50,7 @@ class GlobalCommunitySilence extends \Asika\SimpleConsole\Console
        protected function getHelp()
        {
                $help = <<<HELP
-console globalcommunitysilence - Silence remote profile from global community page
+console globalcommunitysilence - Silence a profile from the global community page
 Usage
        bin/console globalcommunitysilence <profile_url> [-h|--help|-?] [-v]
 
@@ -98,7 +98,7 @@ HELP;
 
                $contact_id = Contact::getIdForURL($this->getArgument(0));
                if ($contact_id) {
-                       $this->dba->update('contact', ['hidden' => true], ['id' => $contact_id]);
+                       Contact::update(['hidden' => true], ['id' => $contact_id]);
                        $this->out('The account has been successfully silenced from the global community page.');
                } else {
                        throw new RuntimeException('Could not find any public contact entry for this URL (' . $this->getArgument(0) . ')');