X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FDatabase%2FDatabase.php;h=c503416912287fd22bfc5516c28c35e9c85fedbb;hb=1d8b80922795c35c36e10f3415310a9ef04dd9cd;hp=cdd5a357ab1cb1c697318596712159bc3833cc7f;hpb=55999730e0b4ad847bb891af0aa7dbfa531f998e;p=friendica.git diff --git a/src/Database/Database.php b/src/Database/Database.php index cdd5a357ab..c503416912 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -46,7 +46,7 @@ class Database private $in_retrial = false; private $relation = []; - public function __construct(ConfigCache $configCache, Profiler $profiler, LoggerInterface $logger, array $server) + public function __construct(ConfigCache $configCache, Profiler $profiler, LoggerInterface $logger, array $server = []) { // We are storing these values for being able to perform a reconnect $this->configCache = $configCache; @@ -57,6 +57,11 @@ class Database $this->connect(); DBA::init($this); + + if ($this->isConnected()) { + // Loads DB_UPDATE_VERSION constant + DBStructure::definition($configCache->get('system', 'basepath'), false); + } } private function readServerVariables(array $server)