diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-16 21:04:54 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-12 14:24:47 +0100 |
commit | 06dac9726ea4ca33c19bbc7791e3a7875705c763 (patch) | |
tree | 3f2668f24af7f379fd5af0027d182f8685fdf3f9 /apps | |
parent | 451ab84d112b1362edc58eb48a970e186d6f6701 (diff) | |
download | nextcloud-server-06dac9726ea4ca33c19bbc7791e3a7875705c763.tar.gz nextcloud-server-06dac9726ea4ca33c19bbc7791e3a7875705c763.zip |
Address comments
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/appinfo/app.php | 11 | ||||
-rw-r--r-- | apps/dav/lib/carddav/syncservice.php | 6 | ||||
-rw-r--r-- | apps/dav/tests/unit/carddav/syncservicetest.php | 1 |
3 files changed, 11 insertions, 7 deletions
diff --git a/apps/dav/appinfo/app.php b/apps/dav/appinfo/app.php index d09003e19c0..9d092d84eb4 100644 --- a/apps/dav/appinfo/app.php +++ b/apps/dav/appinfo/app.php @@ -24,12 +24,17 @@ use OCA\DAV\CardDAV\SyncService; use OCA\DAV\Connector\Sabre\Principal; \OC::$server->registerService('CardDAVSyncService', function() { + + $config = \OC::$server->getConfig(); + $userManager = \OC::$server->getUserManager(); + $dbConnection = \OC::$server->getDatabaseConnection(); + $principalBackend = new Principal( - $this->config, - $this->userManager + $config, + $userManager ); - $backend = new CardDavBackend($this->dbConnection, $principalBackend); + $backend = new CardDavBackend($dbConnection, $principalBackend); return new SyncService($backend); }); diff --git a/apps/dav/lib/carddav/syncservice.php b/apps/dav/lib/carddav/syncservice.php index dbe10bbcc81..494db61d989 100644 --- a/apps/dav/lib/carddav/syncservice.php +++ b/apps/dav/lib/carddav/syncservice.php @@ -141,15 +141,15 @@ class SyncService { } /** - * @param string|null $synToken + * @param string|null $syncToken * @return string */ - private function buildSyncCollectionRequestBody($synToken) { + private function buildSyncCollectionRequestBody($syncToken) { $dom = new \DOMDocument('1.0', 'UTF-8'); $dom->formatOutput = true; $root = $dom->createElementNS('DAV:', 'd:sync-collection'); - $sync = $dom->createElement('d:sync-token', $synToken); + $sync = $dom->createElement('d:sync-token', $syncToken); $prop = $dom->createElement('d:prop'); $cont = $dom->createElement('d:getcontenttype'); $etag = $dom->createElement('d:getetag'); diff --git a/apps/dav/tests/unit/carddav/syncservicetest.php b/apps/dav/tests/unit/carddav/syncservicetest.php index f1ef934b8c6..a6a773babc2 100644 --- a/apps/dav/tests/unit/carddav/syncservicetest.php +++ b/apps/dav/tests/unit/carddav/syncservicetest.php @@ -51,7 +51,6 @@ class SyncServiceTest extends TestCase { public function testSyncWithDeletedElement() { $backend = $this->getBackendMock(0, 0, 1); -// $backend->method('getCard')->willReturn(true); $ss = $this->getSyncServiceMock($backend, ['0' => [404 => '']]); $return = $ss->syncRemoteAddressBook('', 'system', '1234567890', null, '1', 'principals/system/system', []); |