diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-03-23 15:17:14 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-03-23 15:19:41 +0100 |
commit | 468fc675a4552516ec0198768ee355e2f2e69261 (patch) | |
tree | 5cd73d9d6c64009f88b209f7121d74ada612dfd9 /apps/user_ldap/command/showconfig.php | |
parent | a9b4f0d8429dbeb612e80b168b6146890bb7843e (diff) | |
download | nextcloud-server-468fc675a4552516ec0198768ee355e2f2e69261.tar.gz nextcloud-server-468fc675a4552516ec0198768ee355e2f2e69261.zip |
fix PHP warnings when using occ with some LDAP commands
Diffstat (limited to 'apps/user_ldap/command/showconfig.php')
-rw-r--r-- | apps/user_ldap/command/showconfig.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/user_ldap/command/showconfig.php b/apps/user_ldap/command/showconfig.php index fbcf8d57de4..48ab76f1b7e 100644 --- a/apps/user_ldap/command/showconfig.php +++ b/apps/user_ldap/command/showconfig.php @@ -17,6 +17,16 @@ use \OCA\user_ldap\lib\Helper; use \OCA\user_ldap\lib\Configuration; class ShowConfig 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 @@ -37,8 +47,7 @@ class ShowConfig extends Command { } protected function execute(InputInterface $input, OutputInterface $output) { - $helper = new Helper(); - $availableConfigs = $helper->getServerConfigurationPrefixes(); + $availableConfigs = $this->helper->getServerConfigurationPrefixes(); $configID = $input->getArgument('configID'); if(!is_null($configID)) { $configIDs[] = $configID; |