]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Console/GlobalCommunityBlock.php
Code cleanup
[friendica.git] / src / Core / Console / GlobalCommunityBlock.php
index dbab4ff02c4dca1beeb9b0cab0690ac63d575d4a..d99d99ceeaf86208919f04cd5d372fa39873d24b 100644 (file)
@@ -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 (App\Mode::isInstall()) {
+               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'));