]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Console/Maintenance.php
Reorganize Protocol constants
[friendica.git] / src / Core / Console / Maintenance.php
index 6638e4bfe168c477a2f5349d3506af7825091b6c..90449c47879b6cafb014433d9371e26412691ddf 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');
                }
 
                Core\Config::load();