diff --git a/bin/daemon.php b/bin/daemon.php index 159b20e159..e2bad90df5 100755 --- a/bin/daemon.php +++ b/bin/daemon.php @@ -34,7 +34,7 @@ require_once "include/dba.php"; $a = new App(dirname(__DIR__)); -if ($a->isInstallMode()) { +if (App\Mode::isInstall()) { die("Friendica isn't properly installed yet.\n"); } diff --git a/index.php b/index.php index 2bdda90f4a..f34b79867c 100644 --- a/index.php +++ b/index.php @@ -165,9 +165,9 @@ $_SESSION['last_updated'] = defaults($_SESSION, 'last_updated', []); // in install mode, any url loads install module // but we need "view" module for stylesheet -if ($a->isInstallMode() && $a->module!="view") { +if (App\Mode::isInstall() && $a->module != 'view') { $a->module = 'install'; -} elseif (!App\Mode::has(App\Mode::MAINTENANCEDISABLED) && $a->module != "view") { +} elseif (!App\Mode::has(App\Mode::MAINTENANCEDISABLED) && $a->module != 'view') { $a->module = 'maintenance'; } else { check_url($a); diff --git a/src/Core/Console/GlobalCommunityBlock.php b/src/Core/Console/GlobalCommunityBlock.php index f51ed95fe2..dbab4ff02c 100644 --- a/src/Core/Console/GlobalCommunityBlock.php +++ b/src/Core/Console/GlobalCommunityBlock.php @@ -56,7 +56,7 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - if ($a->isInstallMode()) { + if (App\Mode::isInstall()) { throw new \RuntimeException('Database isn\'t ready or populated yet'); } diff --git a/src/Core/Console/GlobalCommunitySilence.php b/src/Core/Console/GlobalCommunitySilence.php index 03101cdf0f..0dce00a7b1 100644 --- a/src/Core/Console/GlobalCommunitySilence.php +++ b/src/Core/Console/GlobalCommunitySilence.php @@ -65,7 +65,7 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - if ($a->isInstallMode()) { + if (App\Mode::isInstall()) { throw new RuntimeException('Database isn\'t ready or populated yet'); } diff --git a/src/Core/Console/Maintenance.php b/src/Core/Console/Maintenance.php index a3e3b80a7e..d693cb6e89 100644 --- a/src/Core/Console/Maintenance.php +++ b/src/Core/Console/Maintenance.php @@ -64,7 +64,7 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - if ($a->isInstallMode()) { + if (App\Mode::isInstall()) { throw new \RuntimeException('Database isn\'t ready or populated yet'); } diff --git a/src/Core/Console/NewPassword.php b/src/Core/Console/NewPassword.php index 2581d81cd0..56f3ae7c98 100644 --- a/src/Core/Console/NewPassword.php +++ b/src/Core/Console/NewPassword.php @@ -57,7 +57,7 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - if ($a->isInstallMode()) { + if (App\Mode::isInstall()) { throw new RuntimeException('Database isn\'t ready or populated yet'); } diff --git a/src/Core/Console/PostUpdate.php b/src/Core/Console/PostUpdate.php index 24ed514b5e..a77aae39de 100644 --- a/src/Core/Console/PostUpdate.php +++ b/src/Core/Console/PostUpdate.php @@ -50,7 +50,7 @@ HELP; return 0; } - if ($a->isInstallMode()) { + if (App\Mode::isInstall()) { throw new \RuntimeException('Database isn\'t ready or populated yet'); }