Remove extraneous dba::connect calls

This commit is contained in:
Hypolite Petovan 2018-06-25 20:56:07 -04:00
parent decfc553f7
commit 3985a4bc43
11 changed files with 18 additions and 60 deletions

View file

@ -54,12 +54,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->mode === App::MODE_INSTALL) {
throw new \RuntimeException('Friendica isn\'t properly installed yet.');
}
$nurl = normalise_link($this->getArgument(0));