summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php26
-rw-r--r--apps/dav/lib/CalDAV/Calendar.php8
-rw-r--r--apps/dav/lib/CardDAV/AddressBook.php8
-rw-r--r--apps/dav/lib/CardDAV/AddressBookImpl.php2
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php4
-rw-r--r--apps/dav/lib/CardDAV/SyncService.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php4
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/Principal.php6
-rw-r--r--apps/dav/lib/Connector/Sabre/ServerFactory.php6
-rw-r--r--apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php78
-rw-r--r--apps/dav/lib/RootCollection.php48
12 files changed, 97 insertions, 97 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index bef0a9e7194..cf06cb5ab25 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -772,7 +772,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
[
'calendarId' => $calendarId,
'calendarData' => $this->getCalendarById($calendarId),
- ]));
+ ]));
return $calendarId;
}
@@ -833,7 +833,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'calendarData' => $this->getCalendarById($calendarId),
'shares' => $this->getShares($calendarId),
'propertyMutations' => $mutations,
- ]));
+ ]));
return true;
});
@@ -852,7 +852,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'calendarId' => $calendarId,
'calendarData' => $this->getCalendarById($calendarId),
'shares' => $this->getShares($calendarId),
- ]));
+ ]));
$stmt = $this->db->prepare('DELETE FROM `*PREFIX*calendarobjects` WHERE `calendarid` = ? AND `calendartype` = ?');
$stmt->execute([$calendarId, self::CALENDAR_TYPE_CALENDAR]);
@@ -2095,11 +2095,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
return [
- 'uri' => $row['uri'],
- 'calendardata' => $row['calendardata'],
- 'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'size' => (int)$row['size'],
+ 'uri' => $row['uri'],
+ 'calendardata' => $row['calendardata'],
+ 'lastmodified' => $row['lastmodified'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'size' => (int)$row['size'],
];
}
@@ -2124,11 +2124,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$result = [];
foreach($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) {
$result[] = [
- 'calendardata' => $row['calendardata'],
- 'uri' => $row['uri'],
- 'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'size' => (int)$row['size'],
+ 'calendardata' => $row['calendardata'],
+ 'uri' => $row['uri'],
+ 'lastmodified' => $row['lastmodified'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'size' => (int)$row['size'],
];
}
diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php
index ca8534a76b8..38598e30ce3 100644
--- a/apps/dav/lib/CalDAV/Calendar.php
+++ b/apps/dav/lib/CalDAV/Calendar.php
@@ -191,10 +191,10 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
if ($this->getOwner() !== parent::getOwner()) {
$acl[] = [
- 'privilege' => '{DAV:}read',
- 'principal' => parent::getOwner(),
- 'protected' => true,
- ];
+ 'privilege' => '{DAV:}read',
+ 'principal' => parent::getOwner(),
+ 'protected' => true,
+ ];
if ($this->canWrite()) {
$acl[] = [
'privilege' => '{DAV:}write',
diff --git a/apps/dav/lib/CardDAV/AddressBook.php b/apps/dav/lib/CardDAV/AddressBook.php
index 56aa328be3e..4fc97ac401f 100644
--- a/apps/dav/lib/CardDAV/AddressBook.php
+++ b/apps/dav/lib/CardDAV/AddressBook.php
@@ -130,10 +130,10 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
if ($this->getOwner() !== parent::getOwner()) {
$acl[] = [
- 'privilege' => '{DAV:}read',
- 'principal' => parent::getOwner(),
- 'protected' => true,
- ];
+ 'privilege' => '{DAV:}read',
+ 'principal' => parent::getOwner(),
+ 'protected' => true,
+ ];
if ($this->canWrite()) {
$acl[] = [
'privilege' => '{DAV:}write',
diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php
index 7ced2e90561..fd1cd8827aa 100644
--- a/apps/dav/lib/CardDAV/AddressBookImpl.php
+++ b/apps/dav/lib/CardDAV/AddressBookImpl.php
@@ -284,7 +284,7 @@ class AddressBookImpl implements IAddressBook {
$result[$property->name][] = [
'type' => $type,
'value' => $property->getValue()
- ];
+ ];
} else {
$result[$property->name][] = $property->getValue();
}
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php
index 8925fcdbd0c..ee9f723be6b 100644
--- a/apps/dav/lib/CardDAV/CardDavBackend.php
+++ b/apps/dav/lib/CardDAV/CardDavBackend.php
@@ -76,8 +76,8 @@ class CardDavBackend implements BackendInterface, SyncSupport {
/** @var array properties to index */
public static $indexProperties = [
- 'BDAY', 'UID', 'N', 'FN', 'TITLE', 'ROLE', 'NOTE', 'NICKNAME',
- 'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO', 'CLOUD'];
+ 'BDAY', 'UID', 'N', 'FN', 'TITLE', 'ROLE', 'NOTE', 'NICKNAME',
+ 'ORG', 'CATEGORIES', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL', 'GEO', 'CLOUD'];
/**
* @var string[] Map of uid => display name
diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php
index 53067978749..2180911b55c 100644
--- a/apps/dav/lib/CardDAV/SyncService.php
+++ b/apps/dav/lib/CardDAV/SyncService.php
@@ -202,7 +202,7 @@ class SyncService {
$body = $this->buildSyncCollectionRequestBody($syncToken);
$response = $client->request('REPORT', $addressBookUrl, $body, [
- 'Content-Type' => 'application/xml'
+ 'Content-Type' => 'application/xml'
]);
return $this->parseMultiStatus($response['body']);
diff --git a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php
index 2812eba9797..7f1a735c7a4 100644
--- a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php
@@ -134,8 +134,8 @@ class FakeLockerPlugin extends ServerPlugin {
$lockInfo->timeout = 1800;
$body = $this->server->xml->write('{DAV:}prop', [
- '{DAV:}lockdiscovery' =>
- new LockDiscovery([$lockInfo])
+ '{DAV:}lockdiscovery' =>
+ new LockDiscovery([$lockInfo])
]);
$response->setStatus(200);
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index 82f3c3b6ccd..8f94ea9a52e 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -209,7 +209,7 @@ class FilesPlugin extends ServerPlugin {
$sourceNodeFileInfo = $sourceNode->getFileInfo();
if ($sourceNodeFileInfo === null) {
throw new NotFound($source . ' does not exist');
- }
+ }
if (!$sourceNodeFileInfo->isDeletable()) {
throw new Forbidden($source . " cannot be deleted");
diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php
index 4b068dafda2..2fa01c0315d 100644
--- a/apps/dav/lib/Connector/Sabre/Principal.php
+++ b/apps/dav/lib/Connector/Sabre/Principal.php
@@ -446,9 +446,9 @@ class Principal implements BackendInterface {
$userId = $user->getUID();
$displayName = $user->getDisplayName();
$principal = [
- 'uri' => $this->principalPrefix . '/' . $userId,
- '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName,
- '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL',
+ 'uri' => $this->principalPrefix . '/' . $userId,
+ '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName,
+ '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => 'INDIVIDUAL',
];
$email = $user->getEMailAddress();
diff --git a/apps/dav/lib/Connector/Sabre/ServerFactory.php b/apps/dav/lib/Connector/Sabre/ServerFactory.php
index 7f5bc6baea7..f740284f271 100644
--- a/apps/dav/lib/Connector/Sabre/ServerFactory.php
+++ b/apps/dav/lib/Connector/Sabre/ServerFactory.php
@@ -129,9 +129,9 @@ class ServerFactory {
// Some WebDAV clients do require Class 2 WebDAV support (locking), since
// we do not provide locking we emulate it using a fake locking plugin.
if($this->request->isUserAgent([
- '/WebDAVFS/',
- '/OneNote/',
- '/Microsoft-WebDAV-MiniRedir/',
+ '/WebDAVFS/',
+ '/OneNote/',
+ '/Microsoft-WebDAV-MiniRedir/',
])) {
$server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin());
}
diff --git a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
index c1a4337b36b..b95c978cf1a 100644
--- a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
+++ b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
@@ -29,59 +29,59 @@ use Sabre\Xml\XmlDeserializable;
class ShareRequest implements XmlDeserializable {
- public $set = [];
+ public $set = [];
- public $remove = [];
+ public $remove = [];
- /**
- * Constructor
- *
- * @param array $set
- * @param array $remove
- */
- function __construct(array $set, array $remove) {
+ /**
+ * Constructor
+ *
+ * @param array $set
+ * @param array $remove
+ */
+ function __construct(array $set, array $remove) {
- $this->set = $set;
- $this->remove = $remove;
+ $this->set = $set;
+ $this->remove = $remove;
- }
+ }
- static function xmlDeserialize(Reader $reader) {
+ static function xmlDeserialize(Reader $reader) {
- $elements = $reader->parseInnerTree([
- '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue',
- '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue',
- ]);
+ $elements = $reader->parseInnerTree([
+ '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue',
+ '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue',
+ ]);
- $set = [];
- $remove = [];
+ $set = [];
+ $remove = [];
- foreach ($elements as $elem) {
- switch ($elem['name']) {
+ foreach ($elements as $elem) {
+ switch ($elem['name']) {
- case '{' . Plugin::NS_OWNCLOUD . '}set' :
- $sharee = $elem['value'];
+ case '{' . Plugin::NS_OWNCLOUD . '}set' :
+ $sharee = $elem['value'];
- $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary';
- $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name';
+ $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary';
+ $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name';
- $set[] = [
- 'href' => $sharee['{DAV:}href'],
- 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null,
- 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null,
- 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee),
- ];
- break;
+ $set[] = [
+ 'href' => $sharee['{DAV:}href'],
+ 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null,
+ 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null,
+ 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee),
+ ];
+ break;
- case '{' . Plugin::NS_OWNCLOUD . '}remove' :
- $remove[] = $elem['value']['{DAV:}href'];
- break;
+ case '{' . Plugin::NS_OWNCLOUD . '}remove' :
+ $remove[] = $elem['value']['{DAV:}href'];
+ break;
- }
- }
+ }
+ }
- return new self($set, $remove);
+ return new self($set, $remove);
- }
+ }
}
diff --git a/apps/dav/lib/RootCollection.php b/apps/dav/lib/RootCollection.php
index 271b7f6c866..e50c2a882ca 100644
--- a/apps/dav/lib/RootCollection.php
+++ b/apps/dav/lib/RootCollection.php
@@ -148,30 +148,30 @@ class RootCollection extends SimpleCollection {
\OC::$server->query(ITimeFactory::class));
$children = [
- new SimpleCollection('principals', [
- $userPrincipals,
- $groupPrincipals,
- $systemPrincipals,
- $calendarResourcePrincipals,
- $calendarRoomPrincipals]),
- $filesCollection,
- $userCalendarRoot,
- new SimpleCollection('system-calendars', [
- $resourceCalendarRoot,
- $roomCalendarRoot,
- ]),
- $publicCalendarRoot,
- new SimpleCollection('addressbooks', [
- $usersAddressBookRoot,
- $systemAddressBookRoot]),
- $systemTagCollection,
- $systemTagRelationsCollection,
- $commentsCollection,
- $uploadCollection,
- $avatarCollection,
- new SimpleCollection('provisioning', [
- $appleProvisioning
- ])
+ new SimpleCollection('principals', [
+ $userPrincipals,
+ $groupPrincipals,
+ $systemPrincipals,
+ $calendarResourcePrincipals,
+ $calendarRoomPrincipals]),
+ $filesCollection,
+ $userCalendarRoot,
+ new SimpleCollection('system-calendars', [
+ $resourceCalendarRoot,
+ $roomCalendarRoot,
+ ]),
+ $publicCalendarRoot,
+ new SimpleCollection('addressbooks', [
+ $usersAddressBookRoot,
+ $systemAddressBookRoot]),
+ $systemTagCollection,
+ $systemTagRelationsCollection,
+ $commentsCollection,
+ $uploadCollection,
+ $avatarCollection,
+ new SimpleCollection('provisioning', [
+ $appleProvisioning
+ ])
];
parent::__construct('root', $children);