X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FPostUpdate.php;h=103d0fef7e68062928cdfd79100234a8dfd0187d;hb=3aa77685fcccff9739384136b4894de43200fa8c;hp=24ed514b5e46ef3c992ecf548c1388efca2123b8;hpb=5881fa7229a25efd382668e6cd4a3af0f8d3198c;p=friendica.git diff --git a/src/Core/Console/PostUpdate.php b/src/Core/Console/PostUpdate.php index 24ed514b5e..103d0fef7e 100644 --- a/src/Core/Console/PostUpdate.php +++ b/src/Core/Console/PostUpdate.php @@ -2,8 +2,9 @@ namespace Friendica\Core\Console; -use Friendica\Core\L10n; use Friendica\Core\Config; +use Friendica\Core\L10n; +use Friendica\Core\Update; /** * Performs database post updates @@ -33,7 +34,7 @@ HELP; protected function doExecute() { - $a = get_app(); + $a = \Friendica\BaseObject::getApp(); if ($this->getOption($this->helpOptions)) { $this->out($this->getHelp()); @@ -50,10 +51,14 @@ HELP; return 0; } - if ($a->isInstallMode()) { + if ($a->getMode()->isInstall()) { throw new \RuntimeException('Database isn\'t ready or populated yet'); } + echo L10n::t('Check for pending update actions.') . "\n"; + Update::run($a->getBasePath(), true, true, false); + echo L10n::t('Done.') . "\n"; + echo L10n::t('Execute pending post updates.') . "\n"; while (!\Friendica\Database\PostUpdate::update()) {