]> git.mxchange.org Git - friendica.git/commitdiff
Apply Update::check() suggestions
authorPhilipp <admin@philipp.info>
Fri, 6 Jan 2023 11:50:14 +0000 (12:50 +0100)
committerPhilipp <admin@philipp.info>
Fri, 6 Jan 2023 11:50:14 +0000 (12:50 +0100)
bin/auth_ejabberd.php
bin/daemon.php
bin/worker.php
index.php
src/App.php
src/Core/Update.php

index 9c5dc05285be84cac7d736b1ece49986d33a65c1..40e7d3b97c3e80ec678837f02a49e5a14d6cfb6c 100755 (executable)
@@ -84,7 +84,7 @@ $dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['auth_ejabb
 \Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class));
 
 // Check the database structure and possibly fixes it
-\Friendica\Core\Update::check(\Friendica\DI::basePath(), true, \Friendica\DI::mode());
+\Friendica\Core\Update::check(\Friendica\DI::basePath(), true);
 
 $appMode = $dice->create(Mode::class);
 
index 6237df49de1aee6266eac8289d8cf361ea60f088..b970f4a7587156549150d4b991666006ff2b9fdb 100755 (executable)
@@ -33,7 +33,6 @@ if (php_sapi_name() !== 'cli') {
 use Dice\Dice;
 use Friendica\App\Mode;
 use Friendica\Core\Logger;
-use Friendica\Core\Update;
 use Friendica\Core\Worker;
 use Friendica\Database\DBA;
 use Friendica\DI;
@@ -65,9 +64,6 @@ $dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['daemon']])
 DI::init($dice);
 \Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class));
 
-// Check the database structure and possibly fixes it
-Update::check(DI::basePath(), true, DI::mode());
-
 if (DI::mode()->isInstall()) {
        die("Friendica isn't properly installed yet.\n");
 }
index aceeff48187a7ad179e1c670864c715ed4e43103..de207ae98fd5fe26be65c944d0bcdc144ea1b17c 100755 (executable)
@@ -62,7 +62,7 @@ DI::init($dice);
 DI::mode()->setExecutor(Mode::WORKER);
 
 // Check the database structure and possibly fixes it
-Update::check(DI::basePath(), true, DI::mode());
+Update::check(DI::basePath(), true);
 
 // Quit when in maintenance
 if (!DI::mode()->has(App\Mode::MAINTENANCEDISABLED)) {
index 10f04996afb1ae2b06d89c0e016b100077cd837b..e0f33666b496f47be44d91fef39a6b536c839888 100644 (file)
--- a/index.php
+++ b/index.php
@@ -37,7 +37,7 @@ $dice = $dice->addRule(Friendica\App\Mode::class, ['call' => [['determineRunMode
 \Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class));
 
 // Check the database structure and possibly fixes it
-\Friendica\Core\Update::check(\Friendica\DI::basePath(), true, \Friendica\DI::mode());
+\Friendica\Core\Update::check(\Friendica\DI::basePath(), true);
 
 $a = \Friendica\DI::app();
 
index fc70f920dee2f7fb0dbd1f8b60bf57080893c40b..224a895e294f88c2d83253b671c45bb464707cd3 100644 (file)
@@ -659,7 +659,7 @@ class App
                                $this->baseURL->redirect('install');
                        } else {
                                $this->checkURL();
-                               Core\Update::check($this->getBasePath(), false, $this->mode);
+                               Core\Update::check($this->getBasePath(), false);
                                Core\Addon::loadAddons();
                                Core\Hook::loadHooks();
                        }
index 03badb1b5d8a6cadb283a1a32cfbc5590f6c3d74..eb207b6c25a21c9925ac14fc25849dfd17567930 100644 (file)
@@ -47,7 +47,7 @@ class Update
         * @return void
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
-       public static function check(string $basePath, bool $via_worker, App\Mode $mode)
+       public static function check(string $basePath, bool $via_worker)
        {
                if (!DBA::connected()) {
                        return;