X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FGlobalCommunityBlock.php;h=d99d99ceeaf86208919f04cd5d372fa39873d24b;hb=efe358c617d18740b63cd0dcb1ee23591fcb0e2d;hp=59a5d9cfdc1ce99daa23eb813e940c62de14b5de;hpb=2fa6cc000013089d59d9cc221b544ed1a7a4cd37;p=friendica.git diff --git a/src/Core/Console/GlobalCommunityBlock.php b/src/Core/Console/GlobalCommunityBlock.php index 59a5d9cfdc..d99d99ceea 100644 --- a/src/Core/Console/GlobalCommunityBlock.php +++ b/src/Core/Console/GlobalCommunityBlock.php @@ -13,8 +13,8 @@ use Friendica\Model\Contact; * * License: AGPLv3 or later, same as Friendica * - * @author Tobias Diekershoff - * @author Hypolite Petovan + * @author Tobias Diekershoff + * @author Hypolite Petovan */ class GlobalCommunityBlock extends \Asika\SimpleConsole\Console { @@ -39,7 +39,7 @@ HELP; protected function doExecute() { - $a = get_app(); + $a = \get_app(); if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); @@ -56,13 +56,13 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - if ($a->isInstallMode()) { + if ($a->getMode()->isInstall()) { throw new \RuntimeException('Database isn\'t ready or populated yet'); } $contact_id = Contact::getIdForURL($this->getArgument(0)); if (!$contact_id) { - throw new \RuntimeException(L10n::t('Could not find any contact entry for this URL (%s)', $nurl)); + throw new \RuntimeException(L10n::t('Could not find any contact entry for this URL (%s)', $this->getArgument(0))); } if(Contact::block($contact_id)) { $this->out(L10n::t('The contact has been blocked from the node'));