mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 09:34:26 +02:00
Replace PostUpdate key-value config entries with key-value pair entries
This commit is contained in:
parent
47764387b3
commit
10f8631cd9
11 changed files with 112 additions and 101 deletions
|
@ -22,7 +22,7 @@
|
|||
namespace Friendica\Console;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\KeyValueStorage\Capabilities\ICanManageKeyValuePairs;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Update;
|
||||
|
||||
|
@ -38,9 +38,9 @@ class PostUpdate extends \Asika\SimpleConsole\Console
|
|||
*/
|
||||
private $appMode;
|
||||
/**
|
||||
* @var IManageConfigValues
|
||||
* @var ICanManageKeyValuePairs
|
||||
*/
|
||||
private $config;
|
||||
private $keyValue;
|
||||
/**
|
||||
* @var L10n
|
||||
*/
|
||||
|
@ -60,13 +60,13 @@ HELP;
|
|||
return $help;
|
||||
}
|
||||
|
||||
public function __construct(App\Mode $appMode, IManageConfigValues $config, L10n $l10n, array $argv = null)
|
||||
public function __construct(App\Mode $appMode, ICanManageKeyValuePairs $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(): int
|
||||
|
@ -83,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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue