mirror of
https://github.com/friendica/friendica
synced 2024-11-17 20:23:40 +00:00
Apply Update::check() suggestions
This commit is contained in:
parent
c35fd68ec2
commit
baf3225916
6 changed files with 5 additions and 9 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue