X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FConsole%2FPostUpdate.php;h=742197e732c0fcab2f8b25f07d6ed729e118adc2;hb=4faf08c0643d3e6bbe2a0a77be2ff8c1dbea4d5c;hp=f6a7f69d223febe61d3387c885e15007e465c9d4;hpb=1de3f186d79f3703850524c1d58c237be3eb25f3;p=friendica.git diff --git a/src/Console/PostUpdate.php b/src/Console/PostUpdate.php index f6a7f69d22..742197e732 100644 --- a/src/Console/PostUpdate.php +++ b/src/Console/PostUpdate.php @@ -1,19 +1,33 @@ . + * + */ namespace Friendica\Console; use Friendica\App; -use Friendica\Core\Config\Configuration; -use Friendica\Core\L10n\L10n; +use Friendica\Core\KeyValueStorage\Capabilities\IManageKeyValuePairs; +use Friendica\Core\L10n; use Friendica\Core\Update; /** * Performs database post updates - * - * License: AGPLv3 or later, same as Friendica - * - * @author Tobias Diekershoff - * @author Hypolite Petovan */ class PostUpdate extends \Asika\SimpleConsole\Console { @@ -24,9 +38,9 @@ class PostUpdate extends \Asika\SimpleConsole\Console */ private $appMode; /** - * @var Configuration + * @var IManageKeyValuePairs */ - private $config; + private $keyValue; /** * @var L10n */ @@ -46,16 +60,16 @@ HELP; return $help; } - public function __construct(App\Mode $appMode, Configuration $config, L10n $l10n, array $argv = null) + public function __construct(App\Mode $appMode, IManageKeyValuePairs $keyValue, L10n $l10n, array $argv = null) { parent::__construct($argv); - $this->appMode = $appMode; - $this->config = $config; - $this->l10n = $l10n; + $this->appMode = $appMode; + $this->keyValue = $keyValue; + $this->l10n = $l10n; } - protected function doExecute() + protected function doExecute(): int { $a = \Friendica\DI::app(); @@ -69,7 +83,7 @@ HELP; $this->out($this->getHelp()); return 0; } elseif ($reset_version) { - $this->config->set('system', 'post_update_version', $reset_version); + $this->keyValue->set('post_update_version', $reset_version); echo $this->l10n->t('Post update version number has been set to %s.', $reset_version) . "\n"; return 0; }