]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Installer.php
Merge pull request #7945 from MrPetovan/bug/fatal-errors
[friendica.git] / src / Core / Installer.php
index 8163d546adeb62ed1934617bf9eeaadc2b0a9128..8bdb00f0459131c222cc63804618a8f29285a9c2 100644 (file)
@@ -9,10 +9,8 @@ use Exception;
 use Friendica\Core\Config\Cache\ConfigCache;
 use Friendica\Database\Database;
 use Friendica\Database\DBStructure;
-use Friendica\Object\Image;
-use Friendica\Util\Logger\VoidLogger;
+use Friendica\Util\Images;
 use Friendica\Util\Network;
-use Friendica\Util\Profiler;
 use Friendica\Util\Strings;
 
 /**
@@ -571,7 +569,7 @@ class Installer
 
                if (class_exists('Imagick')) {
                        $imagick = true;
-                       $supported = Image::supportedTypes();
+                       $supported = Images::supportedTypes();
                        if (array_key_exists('image/gif', $supported)) {
                                $gif = true;
                        }
@@ -592,17 +590,16 @@ class Installer
        /**
         * Checking the Database connection and if it is available for the current installation
         *
-        * @param ConfigCache $configCache The configuration cache
-        * @param Profiler    $profiler    The profiler of this app
+        * @param Database $dba
         *
         * @return bool true if the check was successful, otherwise false
         * @throws Exception
         */
-       public function checkDB(ConfigCache $configCache, Profiler $profiler)
+       public function checkDB(Database $dba)
        {
-               $database = new Database($configCache, $profiler, new VoidLogger());
+               $dba->reconnect();
 
-               if ($database->connected()) {
+               if ($dba->isConnected()) {
                        if (DBStructure::existsTable('user')) {
                                $this->addCheck(L10n::t('Database already in use.'), false, true, '');