summaryrefslogtreecommitdiffstats
path: root/apps/dav/command
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/command')
-rw-r--r--apps/dav/command/createaddressbook.php14
-rw-r--r--apps/dav/command/syncsystemaddressbook.php10
2 files changed, 8 insertions, 16 deletions
diff --git a/apps/dav/command/createaddressbook.php b/apps/dav/command/createaddressbook.php
index 0e396074704..201101d17f4 100644
--- a/apps/dav/command/createaddressbook.php
+++ b/apps/dav/command/createaddressbook.php
@@ -25,6 +25,7 @@ use OCA\DAV\CardDAV\CardDavBackend;
use OCA\DAV\Connector\Sabre\Principal;
use OCP\IConfig;
use OCP\IDBConnection;
+use OCP\IGroupManager;
use OCP\ILogger;
use OCP\IUserManager;
use Symfony\Component\Console\Command\Command;
@@ -40,12 +41,12 @@ class CreateAddressBook extends Command {
/** @var \OCP\IDBConnection */
protected $dbConnection;
- /** @var IConfig */
- private $config;
-
/** @var ILogger */
private $logger;
+ /** @var IGroupManager $groupManager */
+ private $groupManager;
+
/**
* @param IUserManager $userManager
* @param IDBConnection $dbConnection
@@ -53,14 +54,14 @@ class CreateAddressBook extends Command {
* @param ILogger $logger
*/
function __construct(IUserManager $userManager,
+ IGroupManager $groupManager,
IDBConnection $dbConnection,
- IConfig $config,
ILogger $logger
) {
parent::__construct();
$this->userManager = $userManager;
+ $this->groupManager = $groupManager;
$this->dbConnection = $dbConnection;
- $this->config = $config;
$this->logger = $logger;
}
@@ -82,7 +83,8 @@ class CreateAddressBook extends Command {
throw new \InvalidArgumentException("User <$user> in unknown.");
}
$principalBackend = new Principal(
- $this->userManager
+ $this->userManager,
+ $this->groupManager
);
$name = $input->getArgument('name');
diff --git a/apps/dav/command/syncsystemaddressbook.php b/apps/dav/command/syncsystemaddressbook.php
index c7401107480..50f570ec93e 100644
--- a/apps/dav/command/syncsystemaddressbook.php
+++ b/apps/dav/command/syncsystemaddressbook.php
@@ -20,18 +20,8 @@
*/
namespace OCA\DAV\Command;
-use OCA\DAV\CardDAV\CardDavBackend;
-use OCA\DAV\CardDAV\Converter;
use OCA\DAV\CardDAV\SyncService;
-use OCA\DAV\Connector\Sabre\Principal;
-use OCP\IConfig;
-use OCP\IDBConnection;
-use OCP\IUser;
use OCP\IUserManager;
-use Sabre\CardDAV\Plugin;
-use Sabre\VObject\Component\VCard;
-use Sabre\VObject\Property\Text;
-use Sabre\VObject\Reader;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Input\InputArgument;