Fixing installer

This commit is contained in:
Philipp Holzer 2019-07-21 01:30:28 +02:00
parent 55999730e0
commit a8e6a57e9b
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
5 changed files with 7 additions and 7 deletions

View 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");

View 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')) {

View 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;

View 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

View 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;