use DOMDocument;
use Exception;
use Friendica\Core\Config\Cache\ConfigCache;
+use Friendica\Database\Database;
use Friendica\Database\DBStructure;
-use Friendica\Factory\DBFactory;
-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;
/**
if (class_exists('Imagick')) {
$imagick = true;
- $supported = Image::supportedTypes();
+ $supported = Images::supportedTypes();
if (array_key_exists('image/gif', $supported)) {
$gif = true;
}
/**
* 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 = DBFactory::init($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, '');