* @author Hypolite Petovan */ class PostUpdate extends \Asika\SimpleConsole\Console { protected function doExecute() { $a = get_app(); if (count($this->args) > 0) { throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } if ($a->isInstallMode()) { throw new \RuntimeException('Database isn\'t ready or populated yet'); } echo L10n::t('Execute pending post updates.') . "\n"; while (!\Friendica\Database\PostUpdate::update()) { echo '.'; } echo "\n" . L10n::t('All pending post updates are done.') . "\n"; return 0; } }