X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FConsole%2FGlobalCommunitySilence.php;h=5d1f692634246e01ac2b8d007f20a166e5493f38;hb=d4a5a8051ad34a7be72238967afb3e6b140afdc8;hp=bb381d99ae828f6ada412903b7ac03ea54f20501;hpb=d09b3f5bdeae444f785f6283e55dbf2f61caadac;p=friendica.git diff --git a/src/Console/GlobalCommunitySilence.php b/src/Console/GlobalCommunitySilence.php index bb381d99ae..5d1f692634 100644 --- a/src/Console/GlobalCommunitySilence.php +++ b/src/Console/GlobalCommunitySilence.php @@ -1,6 +1,6 @@ [-h|--help|-?] [-v] @@ -75,7 +75,7 @@ HELP; $this->dba =$dba; } - protected function doExecute() + protected function doExecute(): int { if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); @@ -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) . ')');