aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/command/deleteconfig.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-03-23 15:17:14 +0100
committerArthur Schiwon <blizzz@owncloud.com>2015-03-23 15:19:41 +0100
commit468fc675a4552516ec0198768ee355e2f2e69261 (patch)
tree5cd73d9d6c64009f88b209f7121d74ada612dfd9 /apps/user_ldap/command/deleteconfig.php
parenta9b4f0d8429dbeb612e80b168b6146890bb7843e (diff)
downloadnextcloud-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/deleteconfig.php')
-rw-r--r--apps/user_ldap/command/deleteconfig.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/user_ldap/command/deleteconfig.php b/apps/user_ldap/command/deleteconfig.php
index f8b834a6465..fcffc50f47e 100644
--- a/apps/user_ldap/command/deleteconfig.php
+++ b/apps/user_ldap/command/deleteconfig.php
@@ -11,11 +11,20 @@ namespace OCA\user_ldap\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use \OCA\user_ldap\lib\Helper;
class DeleteConfig 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
@@ -31,9 +40,9 @@ class DeleteConfig extends Command {
protected function execute(InputInterface $input, OutputInterface $output) {
- $configPrefix = $input->getArgument('configID');;
+ $configPrefix = $input->getArgument('configID');
- $success = Helper::deleteServerConfiguration($configPrefix);
+ $success = $this->helper->deleteServerConfiguration($configPrefix);
if($success) {
$output->writeln("Deleted configuration with configID '{$configPrefix}'");