mirror of
https://github.com/friendica/friendica
synced 2025-04-25 16:30:10 +00:00
Fixed new "user config" console feature
- Replaced "DI::" call with constructor injection - Added return value for IPConfig::load() and PreloadPConfig::load()
This commit is contained in:
parent
e41283faff
commit
d1d5cb2857
3 changed files with 10 additions and 4 deletions
|
@ -52,6 +52,10 @@ class User extends \Asika\SimpleConsole\Console
|
|||
* @var Database
|
||||
*/
|
||||
private $dba;
|
||||
/**
|
||||
* @var IPConfig
|
||||
*/
|
||||
private $pConfig;
|
||||
|
||||
protected function getHelp()
|
||||
{
|
||||
|
@ -89,13 +93,14 @@ HELP;
|
|||
return $help;
|
||||
}
|
||||
|
||||
public function __construct(App\Mode $appMode, L10n $l10n, Database $dba, array $argv = null)
|
||||
public function __construct(App\Mode $appMode, L10n $l10n, Database $dba, IPConfig $pConfig, array $argv = null)
|
||||
{
|
||||
parent::__construct($argv);
|
||||
|
||||
$this->appMode = $appMode;
|
||||
$this->l10n = $l10n;
|
||||
$this->dba = $dba;
|
||||
$this->pConfig = $pConfig;
|
||||
}
|
||||
|
||||
protected function doExecute()
|
||||
|
@ -463,8 +468,7 @@ HELP;
|
|||
}
|
||||
}
|
||||
|
||||
$pconfig = \Friendica\DI::pConfig();
|
||||
$values = $pconfig->load($user['uid'], $category);
|
||||
$values = $this->pConfig->load($user['uid'], $category);
|
||||
|
||||
switch ($subCmd) {
|
||||
case 'list':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue