]> git.mxchange.org Git - friendica.git/commitdiff
Fixing installer
authorPhilipp Holzer <admin+github@philipp.info>
Sat, 20 Jul 2019 23:30:28 +0000 (01:30 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Sun, 21 Jul 2019 12:21:02 +0000 (14:21 +0200)
src/Console/AutomaticInstallation.php
src/Core/Installer.php
src/Database/Database.php
src/Module/Install.php
tests/DatabaseTest.php

index 401d9c292c87cc758712c7e43a91932b9deb6154..d594b2605e19375d25c8a1b577fcdfaff03782bc 100644 (file)
@@ -79,7 +79,8 @@ HELP;
                $installer = new Installer();
 
                $configCache = $a->getConfigCache();
-               $installer->setUpCache($configCache, BasePath::create($a->getBasePath(), $_SERVER));
+               $basepath = new BasePath($a->getBasePath());
+               $installer->setUpCache($configCache, $basepath->getPath());
 
                $this->out(" Complete!\n\n");
 
index de041773ef6b88b7525b7a35cad64ce043e9e798..8163d546adeb62ed1934617bf9eeaadc2b0a9128 100644 (file)
@@ -7,8 +7,8 @@ namespace Friendica\Core;
 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\Network;
@@ -600,7 +600,7 @@ class Installer
         */
        public function checkDB(ConfigCache $configCache, Profiler $profiler)
        {
-               $database = DBFactory::init($configCache, $profiler, [], new VoidLogger());
+               $database = new Database($configCache, $profiler, new VoidLogger());
 
                if ($database->connected()) {
                        if (DBStructure::existsTable('user')) {
index cdd5a357ab1cb1c697318596712159bc3833cc7f..495e7d93d5b185252aab1b0ca9f286184ca6b7dd 100644 (file)
@@ -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;
index 54c6141cc725fcda67362dabab8284aa674ee5ba..a7427ead0dbb226de0b1d0c851a5684ecfcde127 100644 (file)
@@ -67,7 +67,8 @@ class Install extends BaseModule
 
                // get basic installation information and save them to the config cache
                $configCache = $a->getConfigCache();
-               self::$installer->setUpCache($configCache, BasePath::create($a->getBasePath(), $_SERVER));
+               $basePath = new BasePath($a->getBasePath());
+               self::$installer->setUpCache($configCache, $basePath->getPath());
 
                // We overwrite current theme css, because during install we may not have a working mod_rewrite
                // so we may not have a css at all. Here we set a static css file for the install procedure pages
index 4dffc568781fff6bbc4354044b04ec439672b355..5f9d3bf72cdc05b835e18443463f01c5bc49a296 100644 (file)
@@ -9,8 +9,6 @@ use Friendica\App\Mode;
 use Friendica\Core\Config\Cache\ConfigCache;
 use Friendica\Database\Database;
 use Friendica\Factory\ConfigFactory;
-use Friendica\Factory\DBFactory;
-use Friendica\Factory\ProfilerFactory;
 use Friendica\Util\BasePath;
 use Friendica\Util\ConfigFileLoader;
 use Friendica\Util\Profiler;