Remove extraneous dba::connect calls
[friendica.git/.git] / index.php
index d4e263b..501235f 100644 (file)
--- a/index.php
+++ b/index.php
@@ -9,7 +9,6 @@
  */
 
 use Friendica\App;
-use Friendica\BaseObject;
 use Friendica\Content\Nav;
 use Friendica\Core\Addon;
 use Friendica\Core\Config;
@@ -25,7 +24,6 @@ use Friendica\Module\Login;
 require_once 'boot.php';
 
 $a = new App(__DIR__);
-BaseObject::setApp($a);
 
 // We assume that the index.php is called by a frontend process
 // The value is set to "true" by default in boot.php
@@ -43,10 +41,7 @@ if (!$a->mode == App::MODE_INSTALL) {
 require_once "include/dba.php";
 
 if (!$a->mode == App::MODE_INSTALL) {
-       $result = dba::connect($db_host, $db_user, $db_pass, $db_data);
-       unset($db_host, $db_user, $db_pass, $db_data);
-
-       if (!$result) {
+       if (!dba::connected()) {
                System::unavailable();
        }