X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FGlobalCommunityBlock.php;h=2a19a9e7f3f0343a3b79da58ec189e65b0dbb0c3;hb=4f01a198e18368e81fb86eaba82b7e950799e871;hp=6c2453307e3164df02400c9434bc6b9c4457fcd6;hpb=afced187bc41ad421a748a26d500db44968fb0df;p=friendica.git diff --git a/src/Core/Console/GlobalCommunityBlock.php b/src/Core/Console/GlobalCommunityBlock.php index 6c2453307e..2a19a9e7f3 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 { @@ -56,12 +56,8 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - require_once 'config/.htconfig.php'; - $result = \dba::connect($db_host, $db_user, $db_pass, $db_data); - unset($db_host, $db_user, $db_pass, $db_data); - - if (!$result) { - throw new \RuntimeException('Unable to connect to database'); + if ($a->getMode()->isInstall()) { + throw new \RuntimeException('Database isn\'t ready or populated yet'); } $contact_id = Contact::getIdForURL($this->getArgument(0));