X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FPostUpdate.php;h=103d0fef7e68062928cdfd79100234a8dfd0187d;hb=3aa77685fcccff9739384136b4894de43200fa8c;hp=2ae640d48350815bfa0fe293036a19eb84512b8a;hpb=d489712824a8f3fe9840ae793a2be16149afcfcb;p=friendica.git diff --git a/src/Core/Console/PostUpdate.php b/src/Core/Console/PostUpdate.php index 2ae640d483..103d0fef7e 100644 --- a/src/Core/Console/PostUpdate.php +++ b/src/Core/Console/PostUpdate.php @@ -2,19 +2,17 @@ namespace Friendica\Core\Console; -use Friendica\Core\L10n; use Friendica\Core\Config; +use Friendica\Core\L10n; +use Friendica\Core\Update; /** - * @brief tool to block an account from the node - * - * With this tool, you can block an account in such a way, that no postings - * or comments this account writes are accepted to the node. + * Performs database post updates * * License: AGPLv3 or later, same as Friendica * - * @author Tobias Diekershoff - * @author Hypolite Petovan + * @author Tobias Diekershoff + * @author Hypolite Petovan */ class PostUpdate extends \Asika\SimpleConsole\Console { @@ -23,7 +21,7 @@ class PostUpdate extends \Asika\SimpleConsole\Console protected function getHelp() { $help = <<] @@ -36,7 +34,7 @@ HELP; protected function doExecute() { - $a = get_app(); + $a = \Friendica\BaseObject::getApp(); if ($this->getOption($this->helpOptions)) { $this->out($this->getHelp()); @@ -53,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()) {