]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Console/GlobalCommunityBlock.php
AutoInstall Test fix
[friendica.git] / src / Core / Console / GlobalCommunityBlock.php
index 26c5d13131467bb1d98cb7b9d8956e4360d2aff0..2a19a9e7f3f0343a3b79da58ec189e65b0dbb0c3 100644 (file)
@@ -13,8 +13,8 @@ use Friendica\Model\Contact;
  *
  * License: AGPLv3 or later, same as Friendica
  *
- * @author Tobias Diekershoff <mrpetovan@gmail.com>
- * @author Hypolite Petovan <mrpetovan@gmail.com>
+ * @author Tobias Diekershoff <tobias.diekershoff@gmx.net>
+ * @author Hypolite Petovan <hypolite@mrpetovan.com>
  */
 class GlobalCommunityBlock extends \Asika\SimpleConsole\Console
 {
@@ -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->getMode()->isInstall()) {
+                       throw new \RuntimeException('Database isn\'t ready or populated yet');
                }
 
                $contact_id = Contact::getIdForURL($this->getArgument(0));