Remove extraneous dba::connect calls
This commit is contained in:
parent
decfc553f7
commit
3985a4bc43
11 changed files with 18 additions and 60 deletions
|
@ -33,7 +33,6 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Util\ExAuth;
|
||||
|
||||
if (sizeof($_SERVER["argv"]) == 0) {
|
||||
|
@ -55,10 +54,6 @@ require_once "include/dba.php";
|
|||
|
||||
$a = new App(dirname(__DIR__));
|
||||
|
||||
@include ".htconfig.php";
|
||||
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
|
||||
$oAuth = new ExAuth();
|
||||
|
||||
$oAuth->readStdin();
|
|
@ -28,8 +28,9 @@ require_once "include/dba.php";
|
|||
|
||||
$a = new App(dirname(__DIR__));
|
||||
|
||||
require_once ".htconfig.php";
|
||||
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
||||
if ($a->mode === App::MODE_INSTALL) {
|
||||
die("Friendica isn't properly installed yet.\n");
|
||||
}
|
||||
|
||||
Config::load();
|
||||
|
||||
|
@ -125,11 +126,9 @@ if (!$foreground) {
|
|||
file_put_contents($pidfile, $pid);
|
||||
|
||||
// We lose the database connection upon forking
|
||||
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
||||
$a->loadDatabase();
|
||||
}
|
||||
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
|
||||
Config::set('system', 'worker_daemon_mode', true);
|
||||
|
||||
// Just to be sure that this script really runs endlessly
|
||||
|
|
|
@ -24,14 +24,9 @@ if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) {
|
|||
}
|
||||
|
||||
require_once "boot.php";
|
||||
require_once "include/dba.php";
|
||||
|
||||
$a = new App(dirname(__DIR__));
|
||||
|
||||
require_once ".htconfig.php";
|
||||
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
|
||||
Config::load();
|
||||
|
||||
// Check the database structure and possibly fixes it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue