diff options
Diffstat (limited to 'apps/user_ldap/command/createemptyconfig.php')
-rw-r--r-- | apps/user_ldap/command/createemptyconfig.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/user_ldap/command/createemptyconfig.php b/apps/user_ldap/command/createemptyconfig.php index 32010825361..1f051af9d5a 100644 --- a/apps/user_ldap/command/createemptyconfig.php +++ b/apps/user_ldap/command/createemptyconfig.php @@ -17,6 +17,16 @@ use \OCA\user_ldap\lib\Helper; use \OCA\user_ldap\lib\Configuration; class CreateEmptyConfig extends Command { + /** @var \OCA\User_LDAP\lib\Helper */ + protected $helper; + + /** + * @param Helper $helper + */ + public function __construct(Helper $helper) { + $this->helper = $helper; + parent::__construct(); + } protected function configure() { $this @@ -25,7 +35,6 @@ class CreateEmptyConfig extends Command { ; } - protected function execute(InputInterface $input, OutputInterface $output) { $configPrefix = $this->getNewConfigurationPrefix(); $output->writeln("Created new configuration with configID '{$configPrefix}'"); @@ -35,7 +44,7 @@ class CreateEmptyConfig extends Command { } protected function getNewConfigurationPrefix() { - $serverConnections = Helper::getServerConfigurationPrefixes(); + $serverConnections = $this->helper->getServerConfigurationPrefixes(); // first connection uses no prefix if(sizeof($serverConnections) == 0) { |