]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Console/GlobalCommunityBlock.php
Merge pull request #5599 from annando/postupdate
[friendica.git] / src / Core / Console / GlobalCommunityBlock.php
index 26c5d13131467bb1d98cb7b9d8956e4360d2aff0..59a5d9cfdc1ce99daa23eb813e940c62de14b5de 100644 (file)
@@ -56,12 +56,8 @@ HELP;
                        throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
                }
 
-               require_once '.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->isInstallMode()) {
+                       throw new \RuntimeException('Database isn\'t ready or populated yet');
                }
 
                $contact_id = Contact::getIdForURL($this->getArgument(0));