]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Console/GlobalCommunitySilence.php
Rework App modes
[friendica.git] / src / Core / Console / GlobalCommunitySilence.php
index 72d5a4f88102d70fa003b9b72162fcf03b23bcb5..ccd6014e9c727bfbd7f9731d7d0723c445b6c557 100644 (file)
@@ -64,12 +64,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');
                }
 
                /**