Completed
Push — master ( 188b96...0947dd )
by Morris
43s queued 10s
created
apps/dav/lib/CardDAV/AddressBook.php 1 patch
Indentation   +175 added lines, -175 removed lines patch added patch discarded remove patch
@@ -38,179 +38,179 @@
 block discarded – undo
38 38
  */
39 39
 class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
40 40
 
41
-	/**
42
-	 * AddressBook constructor.
43
-	 *
44
-	 * @param BackendInterface $carddavBackend
45
-	 * @param array $addressBookInfo
46
-	 * @param IL10N $l10n
47
-	 */
48
-	public function __construct(BackendInterface $carddavBackend, array $addressBookInfo, IL10N $l10n) {
49
-		parent::__construct($carddavBackend, $addressBookInfo);
50
-
51
-		if ($this->addressBookInfo['{DAV:}displayname'] === CardDavBackend::PERSONAL_ADDRESSBOOK_NAME &&
52
-			$this->getName() === CardDavBackend::PERSONAL_ADDRESSBOOK_URI) {
53
-			$this->addressBookInfo['{DAV:}displayname'] = $l10n->t('Contacts');
54
-		}
55
-	}
56
-
57
-	/**
58
-	 * Updates the list of shares.
59
-	 *
60
-	 * The first array is a list of people that are to be added to the
61
-	 * addressbook.
62
-	 *
63
-	 * Every element in the add array has the following properties:
64
-	 *   * href - A url. Usually a mailto: address
65
-	 *   * commonName - Usually a first and last name, or false
66
-	 *   * summary - A description of the share, can also be false
67
-	 *   * readOnly - A boolean value
68
-	 *
69
-	 * Every element in the remove array is just the address string.
70
-	 *
71
-	 * @param array $add
72
-	 * @param array $remove
73
-	 * @return void
74
-	 * @throws Forbidden
75
-	 */
76
-	public function updateShares(array $add, array $remove) {
77
-		if ($this->isShared()) {
78
-			throw new Forbidden();
79
-		}
80
-		$this->carddavBackend->updateShares($this, $add, $remove);
81
-	}
82
-
83
-	/**
84
-	 * Returns the list of people whom this addressbook is shared with.
85
-	 *
86
-	 * Every element in this array should have the following properties:
87
-	 *   * href - Often a mailto: address
88
-	 *   * commonName - Optional, for example a first + last name
89
-	 *   * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants.
90
-	 *   * readOnly - boolean
91
-	 *   * summary - Optional, a description for the share
92
-	 *
93
-	 * @return array
94
-	 */
95
-	public function getShares() {
96
-		if ($this->isShared()) {
97
-			return [];
98
-		}
99
-		return $this->carddavBackend->getShares($this->getResourceId());
100
-	}
101
-
102
-	public function getACL() {
103
-		$acl =  [
104
-			[
105
-				'privilege' => '{DAV:}read',
106
-				'principal' => $this->getOwner(),
107
-				'protected' => true,
108
-			]];
109
-		$acl[] = [
110
-				'privilege' => '{DAV:}write',
111
-				'principal' => $this->getOwner(),
112
-				'protected' => true,
113
-			];
114
-		if ($this->getOwner() !== parent::getOwner()) {
115
-			$acl[] =  [
116
-					'privilege' => '{DAV:}read',
117
-					'principal' => parent::getOwner(),
118
-					'protected' => true,
119
-				];
120
-			if ($this->canWrite()) {
121
-				$acl[] = [
122
-					'privilege' => '{DAV:}write',
123
-					'principal' => parent::getOwner(),
124
-					'protected' => true,
125
-				];
126
-			}
127
-		}
128
-		if ($this->getOwner() === 'principals/system/system') {
129
-			$acl[] = [
130
-					'privilege' => '{DAV:}read',
131
-					'principal' => '{DAV:}authenticated',
132
-					'protected' => true,
133
-			];
134
-		}
135
-
136
-		if ($this->isShared()) {
137
-			return $acl;
138
-		}
139
-
140
-		return $this->carddavBackend->applyShareAcl($this->getResourceId(), $acl);
141
-	}
142
-
143
-	public function getChildACL() {
144
-		return $this->getACL();
145
-	}
146
-
147
-	public function getChild($name) {
148
-
149
-		$obj = $this->carddavBackend->getCard($this->addressBookInfo['id'], $name);
150
-		if (!$obj) {
151
-			throw new NotFound('Card not found');
152
-		}
153
-		$obj['acl'] = $this->getChildACL();
154
-		return new Card($this->carddavBackend, $this->addressBookInfo, $obj);
155
-
156
-	}
157
-
158
-	/**
159
-	 * @return int
160
-	 */
161
-	public function getResourceId() {
162
-		return $this->addressBookInfo['id'];
163
-	}
164
-
165
-	public function getOwner() {
166
-		if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
167
-			return $this->addressBookInfo['{http://owncloud.org/ns}owner-principal'];
168
-		}
169
-		return parent::getOwner();
170
-	}
171
-
172
-	public function delete() {
173
-		if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
174
-			$principal = 'principal:' . parent::getOwner();
175
-			$shares = $this->carddavBackend->getShares($this->getResourceId());
176
-			$shares = array_filter($shares, function($share) use ($principal){
177
-				return $share['href'] === $principal;
178
-			});
179
-			if (empty($shares)) {
180
-				throw new Forbidden();
181
-			}
182
-
183
-			$this->carddavBackend->updateShares($this, [], [
184
-				$principal
185
-			]);
186
-			return;
187
-		}
188
-		parent::delete();
189
-	}
190
-
191
-	public function propPatch(PropPatch $propPatch) {
192
-		if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
193
-			throw new Forbidden();
194
-		}
195
-		parent::propPatch($propPatch);
196
-	}
197
-
198
-	public function getContactsGroups() {
199
-		return $this->carddavBackend->collectCardProperties($this->getResourceId(), 'CATEGORIES');
200
-	}
201
-
202
-	private function isShared() {
203
-		if (!isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
204
-			return false;
205
-		}
206
-
207
-		return $this->addressBookInfo['{http://owncloud.org/ns}owner-principal'] !== $this->addressBookInfo['principaluri'];
208
-	}
209
-
210
-	private function canWrite() {
211
-		if (isset($this->addressBookInfo['{http://owncloud.org/ns}read-only'])) {
212
-			return !$this->addressBookInfo['{http://owncloud.org/ns}read-only'];
213
-		}
214
-		return true;
215
-	}
41
+    /**
42
+     * AddressBook constructor.
43
+     *
44
+     * @param BackendInterface $carddavBackend
45
+     * @param array $addressBookInfo
46
+     * @param IL10N $l10n
47
+     */
48
+    public function __construct(BackendInterface $carddavBackend, array $addressBookInfo, IL10N $l10n) {
49
+        parent::__construct($carddavBackend, $addressBookInfo);
50
+
51
+        if ($this->addressBookInfo['{DAV:}displayname'] === CardDavBackend::PERSONAL_ADDRESSBOOK_NAME &&
52
+            $this->getName() === CardDavBackend::PERSONAL_ADDRESSBOOK_URI) {
53
+            $this->addressBookInfo['{DAV:}displayname'] = $l10n->t('Contacts');
54
+        }
55
+    }
56
+
57
+    /**
58
+     * Updates the list of shares.
59
+     *
60
+     * The first array is a list of people that are to be added to the
61
+     * addressbook.
62
+     *
63
+     * Every element in the add array has the following properties:
64
+     *   * href - A url. Usually a mailto: address
65
+     *   * commonName - Usually a first and last name, or false
66
+     *   * summary - A description of the share, can also be false
67
+     *   * readOnly - A boolean value
68
+     *
69
+     * Every element in the remove array is just the address string.
70
+     *
71
+     * @param array $add
72
+     * @param array $remove
73
+     * @return void
74
+     * @throws Forbidden
75
+     */
76
+    public function updateShares(array $add, array $remove) {
77
+        if ($this->isShared()) {
78
+            throw new Forbidden();
79
+        }
80
+        $this->carddavBackend->updateShares($this, $add, $remove);
81
+    }
82
+
83
+    /**
84
+     * Returns the list of people whom this addressbook is shared with.
85
+     *
86
+     * Every element in this array should have the following properties:
87
+     *   * href - Often a mailto: address
88
+     *   * commonName - Optional, for example a first + last name
89
+     *   * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants.
90
+     *   * readOnly - boolean
91
+     *   * summary - Optional, a description for the share
92
+     *
93
+     * @return array
94
+     */
95
+    public function getShares() {
96
+        if ($this->isShared()) {
97
+            return [];
98
+        }
99
+        return $this->carddavBackend->getShares($this->getResourceId());
100
+    }
101
+
102
+    public function getACL() {
103
+        $acl =  [
104
+            [
105
+                'privilege' => '{DAV:}read',
106
+                'principal' => $this->getOwner(),
107
+                'protected' => true,
108
+            ]];
109
+        $acl[] = [
110
+                'privilege' => '{DAV:}write',
111
+                'principal' => $this->getOwner(),
112
+                'protected' => true,
113
+            ];
114
+        if ($this->getOwner() !== parent::getOwner()) {
115
+            $acl[] =  [
116
+                    'privilege' => '{DAV:}read',
117
+                    'principal' => parent::getOwner(),
118
+                    'protected' => true,
119
+                ];
120
+            if ($this->canWrite()) {
121
+                $acl[] = [
122
+                    'privilege' => '{DAV:}write',
123
+                    'principal' => parent::getOwner(),
124
+                    'protected' => true,
125
+                ];
126
+            }
127
+        }
128
+        if ($this->getOwner() === 'principals/system/system') {
129
+            $acl[] = [
130
+                    'privilege' => '{DAV:}read',
131
+                    'principal' => '{DAV:}authenticated',
132
+                    'protected' => true,
133
+            ];
134
+        }
135
+
136
+        if ($this->isShared()) {
137
+            return $acl;
138
+        }
139
+
140
+        return $this->carddavBackend->applyShareAcl($this->getResourceId(), $acl);
141
+    }
142
+
143
+    public function getChildACL() {
144
+        return $this->getACL();
145
+    }
146
+
147
+    public function getChild($name) {
148
+
149
+        $obj = $this->carddavBackend->getCard($this->addressBookInfo['id'], $name);
150
+        if (!$obj) {
151
+            throw new NotFound('Card not found');
152
+        }
153
+        $obj['acl'] = $this->getChildACL();
154
+        return new Card($this->carddavBackend, $this->addressBookInfo, $obj);
155
+
156
+    }
157
+
158
+    /**
159
+     * @return int
160
+     */
161
+    public function getResourceId() {
162
+        return $this->addressBookInfo['id'];
163
+    }
164
+
165
+    public function getOwner() {
166
+        if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
167
+            return $this->addressBookInfo['{http://owncloud.org/ns}owner-principal'];
168
+        }
169
+        return parent::getOwner();
170
+    }
171
+
172
+    public function delete() {
173
+        if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
174
+            $principal = 'principal:' . parent::getOwner();
175
+            $shares = $this->carddavBackend->getShares($this->getResourceId());
176
+            $shares = array_filter($shares, function($share) use ($principal){
177
+                return $share['href'] === $principal;
178
+            });
179
+            if (empty($shares)) {
180
+                throw new Forbidden();
181
+            }
182
+
183
+            $this->carddavBackend->updateShares($this, [], [
184
+                $principal
185
+            ]);
186
+            return;
187
+        }
188
+        parent::delete();
189
+    }
190
+
191
+    public function propPatch(PropPatch $propPatch) {
192
+        if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
193
+            throw new Forbidden();
194
+        }
195
+        parent::propPatch($propPatch);
196
+    }
197
+
198
+    public function getContactsGroups() {
199
+        return $this->carddavBackend->collectCardProperties($this->getResourceId(), 'CATEGORIES');
200
+    }
201
+
202
+    private function isShared() {
203
+        if (!isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
204
+            return false;
205
+        }
206
+
207
+        return $this->addressBookInfo['{http://owncloud.org/ns}owner-principal'] !== $this->addressBookInfo['principaluri'];
208
+    }
209
+
210
+    private function canWrite() {
211
+        if (isset($this->addressBookInfo['{http://owncloud.org/ns}read-only'])) {
212
+            return !$this->addressBookInfo['{http://owncloud.org/ns}read-only'];
213
+        }
214
+        return true;
215
+    }
216 216
 }
Please login to merge, or discard this patch.
apps/dav/lib/Server.php 1 patch
Indentation   +204 added lines, -204 removed lines patch added patch discarded remove patch
@@ -64,234 +64,234 @@
 block discarded – undo
64 64
 
65 65
 class Server {
66 66
 
67
-	/** @var IRequest */
68
-	private $request;
67
+    /** @var IRequest */
68
+    private $request;
69 69
 
70
-	/** @var  string */
71
-	private $baseUri;
70
+    /** @var  string */
71
+    private $baseUri;
72 72
 
73
-	/** @var Connector\Sabre\Server  */
74
-	public $server;
73
+    /** @var Connector\Sabre\Server  */
74
+    public $server;
75 75
 
76
-	public function __construct(IRequest $request, $baseUri) {
77
-		$this->request = $request;
78
-		$this->baseUri = $baseUri;
79
-		$logger = \OC::$server->getLogger();
80
-		$dispatcher = \OC::$server->getEventDispatcher();
76
+    public function __construct(IRequest $request, $baseUri) {
77
+        $this->request = $request;
78
+        $this->baseUri = $baseUri;
79
+        $logger = \OC::$server->getLogger();
80
+        $dispatcher = \OC::$server->getEventDispatcher();
81 81
 
82
-		$root = new RootCollection();
83
-		$this->server = new \OCA\DAV\Connector\Sabre\Server(new CachingTree($root));
82
+        $root = new RootCollection();
83
+        $this->server = new \OCA\DAV\Connector\Sabre\Server(new CachingTree($root));
84 84
 
85
-		// Add maintenance plugin
86
-		$this->server->addPlugin(new \OCA\DAV\Connector\Sabre\MaintenancePlugin(\OC::$server->getConfig()));
85
+        // Add maintenance plugin
86
+        $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\MaintenancePlugin(\OC::$server->getConfig()));
87 87
 
88
-		// Backends
89
-		$authBackend = new Auth(
90
-			\OC::$server->getSession(),
91
-			\OC::$server->getUserSession(),
92
-			\OC::$server->getRequest(),
93
-			\OC::$server->getTwoFactorAuthManager(),
94
-			\OC::$server->getBruteForceThrottler()
95
-		);
88
+        // Backends
89
+        $authBackend = new Auth(
90
+            \OC::$server->getSession(),
91
+            \OC::$server->getUserSession(),
92
+            \OC::$server->getRequest(),
93
+            \OC::$server->getTwoFactorAuthManager(),
94
+            \OC::$server->getBruteForceThrottler()
95
+        );
96 96
 
97
-		// Set URL explicitly due to reverse-proxy situations
98
-		$this->server->httpRequest->setUrl($this->request->getRequestUri());
99
-		$this->server->setBaseUri($this->baseUri);
97
+        // Set URL explicitly due to reverse-proxy situations
98
+        $this->server->httpRequest->setUrl($this->request->getRequestUri());
99
+        $this->server->setBaseUri($this->baseUri);
100 100
 
101
-		$this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig()));
102
-		$authPlugin = new Plugin();
103
-		$authPlugin->addBackend(new PublicAuth());
104
-		$this->server->addPlugin($authPlugin);
101
+        $this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig()));
102
+        $authPlugin = new Plugin();
103
+        $authPlugin->addBackend(new PublicAuth());
104
+        $this->server->addPlugin($authPlugin);
105 105
 
106
-		// allow setup of additional auth backends
107
-		$event = new SabrePluginEvent($this->server);
108
-		$dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event);
106
+        // allow setup of additional auth backends
107
+        $event = new SabrePluginEvent($this->server);
108
+        $dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event);
109 109
 
110
-		$bearerAuthBackend = new BearerAuth(
111
-			\OC::$server->getUserSession(),
112
-			\OC::$server->getSession(),
113
-			\OC::$server->getRequest()
114
-		);
115
-		$authPlugin->addBackend($bearerAuthBackend);
116
-		// because we are throwing exceptions this plugin has to be the last one
117
-		$authPlugin->addBackend($authBackend);
110
+        $bearerAuthBackend = new BearerAuth(
111
+            \OC::$server->getUserSession(),
112
+            \OC::$server->getSession(),
113
+            \OC::$server->getRequest()
114
+        );
115
+        $authPlugin->addBackend($bearerAuthBackend);
116
+        // because we are throwing exceptions this plugin has to be the last one
117
+        $authPlugin->addBackend($authBackend);
118 118
 
119
-		// debugging
120
-		if(\OC::$server->getConfig()->getSystemValue('debug', false)) {
121
-			$this->server->addPlugin(new \Sabre\DAV\Browser\Plugin());
122
-		} else {
123
-			$this->server->addPlugin(new DummyGetResponsePlugin());
124
-		}
119
+        // debugging
120
+        if(\OC::$server->getConfig()->getSystemValue('debug', false)) {
121
+            $this->server->addPlugin(new \Sabre\DAV\Browser\Plugin());
122
+        } else {
123
+            $this->server->addPlugin(new DummyGetResponsePlugin());
124
+        }
125 125
 
126
-		$this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $logger));
127
-		$this->server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin());
128
-		$this->server->addPlugin(new \Sabre\DAV\Sync\Plugin());
126
+        $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $logger));
127
+        $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin());
128
+        $this->server->addPlugin(new \Sabre\DAV\Sync\Plugin());
129 129
 
130
-		// acl
131
-		$acl = new DavAclPlugin();
132
-		$acl->principalCollectionSet = [
133
-			'principals/users', 'principals/groups'
134
-		];
135
-		$acl->defaultUsernamePath = 'principals/users';
136
-		$this->server->addPlugin($acl);
130
+        // acl
131
+        $acl = new DavAclPlugin();
132
+        $acl->principalCollectionSet = [
133
+            'principals/users', 'principals/groups'
134
+        ];
135
+        $acl->defaultUsernamePath = 'principals/users';
136
+        $this->server->addPlugin($acl);
137 137
 
138
-		// calendar plugins
139
-		if ($this->requestIsForSubtree(['calendars', 'principals'])) {
140
-			$this->server->addPlugin(new \OCA\DAV\CalDAV\Plugin());
141
-			$this->server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin());
142
-			$this->server->addPlugin(new \OCA\DAV\CalDAV\Schedule\Plugin());
143
-			if (\OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes') {
144
-				$this->server->addPlugin(\OC::$server->query(\OCA\DAV\CalDAV\Schedule\IMipPlugin::class));
145
-			}
146
-			$this->server->addPlugin(new \Sabre\CalDAV\Subscriptions\Plugin());
147
-			$this->server->addPlugin(new \Sabre\CalDAV\Notifications\Plugin());
148
-			$this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest()));
149
-			$this->server->addPlugin(new \OCA\DAV\CalDAV\Publishing\PublishPlugin(
150
-				\OC::$server->getConfig(),
151
-				\OC::$server->getURLGenerator()
152
-			));
153
-		}
138
+        // calendar plugins
139
+        if ($this->requestIsForSubtree(['calendars', 'principals'])) {
140
+            $this->server->addPlugin(new \OCA\DAV\CalDAV\Plugin());
141
+            $this->server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin());
142
+            $this->server->addPlugin(new \OCA\DAV\CalDAV\Schedule\Plugin());
143
+            if (\OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes') {
144
+                $this->server->addPlugin(\OC::$server->query(\OCA\DAV\CalDAV\Schedule\IMipPlugin::class));
145
+            }
146
+            $this->server->addPlugin(new \Sabre\CalDAV\Subscriptions\Plugin());
147
+            $this->server->addPlugin(new \Sabre\CalDAV\Notifications\Plugin());
148
+            $this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest()));
149
+            $this->server->addPlugin(new \OCA\DAV\CalDAV\Publishing\PublishPlugin(
150
+                \OC::$server->getConfig(),
151
+                \OC::$server->getURLGenerator()
152
+            ));
153
+        }
154 154
 
155
-		// addressbook plugins
156
-		if ($this->requestIsForSubtree(['addressbooks', 'principals'])) {
157
-			$this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest()));
158
-			$this->server->addPlugin(new \OCA\DAV\CardDAV\Plugin());
159
-			$this->server->addPlugin(new VCFExportPlugin());
160
-			$this->server->addPlugin(new ImageExportPlugin(new PhotoCache(\OC::$server->getAppDataDir('dav-photocache'))));
161
-		}
155
+        // addressbook plugins
156
+        if ($this->requestIsForSubtree(['addressbooks', 'principals'])) {
157
+            $this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest()));
158
+            $this->server->addPlugin(new \OCA\DAV\CardDAV\Plugin());
159
+            $this->server->addPlugin(new VCFExportPlugin());
160
+            $this->server->addPlugin(new ImageExportPlugin(new PhotoCache(\OC::$server->getAppDataDir('dav-photocache'))));
161
+        }
162 162
 
163
-		// system tags plugins
164
-		$this->server->addPlugin(new SystemTagPlugin(
165
-			\OC::$server->getSystemTagManager(),
166
-			\OC::$server->getGroupManager(),
167
-			\OC::$server->getUserSession()
168
-		));
163
+        // system tags plugins
164
+        $this->server->addPlugin(new SystemTagPlugin(
165
+            \OC::$server->getSystemTagManager(),
166
+            \OC::$server->getGroupManager(),
167
+            \OC::$server->getUserSession()
168
+        ));
169 169
 
170
-		// comments plugin
171
-		$this->server->addPlugin(new CommentsPlugin(
172
-			\OC::$server->getCommentsManager(),
173
-			\OC::$server->getUserSession()
174
-		));
170
+        // comments plugin
171
+        $this->server->addPlugin(new CommentsPlugin(
172
+            \OC::$server->getCommentsManager(),
173
+            \OC::$server->getUserSession()
174
+        ));
175 175
 
176
-		$this->server->addPlugin(new CopyEtagHeaderPlugin());
177
-		$this->server->addPlugin(new ChunkingPlugin());
176
+        $this->server->addPlugin(new CopyEtagHeaderPlugin());
177
+        $this->server->addPlugin(new ChunkingPlugin());
178 178
 
179
-		// allow setup of additional plugins
180
-		$dispatcher->dispatch('OCA\DAV\Connector\Sabre::addPlugin', $event);
179
+        // allow setup of additional plugins
180
+        $dispatcher->dispatch('OCA\DAV\Connector\Sabre::addPlugin', $event);
181 181
 
182
-		// Some WebDAV clients do require Class 2 WebDAV support (locking), since
183
-		// we do not provide locking we emulate it using a fake locking plugin.
184
-		if($request->isUserAgent([
185
-			'/WebDAVFS/',
186
-			'/OneNote/',
187
-			'/^Microsoft-WebDAV/',// Microsoft-WebDAV-MiniRedir/6.1.7601
188
-		])) {
189
-			$this->server->addPlugin(new FakeLockerPlugin());
190
-		}
182
+        // Some WebDAV clients do require Class 2 WebDAV support (locking), since
183
+        // we do not provide locking we emulate it using a fake locking plugin.
184
+        if($request->isUserAgent([
185
+            '/WebDAVFS/',
186
+            '/OneNote/',
187
+            '/^Microsoft-WebDAV/',// Microsoft-WebDAV-MiniRedir/6.1.7601
188
+        ])) {
189
+            $this->server->addPlugin(new FakeLockerPlugin());
190
+        }
191 191
 
192
-		if (BrowserErrorPagePlugin::isBrowserRequest($request)) {
193
-			$this->server->addPlugin(new BrowserErrorPagePlugin());
194
-		}
192
+        if (BrowserErrorPagePlugin::isBrowserRequest($request)) {
193
+            $this->server->addPlugin(new BrowserErrorPagePlugin());
194
+        }
195 195
 
196
-		// wait with registering these until auth is handled and the filesystem is setup
197
-		$this->server->on('beforeMethod', function () use ($root) {
198
-			// custom properties plugin must be the last one
199
-			$userSession = \OC::$server->getUserSession();
200
-			$user = $userSession->getUser();
201
-			if ($user !== null) {
202
-				$view = \OC\Files\Filesystem::getView();
203
-				$this->server->addPlugin(
204
-					new FilesPlugin(
205
-						$this->server->tree,
206
-						\OC::$server->getConfig(),
207
-						$this->request,
208
-						\OC::$server->getPreviewManager(),
209
-						false,
210
-						!\OC::$server->getConfig()->getSystemValue('debug', false)
211
-					)
212
-				);
196
+        // wait with registering these until auth is handled and the filesystem is setup
197
+        $this->server->on('beforeMethod', function () use ($root) {
198
+            // custom properties plugin must be the last one
199
+            $userSession = \OC::$server->getUserSession();
200
+            $user = $userSession->getUser();
201
+            if ($user !== null) {
202
+                $view = \OC\Files\Filesystem::getView();
203
+                $this->server->addPlugin(
204
+                    new FilesPlugin(
205
+                        $this->server->tree,
206
+                        \OC::$server->getConfig(),
207
+                        $this->request,
208
+                        \OC::$server->getPreviewManager(),
209
+                        false,
210
+                        !\OC::$server->getConfig()->getSystemValue('debug', false)
211
+                    )
212
+                );
213 213
 
214
-				$this->server->addPlugin(
215
-					new \Sabre\DAV\PropertyStorage\Plugin(
216
-						new CustomPropertiesBackend(
217
-							$this->server->tree,
218
-							\OC::$server->getDatabaseConnection(),
219
-							\OC::$server->getUserSession()->getUser()
220
-						)
221
-					)
222
-				);
223
-				if ($view !== null) {
224
-					$this->server->addPlugin(
225
-						new QuotaPlugin($view, false));
226
-				}
227
-				$this->server->addPlugin(
228
-					new TagsPlugin(
229
-						$this->server->tree, \OC::$server->getTagManager()
230
-					)
231
-				);
232
-				// TODO: switch to LazyUserFolder
233
-				$userFolder = \OC::$server->getUserFolder();
234
-				$this->server->addPlugin(new SharesPlugin(
235
-					$this->server->tree,
236
-					$userSession,
237
-					$userFolder,
238
-					\OC::$server->getShareManager()
239
-				));
240
-				$this->server->addPlugin(new CommentPropertiesPlugin(
241
-					\OC::$server->getCommentsManager(),
242
-					$userSession
243
-				));
244
-				$this->server->addPlugin(new \OCA\DAV\CalDAV\Search\SearchPlugin());
245
-				if ($view !== null) {
246
-					$this->server->addPlugin(new FilesReportPlugin(
247
-						$this->server->tree,
248
-						$view,
249
-						\OC::$server->getSystemTagManager(),
250
-						\OC::$server->getSystemTagObjectMapper(),
251
-						\OC::$server->getTagManager(),
252
-						$userSession,
253
-						\OC::$server->getGroupManager(),
254
-						$userFolder
255
-					));
256
-					$this->server->addPlugin(new SearchPlugin(new \OCA\DAV\Files\FileSearchBackend(
257
-						$this->server->tree,
258
-						$user,
259
-						\OC::$server->getRootFolder(),
260
-						\OC::$server->getShareManager(),
261
-						$view
262
-					)));
263
-				}
264
-				$this->server->addPlugin(new \OCA\DAV\CalDAV\BirthdayCalendar\EnablePlugin(
265
-					\OC::$server->getConfig(),
266
-					\OC::$server->query(BirthdayService::class)
267
-				));
268
-			}
214
+                $this->server->addPlugin(
215
+                    new \Sabre\DAV\PropertyStorage\Plugin(
216
+                        new CustomPropertiesBackend(
217
+                            $this->server->tree,
218
+                            \OC::$server->getDatabaseConnection(),
219
+                            \OC::$server->getUserSession()->getUser()
220
+                        )
221
+                    )
222
+                );
223
+                if ($view !== null) {
224
+                    $this->server->addPlugin(
225
+                        new QuotaPlugin($view, false));
226
+                }
227
+                $this->server->addPlugin(
228
+                    new TagsPlugin(
229
+                        $this->server->tree, \OC::$server->getTagManager()
230
+                    )
231
+                );
232
+                // TODO: switch to LazyUserFolder
233
+                $userFolder = \OC::$server->getUserFolder();
234
+                $this->server->addPlugin(new SharesPlugin(
235
+                    $this->server->tree,
236
+                    $userSession,
237
+                    $userFolder,
238
+                    \OC::$server->getShareManager()
239
+                ));
240
+                $this->server->addPlugin(new CommentPropertiesPlugin(
241
+                    \OC::$server->getCommentsManager(),
242
+                    $userSession
243
+                ));
244
+                $this->server->addPlugin(new \OCA\DAV\CalDAV\Search\SearchPlugin());
245
+                if ($view !== null) {
246
+                    $this->server->addPlugin(new FilesReportPlugin(
247
+                        $this->server->tree,
248
+                        $view,
249
+                        \OC::$server->getSystemTagManager(),
250
+                        \OC::$server->getSystemTagObjectMapper(),
251
+                        \OC::$server->getTagManager(),
252
+                        $userSession,
253
+                        \OC::$server->getGroupManager(),
254
+                        $userFolder
255
+                    ));
256
+                    $this->server->addPlugin(new SearchPlugin(new \OCA\DAV\Files\FileSearchBackend(
257
+                        $this->server->tree,
258
+                        $user,
259
+                        \OC::$server->getRootFolder(),
260
+                        \OC::$server->getShareManager(),
261
+                        $view
262
+                    )));
263
+                }
264
+                $this->server->addPlugin(new \OCA\DAV\CalDAV\BirthdayCalendar\EnablePlugin(
265
+                    \OC::$server->getConfig(),
266
+                    \OC::$server->query(BirthdayService::class)
267
+                ));
268
+            }
269 269
 
270
-			// register plugins from apps
271
-			$pluginManager = new PluginManager(
272
-				\OC::$server,
273
-				\OC::$server->getAppManager()
274
-			);
275
-			foreach ($pluginManager->getAppPlugins() as $appPlugin) {
276
-				$this->server->addPlugin($appPlugin);
277
-			}
278
-			foreach ($pluginManager->getAppCollections() as $appCollection) {
279
-				$root->addChild($appCollection);
280
-			}
281
-		});
282
-	}
270
+            // register plugins from apps
271
+            $pluginManager = new PluginManager(
272
+                \OC::$server,
273
+                \OC::$server->getAppManager()
274
+            );
275
+            foreach ($pluginManager->getAppPlugins() as $appPlugin) {
276
+                $this->server->addPlugin($appPlugin);
277
+            }
278
+            foreach ($pluginManager->getAppCollections() as $appCollection) {
279
+                $root->addChild($appCollection);
280
+            }
281
+        });
282
+    }
283 283
 
284
-	public function exec() {
285
-		$this->server->exec();
286
-	}
284
+    public function exec() {
285
+        $this->server->exec();
286
+    }
287 287
 
288
-	private function requestIsForSubtree(array $subTrees): bool {
289
-		foreach ($subTrees as $subTree) {
290
-			$subTree = trim($subTree, ' /');
291
-			if (strpos($this->server->getRequestUri(), $subTree.'/') === 0) {
292
-				return true;
293
-			}
294
-		}
295
-		return false;
296
-	}
288
+    private function requestIsForSubtree(array $subTrees): bool {
289
+        foreach ($subTrees as $subTree) {
290
+            $subTree = trim($subTree, ' /');
291
+            if (strpos($this->server->getRequestUri(), $subTree.'/') === 0) {
292
+                return true;
293
+            }
294
+        }
295
+        return false;
296
+    }
297 297
 }
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/Principal.php 2 patches
Indentation   +316 added lines, -316 removed lines patch added patch discarded remove patch
@@ -42,321 +42,321 @@
 block discarded – undo
42 42
 
43 43
 class Principal implements BackendInterface {
44 44
 
45
-	/** @var IUserManager */
46
-	private $userManager;
47
-
48
-	/** @var IGroupManager */
49
-	private $groupManager;
50
-
51
-	/** @var IShareManager */
52
-	private $shareManager;
53
-
54
-	/** @var IUserSession */
55
-	private $userSession;
56
-
57
-	/** @var string */
58
-	private $principalPrefix;
59
-
60
-	/** @var bool */
61
-	private $hasGroups;
62
-
63
-	/**
64
-	 * @param IUserManager $userManager
65
-	 * @param IGroupManager $groupManager
66
-	 * @param IShareManager $shareManager
67
-	 * @param IUserSession $userSession
68
-	 * @param string $principalPrefix
69
-	 */
70
-	public function __construct(IUserManager $userManager,
71
-								IGroupManager $groupManager,
72
-								IShareManager $shareManager,
73
-								IUserSession $userSession,
74
-								$principalPrefix = 'principals/users/') {
75
-		$this->userManager = $userManager;
76
-		$this->groupManager = $groupManager;
77
-		$this->shareManager = $shareManager;
78
-		$this->userSession = $userSession;
79
-		$this->principalPrefix = trim($principalPrefix, '/');
80
-		$this->hasGroups = ($principalPrefix === 'principals/users/');
81
-	}
82
-
83
-	/**
84
-	 * Returns a list of principals based on a prefix.
85
-	 *
86
-	 * This prefix will often contain something like 'principals'. You are only
87
-	 * expected to return principals that are in this base path.
88
-	 *
89
-	 * You are expected to return at least a 'uri' for every user, you can
90
-	 * return any additional properties if you wish so. Common properties are:
91
-	 *   {DAV:}displayname
92
-	 *
93
-	 * @param string $prefixPath
94
-	 * @return string[]
95
-	 */
96
-	public function getPrincipalsByPrefix($prefixPath) {
97
-		$principals = [];
98
-
99
-		if ($prefixPath === $this->principalPrefix) {
100
-			foreach($this->userManager->search('') as $user) {
101
-				$principals[] = $this->userToPrincipal($user);
102
-			}
103
-		}
104
-
105
-		return $principals;
106
-	}
107
-
108
-	/**
109
-	 * Returns a specific principal, specified by it's path.
110
-	 * The returned structure should be the exact same as from
111
-	 * getPrincipalsByPrefix.
112
-	 *
113
-	 * @param string $path
114
-	 * @return array
115
-	 */
116
-	public function getPrincipalByPath($path) {
117
-		list($prefix, $name) = \Sabre\Uri\split($path);
118
-
119
-		if ($prefix === $this->principalPrefix) {
120
-			$user = $this->userManager->get($name);
121
-
122
-			if ($user !== null) {
123
-				return $this->userToPrincipal($user);
124
-			}
125
-		}
126
-		return null;
127
-	}
128
-
129
-	/**
130
-	 * Returns the list of members for a group-principal
131
-	 *
132
-	 * @param string $principal
133
-	 * @return string[]
134
-	 * @throws Exception
135
-	 */
136
-	public function getGroupMemberSet($principal) {
137
-		// TODO: for now the group principal has only one member, the user itself
138
-		$principal = $this->getPrincipalByPath($principal);
139
-		if (!$principal) {
140
-			throw new Exception('Principal not found');
141
-		}
142
-
143
-		return [$principal['uri']];
144
-	}
145
-
146
-	/**
147
-	 * Returns the list of groups a principal is a member of
148
-	 *
149
-	 * @param string $principal
150
-	 * @param bool $needGroups
151
-	 * @return array
152
-	 * @throws Exception
153
-	 */
154
-	public function getGroupMembership($principal, $needGroups = false) {
155
-		list($prefix, $name) = \Sabre\Uri\split($principal);
156
-
157
-		if ($prefix === $this->principalPrefix) {
158
-			$user = $this->userManager->get($name);
159
-			if (!$user) {
160
-				throw new Exception('Principal not found');
161
-			}
162
-
163
-			if ($this->hasGroups || $needGroups) {
164
-				$groups = $this->groupManager->getUserGroups($user);
165
-				$groups = array_map(function($group) {
166
-					/** @var IGroup $group */
167
-					return 'principals/groups/' . urlencode($group->getGID());
168
-				}, $groups);
169
-
170
-				return $groups;
171
-			}
172
-		}
173
-		return [];
174
-	}
175
-
176
-	/**
177
-	 * Updates the list of group members for a group principal.
178
-	 *
179
-	 * The principals should be passed as a list of uri's.
180
-	 *
181
-	 * @param string $principal
182
-	 * @param string[] $members
183
-	 * @throws Exception
184
-	 */
185
-	public function setGroupMemberSet($principal, array $members) {
186
-		throw new Exception('Setting members of the group is not supported yet');
187
-	}
188
-
189
-	/**
190
-	 * @param string $path
191
-	 * @param PropPatch $propPatch
192
-	 * @return int
193
-	 */
194
-	function updatePrincipal($path, PropPatch $propPatch) {
195
-		return 0;
196
-	}
197
-
198
-	/**
199
-	 * Search user principals
200
-	 *
201
-	 * @param array $searchProperties
202
-	 * @param string $test
203
-	 * @return array
204
-	 */
205
-	protected function searchUserPrincipals(array $searchProperties, $test = 'allof') {
206
-		$results = [];
207
-
208
-		// If sharing is disabled, return the empty array
209
-		if (!$this->shareManager->shareApiEnabled()) {
210
-			return [];
211
-		}
212
-
213
-		// If sharing is restricted to group members only,
214
-		// return only members that have groups in common
215
-		$restrictGroups = false;
216
-		if ($this->shareManager->shareWithGroupMembersOnly()) {
217
-			$user = $this->userSession->getUser();
218
-			if (!$user) {
219
-				return [];
220
-			}
221
-
222
-			$restrictGroups = $this->groupManager->getUserGroupIds($user);
223
-		}
224
-
225
-		foreach ($searchProperties as $prop => $value) {
226
-			switch ($prop) {
227
-				case '{http://sabredav.org/ns}email-address':
228
-					$users = $this->userManager->getByEmail($value);
229
-
230
-					$results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) {
231
-						// is sharing restricted to groups only?
232
-						if ($restrictGroups !== false) {
233
-							$userGroups = $this->groupManager->getUserGroupIds($user);
234
-							if (count(array_intersect($userGroups, $restrictGroups)) === 0) {
235
-								return $carry;
236
-							}
237
-						}
238
-
239
-						$carry[] = $this->principalPrefix . '/' . $user->getUID();
240
-						return $carry;
241
-					}, []);
242
-					break;
243
-
244
-				default:
245
-					$results[] = [];
246
-					break;
247
-			}
248
-		}
249
-
250
-		// results is an array of arrays, so this is not the first search result
251
-		// but the results of the first searchProperty
252
-		if (count($results) === 1) {
253
-			return $results[0];
254
-		}
255
-
256
-		switch ($test) {
257
-			case 'anyof':
258
-				return array_unique(array_merge(...$results));
259
-
260
-			case 'allof':
261
-			default:
262
-				return array_intersect(...$results);
263
-		}
264
-	}
265
-
266
-	/**
267
-	 * @param string $prefixPath
268
-	 * @param array $searchProperties
269
-	 * @param string $test
270
-	 * @return array
271
-	 */
272
-	function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') {
273
-		if (count($searchProperties) === 0) {
274
-			return [];
275
-		}
276
-
277
-		switch ($prefixPath) {
278
-			case 'principals/users':
279
-				return $this->searchUserPrincipals($searchProperties, $test);
280
-
281
-			default:
282
-				return [];
283
-		}
284
-	}
285
-
286
-	/**
287
-	 * @param string $uri
288
-	 * @param string $principalPrefix
289
-	 * @return string
290
-	 */
291
-	function findByUri($uri, $principalPrefix) {
292
-		// If sharing is disabled, return null as in user not found
293
-		if (!$this->shareManager->shareApiEnabled()) {
294
-			return null;
295
-		}
296
-
297
-		// If sharing is restricted to group members only,
298
-		// return only members that have groups in common
299
-		$restrictGroups = false;
300
-		if ($this->shareManager->shareWithGroupMembersOnly()) {
301
-			$user = $this->userSession->getUser();
302
-			if (!$user) {
303
-				return null;
304
-			}
305
-
306
-			$restrictGroups = $this->groupManager->getUserGroupIds($user);
307
-		}
308
-
309
-		if (strpos($uri, 'mailto:') === 0) {
310
-			if ($principalPrefix === 'principals/users') {
311
-				$users = $this->userManager->getByEmail(substr($uri, 7));
312
-				if (count($users) !== 1) {
313
-					return null;
314
-				}
315
-				$user = $users[0];
316
-
317
-				if ($restrictGroups !== false) {
318
-					$userGroups = $this->groupManager->getUserGroupIds($user);
319
-					if (count(array_intersect($userGroups, $restrictGroups)) === 0) {
320
-						return null;
321
-					}
322
-				}
323
-
324
-				return $this->principalPrefix . '/' . $user->getUID();
325
-			}
326
-		}
327
-		if (substr($uri, 0, 10) === 'principal:') {
328
-			$principal = substr($uri, 10);
329
-			$principal = $this->getPrincipalByPath($principal);
330
-			if ($principal !== null) {
331
-				return $principal['uri'];
332
-			}
333
-		}
334
-
335
-		return null;
336
-	}
337
-
338
-	/**
339
-	 * @param IUser $user
340
-	 * @return array
341
-	 */
342
-	protected function userToPrincipal($user) {
343
-		$userId = $user->getUID();
344
-		$displayName = $user->getDisplayName();
345
-		$principal = [
346
-				'uri' => $this->principalPrefix . '/' . $userId,
347
-				'{DAV:}displayname' => is_null($displayName) ? $userId : $displayName,
348
-		];
349
-
350
-		$email = $user->getEMailAddress();
351
-		if (!empty($email)) {
352
-			$principal['{http://sabredav.org/ns}email-address'] = $email;
353
-		}
354
-
355
-		return $principal;
356
-	}
357
-
358
-	public function getPrincipalPrefix() {
359
-		return $this->principalPrefix;
360
-	}
45
+    /** @var IUserManager */
46
+    private $userManager;
47
+
48
+    /** @var IGroupManager */
49
+    private $groupManager;
50
+
51
+    /** @var IShareManager */
52
+    private $shareManager;
53
+
54
+    /** @var IUserSession */
55
+    private $userSession;
56
+
57
+    /** @var string */
58
+    private $principalPrefix;
59
+
60
+    /** @var bool */
61
+    private $hasGroups;
62
+
63
+    /**
64
+     * @param IUserManager $userManager
65
+     * @param IGroupManager $groupManager
66
+     * @param IShareManager $shareManager
67
+     * @param IUserSession $userSession
68
+     * @param string $principalPrefix
69
+     */
70
+    public function __construct(IUserManager $userManager,
71
+                                IGroupManager $groupManager,
72
+                                IShareManager $shareManager,
73
+                                IUserSession $userSession,
74
+                                $principalPrefix = 'principals/users/') {
75
+        $this->userManager = $userManager;
76
+        $this->groupManager = $groupManager;
77
+        $this->shareManager = $shareManager;
78
+        $this->userSession = $userSession;
79
+        $this->principalPrefix = trim($principalPrefix, '/');
80
+        $this->hasGroups = ($principalPrefix === 'principals/users/');
81
+    }
82
+
83
+    /**
84
+     * Returns a list of principals based on a prefix.
85
+     *
86
+     * This prefix will often contain something like 'principals'. You are only
87
+     * expected to return principals that are in this base path.
88
+     *
89
+     * You are expected to return at least a 'uri' for every user, you can
90
+     * return any additional properties if you wish so. Common properties are:
91
+     *   {DAV:}displayname
92
+     *
93
+     * @param string $prefixPath
94
+     * @return string[]
95
+     */
96
+    public function getPrincipalsByPrefix($prefixPath) {
97
+        $principals = [];
98
+
99
+        if ($prefixPath === $this->principalPrefix) {
100
+            foreach($this->userManager->search('') as $user) {
101
+                $principals[] = $this->userToPrincipal($user);
102
+            }
103
+        }
104
+
105
+        return $principals;
106
+    }
107
+
108
+    /**
109
+     * Returns a specific principal, specified by it's path.
110
+     * The returned structure should be the exact same as from
111
+     * getPrincipalsByPrefix.
112
+     *
113
+     * @param string $path
114
+     * @return array
115
+     */
116
+    public function getPrincipalByPath($path) {
117
+        list($prefix, $name) = \Sabre\Uri\split($path);
118
+
119
+        if ($prefix === $this->principalPrefix) {
120
+            $user = $this->userManager->get($name);
121
+
122
+            if ($user !== null) {
123
+                return $this->userToPrincipal($user);
124
+            }
125
+        }
126
+        return null;
127
+    }
128
+
129
+    /**
130
+     * Returns the list of members for a group-principal
131
+     *
132
+     * @param string $principal
133
+     * @return string[]
134
+     * @throws Exception
135
+     */
136
+    public function getGroupMemberSet($principal) {
137
+        // TODO: for now the group principal has only one member, the user itself
138
+        $principal = $this->getPrincipalByPath($principal);
139
+        if (!$principal) {
140
+            throw new Exception('Principal not found');
141
+        }
142
+
143
+        return [$principal['uri']];
144
+    }
145
+
146
+    /**
147
+     * Returns the list of groups a principal is a member of
148
+     *
149
+     * @param string $principal
150
+     * @param bool $needGroups
151
+     * @return array
152
+     * @throws Exception
153
+     */
154
+    public function getGroupMembership($principal, $needGroups = false) {
155
+        list($prefix, $name) = \Sabre\Uri\split($principal);
156
+
157
+        if ($prefix === $this->principalPrefix) {
158
+            $user = $this->userManager->get($name);
159
+            if (!$user) {
160
+                throw new Exception('Principal not found');
161
+            }
162
+
163
+            if ($this->hasGroups || $needGroups) {
164
+                $groups = $this->groupManager->getUserGroups($user);
165
+                $groups = array_map(function($group) {
166
+                    /** @var IGroup $group */
167
+                    return 'principals/groups/' . urlencode($group->getGID());
168
+                }, $groups);
169
+
170
+                return $groups;
171
+            }
172
+        }
173
+        return [];
174
+    }
175
+
176
+    /**
177
+     * Updates the list of group members for a group principal.
178
+     *
179
+     * The principals should be passed as a list of uri's.
180
+     *
181
+     * @param string $principal
182
+     * @param string[] $members
183
+     * @throws Exception
184
+     */
185
+    public function setGroupMemberSet($principal, array $members) {
186
+        throw new Exception('Setting members of the group is not supported yet');
187
+    }
188
+
189
+    /**
190
+     * @param string $path
191
+     * @param PropPatch $propPatch
192
+     * @return int
193
+     */
194
+    function updatePrincipal($path, PropPatch $propPatch) {
195
+        return 0;
196
+    }
197
+
198
+    /**
199
+     * Search user principals
200
+     *
201
+     * @param array $searchProperties
202
+     * @param string $test
203
+     * @return array
204
+     */
205
+    protected function searchUserPrincipals(array $searchProperties, $test = 'allof') {
206
+        $results = [];
207
+
208
+        // If sharing is disabled, return the empty array
209
+        if (!$this->shareManager->shareApiEnabled()) {
210
+            return [];
211
+        }
212
+
213
+        // If sharing is restricted to group members only,
214
+        // return only members that have groups in common
215
+        $restrictGroups = false;
216
+        if ($this->shareManager->shareWithGroupMembersOnly()) {
217
+            $user = $this->userSession->getUser();
218
+            if (!$user) {
219
+                return [];
220
+            }
221
+
222
+            $restrictGroups = $this->groupManager->getUserGroupIds($user);
223
+        }
224
+
225
+        foreach ($searchProperties as $prop => $value) {
226
+            switch ($prop) {
227
+                case '{http://sabredav.org/ns}email-address':
228
+                    $users = $this->userManager->getByEmail($value);
229
+
230
+                    $results[] = array_reduce($users, function(array $carry, IUser $user) use ($restrictGroups) {
231
+                        // is sharing restricted to groups only?
232
+                        if ($restrictGroups !== false) {
233
+                            $userGroups = $this->groupManager->getUserGroupIds($user);
234
+                            if (count(array_intersect($userGroups, $restrictGroups)) === 0) {
235
+                                return $carry;
236
+                            }
237
+                        }
238
+
239
+                        $carry[] = $this->principalPrefix . '/' . $user->getUID();
240
+                        return $carry;
241
+                    }, []);
242
+                    break;
243
+
244
+                default:
245
+                    $results[] = [];
246
+                    break;
247
+            }
248
+        }
249
+
250
+        // results is an array of arrays, so this is not the first search result
251
+        // but the results of the first searchProperty
252
+        if (count($results) === 1) {
253
+            return $results[0];
254
+        }
255
+
256
+        switch ($test) {
257
+            case 'anyof':
258
+                return array_unique(array_merge(...$results));
259
+
260
+            case 'allof':
261
+            default:
262
+                return array_intersect(...$results);
263
+        }
264
+    }
265
+
266
+    /**
267
+     * @param string $prefixPath
268
+     * @param array $searchProperties
269
+     * @param string $test
270
+     * @return array
271
+     */
272
+    function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') {
273
+        if (count($searchProperties) === 0) {
274
+            return [];
275
+        }
276
+
277
+        switch ($prefixPath) {
278
+            case 'principals/users':
279
+                return $this->searchUserPrincipals($searchProperties, $test);
280
+
281
+            default:
282
+                return [];
283
+        }
284
+    }
285
+
286
+    /**
287
+     * @param string $uri
288
+     * @param string $principalPrefix
289
+     * @return string
290
+     */
291
+    function findByUri($uri, $principalPrefix) {
292
+        // If sharing is disabled, return null as in user not found
293
+        if (!$this->shareManager->shareApiEnabled()) {
294
+            return null;
295
+        }
296
+
297
+        // If sharing is restricted to group members only,
298
+        // return only members that have groups in common
299
+        $restrictGroups = false;
300
+        if ($this->shareManager->shareWithGroupMembersOnly()) {
301
+            $user = $this->userSession->getUser();
302
+            if (!$user) {
303
+                return null;
304
+            }
305
+
306
+            $restrictGroups = $this->groupManager->getUserGroupIds($user);
307
+        }
308
+
309
+        if (strpos($uri, 'mailto:') === 0) {
310
+            if ($principalPrefix === 'principals/users') {
311
+                $users = $this->userManager->getByEmail(substr($uri, 7));
312
+                if (count($users) !== 1) {
313
+                    return null;
314
+                }
315
+                $user = $users[0];
316
+
317
+                if ($restrictGroups !== false) {
318
+                    $userGroups = $this->groupManager->getUserGroupIds($user);
319
+                    if (count(array_intersect($userGroups, $restrictGroups)) === 0) {
320
+                        return null;
321
+                    }
322
+                }
323
+
324
+                return $this->principalPrefix . '/' . $user->getUID();
325
+            }
326
+        }
327
+        if (substr($uri, 0, 10) === 'principal:') {
328
+            $principal = substr($uri, 10);
329
+            $principal = $this->getPrincipalByPath($principal);
330
+            if ($principal !== null) {
331
+                return $principal['uri'];
332
+            }
333
+        }
334
+
335
+        return null;
336
+    }
337
+
338
+    /**
339
+     * @param IUser $user
340
+     * @return array
341
+     */
342
+    protected function userToPrincipal($user) {
343
+        $userId = $user->getUID();
344
+        $displayName = $user->getDisplayName();
345
+        $principal = [
346
+                'uri' => $this->principalPrefix . '/' . $userId,
347
+                '{DAV:}displayname' => is_null($displayName) ? $userId : $displayName,
348
+        ];
349
+
350
+        $email = $user->getEMailAddress();
351
+        if (!empty($email)) {
352
+            $principal['{http://sabredav.org/ns}email-address'] = $email;
353
+        }
354
+
355
+        return $principal;
356
+    }
357
+
358
+    public function getPrincipalPrefix() {
359
+        return $this->principalPrefix;
360
+    }
361 361
 
362 362
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 		$principals = [];
98 98
 
99 99
 		if ($prefixPath === $this->principalPrefix) {
100
-			foreach($this->userManager->search('') as $user) {
100
+			foreach ($this->userManager->search('') as $user) {
101 101
 				$principals[] = $this->userToPrincipal($user);
102 102
 			}
103 103
 		}
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 				$groups = $this->groupManager->getUserGroups($user);
165 165
 				$groups = array_map(function($group) {
166 166
 					/** @var IGroup $group */
167
-					return 'principals/groups/' . urlencode($group->getGID());
167
+					return 'principals/groups/'.urlencode($group->getGID());
168 168
 				}, $groups);
169 169
 
170 170
 				return $groups;
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 							}
237 237
 						}
238 238
 
239
-						$carry[] = $this->principalPrefix . '/' . $user->getUID();
239
+						$carry[] = $this->principalPrefix.'/'.$user->getUID();
240 240
 						return $carry;
241 241
 					}, []);
242 242
 					break;
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 					}
322 322
 				}
323 323
 
324
-				return $this->principalPrefix . '/' . $user->getUID();
324
+				return $this->principalPrefix.'/'.$user->getUID();
325 325
 			}
326 326
 		}
327 327
 		if (substr($uri, 0, 10) === 'principal:') {
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 		$userId = $user->getUID();
344 344
 		$displayName = $user->getDisplayName();
345 345
 		$principal = [
346
-				'uri' => $this->principalPrefix . '/' . $userId,
346
+				'uri' => $this->principalPrefix.'/'.$userId,
347 347
 				'{DAV:}displayname' => is_null($displayName) ? $userId : $displayName,
348 348
 		];
349 349
 
Please login to merge, or discard this patch.
apps/dav/lib/DAV/Sharing/Backend.php 2 patches
Indentation   +210 added lines, -210 removed lines patch added patch discarded remove patch
@@ -32,214 +32,214 @@
 block discarded – undo
32 32
 
33 33
 class Backend {
34 34
 
35
-	/** @var IDBConnection */
36
-	private $db;
37
-	/** @var IUserManager */
38
-	private $userManager;
39
-	/** @var IGroupManager */
40
-	private $groupManager;
41
-	/** @var Principal */
42
-	private $principalBackend;
43
-	/** @var string */
44
-	private $resourceType;
45
-
46
-	const ACCESS_OWNER = 1;
47
-	const ACCESS_READ_WRITE = 2;
48
-	const ACCESS_READ = 3;
49
-
50
-	/**
51
-	 * @param IDBConnection $db
52
-	 * @param IUserManager $userManager
53
-	 * @param IGroupManager $groupManager
54
-	 * @param Principal $principalBackend
55
-	 * @param string $resourceType
56
-	 */
57
-	public function __construct(IDBConnection $db, IUserManager $userManager, IGroupManager $groupManager, Principal $principalBackend, $resourceType) {
58
-		$this->db = $db;
59
-		$this->userManager = $userManager;
60
-		$this->groupManager = $groupManager;
61
-		$this->principalBackend = $principalBackend;
62
-		$this->resourceType = $resourceType;
63
-	}
64
-
65
-	/**
66
-	 * @param IShareable $shareable
67
-	 * @param string[] $add
68
-	 * @param string[] $remove
69
-	 */
70
-	public function updateShares(IShareable $shareable, array $add, array $remove) {
71
-		foreach($add as $element) {
72
-			$principal = $this->principalBackend->findByUri($element['href'], '');
73
-			if ($principal !== '') {
74
-				$this->shareWith($shareable, $element);
75
-			}
76
-		}
77
-		foreach($remove as $element) {
78
-			$principal = $this->principalBackend->findByUri($element, '');
79
-			if ($principal !== '') {
80
-				$this->unshare($shareable, $element);
81
-			}
82
-		}
83
-	}
84
-
85
-	/**
86
-	 * @param IShareable $shareable
87
-	 * @param string $element
88
-	 */
89
-	private function shareWith($shareable, $element) {
90
-		$user = $element['href'];
91
-		$parts = explode(':', $user, 2);
92
-		if ($parts[0] !== 'principal') {
93
-			return;
94
-		}
95
-
96
-		// don't share with owner
97
-		if ($shareable->getOwner() === $parts[1]) {
98
-			return;
99
-		}
100
-
101
-		$principal = explode('/', $parts[1], 3);
102
-		if (count($principal) !== 3 || $principal[0] !== 'principals' || !in_array($principal[1], ['users', 'groups'], true)) {
103
-			// Invalid principal
104
-			return;
105
-		}
106
-
107
-		if (($principal[1] === 'users' && !$this->userManager->userExists($principal[2])) ||
108
-			($principal[1] === 'groups' && !$this->groupManager->groupExists($principal[2]))) {
109
-			// User or group does not exist
110
-			return;
111
-		}
112
-
113
-		// remove the share if it already exists
114
-		$this->unshare($shareable, $element['href']);
115
-		$access = self::ACCESS_READ;
116
-		if (isset($element['readOnly'])) {
117
-			$access = $element['readOnly'] ? self::ACCESS_READ : self::ACCESS_READ_WRITE;
118
-		}
119
-
120
-		$query = $this->db->getQueryBuilder();
121
-		$query->insert('dav_shares')
122
-			->values([
123
-				'principaluri' => $query->createNamedParameter($parts[1]),
124
-				'type' => $query->createNamedParameter($this->resourceType),
125
-				'access' => $query->createNamedParameter($access),
126
-				'resourceid' => $query->createNamedParameter($shareable->getResourceId())
127
-			]);
128
-		$query->execute();
129
-	}
130
-
131
-	/**
132
-	 * @param $resourceId
133
-	 */
134
-	public function deleteAllShares($resourceId) {
135
-		$query = $this->db->getQueryBuilder();
136
-		$query->delete('dav_shares')
137
-			->where($query->expr()->eq('resourceid', $query->createNamedParameter($resourceId)))
138
-			->andWhere($query->expr()->eq('type', $query->createNamedParameter($this->resourceType)))
139
-			->execute();
140
-	}
141
-
142
-	public function deleteAllSharesByUser($principaluri) {
143
-		$query = $this->db->getQueryBuilder();
144
-		$query->delete('dav_shares')
145
-			->where($query->expr()->eq('principaluri', $query->createNamedParameter($principaluri)))
146
-			->andWhere($query->expr()->eq('type', $query->createNamedParameter($this->resourceType)))
147
-			->execute();
148
-	}
149
-
150
-	/**
151
-	 * @param IShareable $shareable
152
-	 * @param string $element
153
-	 */
154
-	private function unshare($shareable, $element) {
155
-		$parts = explode(':', $element, 2);
156
-		if ($parts[0] !== 'principal') {
157
-			return;
158
-		}
159
-
160
-		// don't share with owner
161
-		if ($shareable->getOwner() === $parts[1]) {
162
-			return;
163
-		}
164
-
165
-		$query = $this->db->getQueryBuilder();
166
-		$query->delete('dav_shares')
167
-			->where($query->expr()->eq('resourceid', $query->createNamedParameter($shareable->getResourceId())))
168
-			->andWhere($query->expr()->eq('type', $query->createNamedParameter($this->resourceType)))
169
-			->andWhere($query->expr()->eq('principaluri', $query->createNamedParameter($parts[1])))
170
-		;
171
-		$query->execute();
172
-	}
173
-
174
-	/**
175
-	 * Returns the list of people whom this resource is shared with.
176
-	 *
177
-	 * Every element in this array should have the following properties:
178
-	 *   * href - Often a mailto: address
179
-	 *   * commonName - Optional, for example a first + last name
180
-	 *   * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants.
181
-	 *   * readOnly - boolean
182
-	 *   * summary - Optional, a description for the share
183
-	 *
184
-	 * @param int $resourceId
185
-	 * @return array
186
-	 */
187
-	public function getShares($resourceId) {
188
-		$query = $this->db->getQueryBuilder();
189
-		$result = $query->select(['principaluri', 'access'])
190
-			->from('dav_shares')
191
-			->where($query->expr()->eq('resourceid', $query->createNamedParameter($resourceId)))
192
-			->andWhere($query->expr()->eq('type', $query->createNamedParameter($this->resourceType)))
193
-			->execute();
194
-
195
-		$shares = [];
196
-		while($row = $result->fetch()) {
197
-			$p = $this->principalBackend->getPrincipalByPath($row['principaluri']);
198
-			$shares[]= [
199
-				'href' => "principal:${row['principaluri']}",
200
-				'commonName' => isset($p['{DAV:}displayname']) ? $p['{DAV:}displayname'] : '',
201
-				'status' => 1,
202
-				'readOnly' => (int) $row['access'] === self::ACCESS_READ,
203
-				'{http://owncloud.org/ns}principal' => $row['principaluri'],
204
-				'{http://owncloud.org/ns}group-share' => is_null($p)
205
-			];
206
-		}
207
-
208
-		return $shares;
209
-	}
210
-
211
-	/**
212
-	 * For shared resources the sharee is set in the ACL of the resource
213
-	 *
214
-	 * @param int $resourceId
215
-	 * @param array $acl
216
-	 * @return array
217
-	 */
218
-	public function applyShareAcl($resourceId, $acl) {
219
-
220
-		$shares = $this->getShares($resourceId);
221
-		foreach ($shares as $share) {
222
-			$acl[] = [
223
-				'privilege' => '{DAV:}read',
224
-				'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
225
-				'protected' => true,
226
-			];
227
-			if (!$share['readOnly']) {
228
-				$acl[] = [
229
-					'privilege' => '{DAV:}write',
230
-					'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
231
-					'protected' => true,
232
-				];
233
-			} else if ($this->resourceType === 'calendar') {
234
-				// Allow changing the properties of read only calendars,
235
-				// so users can change the visibility.
236
-				$acl[] = [
237
-					'privilege' => '{DAV:}write-properties',
238
-					'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
239
-					'protected' => true,
240
-				];
241
-			}
242
-		}
243
-		return $acl;
244
-	}
35
+    /** @var IDBConnection */
36
+    private $db;
37
+    /** @var IUserManager */
38
+    private $userManager;
39
+    /** @var IGroupManager */
40
+    private $groupManager;
41
+    /** @var Principal */
42
+    private $principalBackend;
43
+    /** @var string */
44
+    private $resourceType;
45
+
46
+    const ACCESS_OWNER = 1;
47
+    const ACCESS_READ_WRITE = 2;
48
+    const ACCESS_READ = 3;
49
+
50
+    /**
51
+     * @param IDBConnection $db
52
+     * @param IUserManager $userManager
53
+     * @param IGroupManager $groupManager
54
+     * @param Principal $principalBackend
55
+     * @param string $resourceType
56
+     */
57
+    public function __construct(IDBConnection $db, IUserManager $userManager, IGroupManager $groupManager, Principal $principalBackend, $resourceType) {
58
+        $this->db = $db;
59
+        $this->userManager = $userManager;
60
+        $this->groupManager = $groupManager;
61
+        $this->principalBackend = $principalBackend;
62
+        $this->resourceType = $resourceType;
63
+    }
64
+
65
+    /**
66
+     * @param IShareable $shareable
67
+     * @param string[] $add
68
+     * @param string[] $remove
69
+     */
70
+    public function updateShares(IShareable $shareable, array $add, array $remove) {
71
+        foreach($add as $element) {
72
+            $principal = $this->principalBackend->findByUri($element['href'], '');
73
+            if ($principal !== '') {
74
+                $this->shareWith($shareable, $element);
75
+            }
76
+        }
77
+        foreach($remove as $element) {
78
+            $principal = $this->principalBackend->findByUri($element, '');
79
+            if ($principal !== '') {
80
+                $this->unshare($shareable, $element);
81
+            }
82
+        }
83
+    }
84
+
85
+    /**
86
+     * @param IShareable $shareable
87
+     * @param string $element
88
+     */
89
+    private function shareWith($shareable, $element) {
90
+        $user = $element['href'];
91
+        $parts = explode(':', $user, 2);
92
+        if ($parts[0] !== 'principal') {
93
+            return;
94
+        }
95
+
96
+        // don't share with owner
97
+        if ($shareable->getOwner() === $parts[1]) {
98
+            return;
99
+        }
100
+
101
+        $principal = explode('/', $parts[1], 3);
102
+        if (count($principal) !== 3 || $principal[0] !== 'principals' || !in_array($principal[1], ['users', 'groups'], true)) {
103
+            // Invalid principal
104
+            return;
105
+        }
106
+
107
+        if (($principal[1] === 'users' && !$this->userManager->userExists($principal[2])) ||
108
+            ($principal[1] === 'groups' && !$this->groupManager->groupExists($principal[2]))) {
109
+            // User or group does not exist
110
+            return;
111
+        }
112
+
113
+        // remove the share if it already exists
114
+        $this->unshare($shareable, $element['href']);
115
+        $access = self::ACCESS_READ;
116
+        if (isset($element['readOnly'])) {
117
+            $access = $element['readOnly'] ? self::ACCESS_READ : self::ACCESS_READ_WRITE;
118
+        }
119
+
120
+        $query = $this->db->getQueryBuilder();
121
+        $query->insert('dav_shares')
122
+            ->values([
123
+                'principaluri' => $query->createNamedParameter($parts[1]),
124
+                'type' => $query->createNamedParameter($this->resourceType),
125
+                'access' => $query->createNamedParameter($access),
126
+                'resourceid' => $query->createNamedParameter($shareable->getResourceId())
127
+            ]);
128
+        $query->execute();
129
+    }
130
+
131
+    /**
132
+     * @param $resourceId
133
+     */
134
+    public function deleteAllShares($resourceId) {
135
+        $query = $this->db->getQueryBuilder();
136
+        $query->delete('dav_shares')
137
+            ->where($query->expr()->eq('resourceid', $query->createNamedParameter($resourceId)))
138
+            ->andWhere($query->expr()->eq('type', $query->createNamedParameter($this->resourceType)))
139
+            ->execute();
140
+    }
141
+
142
+    public function deleteAllSharesByUser($principaluri) {
143
+        $query = $this->db->getQueryBuilder();
144
+        $query->delete('dav_shares')
145
+            ->where($query->expr()->eq('principaluri', $query->createNamedParameter($principaluri)))
146
+            ->andWhere($query->expr()->eq('type', $query->createNamedParameter($this->resourceType)))
147
+            ->execute();
148
+    }
149
+
150
+    /**
151
+     * @param IShareable $shareable
152
+     * @param string $element
153
+     */
154
+    private function unshare($shareable, $element) {
155
+        $parts = explode(':', $element, 2);
156
+        if ($parts[0] !== 'principal') {
157
+            return;
158
+        }
159
+
160
+        // don't share with owner
161
+        if ($shareable->getOwner() === $parts[1]) {
162
+            return;
163
+        }
164
+
165
+        $query = $this->db->getQueryBuilder();
166
+        $query->delete('dav_shares')
167
+            ->where($query->expr()->eq('resourceid', $query->createNamedParameter($shareable->getResourceId())))
168
+            ->andWhere($query->expr()->eq('type', $query->createNamedParameter($this->resourceType)))
169
+            ->andWhere($query->expr()->eq('principaluri', $query->createNamedParameter($parts[1])))
170
+        ;
171
+        $query->execute();
172
+    }
173
+
174
+    /**
175
+     * Returns the list of people whom this resource is shared with.
176
+     *
177
+     * Every element in this array should have the following properties:
178
+     *   * href - Often a mailto: address
179
+     *   * commonName - Optional, for example a first + last name
180
+     *   * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants.
181
+     *   * readOnly - boolean
182
+     *   * summary - Optional, a description for the share
183
+     *
184
+     * @param int $resourceId
185
+     * @return array
186
+     */
187
+    public function getShares($resourceId) {
188
+        $query = $this->db->getQueryBuilder();
189
+        $result = $query->select(['principaluri', 'access'])
190
+            ->from('dav_shares')
191
+            ->where($query->expr()->eq('resourceid', $query->createNamedParameter($resourceId)))
192
+            ->andWhere($query->expr()->eq('type', $query->createNamedParameter($this->resourceType)))
193
+            ->execute();
194
+
195
+        $shares = [];
196
+        while($row = $result->fetch()) {
197
+            $p = $this->principalBackend->getPrincipalByPath($row['principaluri']);
198
+            $shares[]= [
199
+                'href' => "principal:${row['principaluri']}",
200
+                'commonName' => isset($p['{DAV:}displayname']) ? $p['{DAV:}displayname'] : '',
201
+                'status' => 1,
202
+                'readOnly' => (int) $row['access'] === self::ACCESS_READ,
203
+                '{http://owncloud.org/ns}principal' => $row['principaluri'],
204
+                '{http://owncloud.org/ns}group-share' => is_null($p)
205
+            ];
206
+        }
207
+
208
+        return $shares;
209
+    }
210
+
211
+    /**
212
+     * For shared resources the sharee is set in the ACL of the resource
213
+     *
214
+     * @param int $resourceId
215
+     * @param array $acl
216
+     * @return array
217
+     */
218
+    public function applyShareAcl($resourceId, $acl) {
219
+
220
+        $shares = $this->getShares($resourceId);
221
+        foreach ($shares as $share) {
222
+            $acl[] = [
223
+                'privilege' => '{DAV:}read',
224
+                'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
225
+                'protected' => true,
226
+            ];
227
+            if (!$share['readOnly']) {
228
+                $acl[] = [
229
+                    'privilege' => '{DAV:}write',
230
+                    'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
231
+                    'protected' => true,
232
+                ];
233
+            } else if ($this->resourceType === 'calendar') {
234
+                // Allow changing the properties of read only calendars,
235
+                // so users can change the visibility.
236
+                $acl[] = [
237
+                    'privilege' => '{DAV:}write-properties',
238
+                    'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
239
+                    'protected' => true,
240
+                ];
241
+            }
242
+        }
243
+        return $acl;
244
+    }
245 245
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
 	 * @param string[] $remove
69 69
 	 */
70 70
 	public function updateShares(IShareable $shareable, array $add, array $remove) {
71
-		foreach($add as $element) {
71
+		foreach ($add as $element) {
72 72
 			$principal = $this->principalBackend->findByUri($element['href'], '');
73 73
 			if ($principal !== '') {
74 74
 				$this->shareWith($shareable, $element);
75 75
 			}
76 76
 		}
77
-		foreach($remove as $element) {
77
+		foreach ($remove as $element) {
78 78
 			$principal = $this->principalBackend->findByUri($element, '');
79 79
 			if ($principal !== '') {
80 80
 				$this->unshare($shareable, $element);
@@ -193,9 +193,9 @@  discard block
 block discarded – undo
193 193
 			->execute();
194 194
 
195 195
 		$shares = [];
196
-		while($row = $result->fetch()) {
196
+		while ($row = $result->fetch()) {
197 197
 			$p = $this->principalBackend->getPrincipalByPath($row['principaluri']);
198
-			$shares[]= [
198
+			$shares[] = [
199 199
 				'href' => "principal:${row['principaluri']}",
200 200
 				'commonName' => isset($p['{DAV:}displayname']) ? $p['{DAV:}displayname'] : '',
201 201
 				'status' => 1,
@@ -221,13 +221,13 @@  discard block
 block discarded – undo
221 221
 		foreach ($shares as $share) {
222 222
 			$acl[] = [
223 223
 				'privilege' => '{DAV:}read',
224
-				'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
224
+				'principal' => $share['{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}principal'],
225 225
 				'protected' => true,
226 226
 			];
227 227
 			if (!$share['readOnly']) {
228 228
 				$acl[] = [
229 229
 					'privilege' => '{DAV:}write',
230
-					'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
230
+					'principal' => $share['{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}principal'],
231 231
 					'protected' => true,
232 232
 				];
233 233
 			} else if ($this->resourceType === 'calendar') {
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 				// so users can change the visibility.
236 236
 				$acl[] = [
237 237
 					'privilege' => '{DAV:}write-properties',
238
-					'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
238
+					'principal' => $share['{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}principal'],
239 239
 					'protected' => true,
240 240
 				];
241 241
 			}
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Calendar.php 1 patch
Indentation   +297 added lines, -297 removed lines patch added patch discarded remove patch
@@ -42,302 +42,302 @@
 block discarded – undo
42 42
  */
43 43
 class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
44 44
 
45
-	/** @var IConfig */
46
-	private $config;
47
-
48
-	public function __construct(BackendInterface $caldavBackend, $calendarInfo, IL10N $l10n, IConfig $config) {
49
-		parent::__construct($caldavBackend, $calendarInfo);
50
-
51
-		if ($this->getName() === BirthdayService::BIRTHDAY_CALENDAR_URI) {
52
-			$this->calendarInfo['{DAV:}displayname'] = $l10n->t('Contact birthdays');
53
-		}
54
-		if ($this->getName() === CalDavBackend::PERSONAL_CALENDAR_URI &&
55
-			$this->calendarInfo['{DAV:}displayname'] === CalDavBackend::PERSONAL_CALENDAR_NAME) {
56
-			$this->calendarInfo['{DAV:}displayname'] = $l10n->t('Personal');
57
-		}
58
-
59
-		$this->config = $config;
60
-	}
61
-
62
-	/**
63
-	 * Updates the list of shares.
64
-	 *
65
-	 * The first array is a list of people that are to be added to the
66
-	 * resource.
67
-	 *
68
-	 * Every element in the add array has the following properties:
69
-	 *   * href - A url. Usually a mailto: address
70
-	 *   * commonName - Usually a first and last name, or false
71
-	 *   * summary - A description of the share, can also be false
72
-	 *   * readOnly - A boolean value
73
-	 *
74
-	 * Every element in the remove array is just the address string.
75
-	 *
76
-	 * @param array $add
77
-	 * @param array $remove
78
-	 * @return void
79
-	 * @throws Forbidden
80
-	 */
81
-	public function updateShares(array $add, array $remove) {
82
-		if ($this->isShared()) {
83
-			throw new Forbidden();
84
-		}
85
-		$this->caldavBackend->updateShares($this, $add, $remove);
86
-	}
87
-
88
-	/**
89
-	 * Returns the list of people whom this resource is shared with.
90
-	 *
91
-	 * Every element in this array should have the following properties:
92
-	 *   * href - Often a mailto: address
93
-	 *   * commonName - Optional, for example a first + last name
94
-	 *   * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants.
95
-	 *   * readOnly - boolean
96
-	 *   * summary - Optional, a description for the share
97
-	 *
98
-	 * @return array
99
-	 */
100
-	public function getShares() {
101
-		if ($this->isShared()) {
102
-			return [];
103
-		}
104
-		return $this->caldavBackend->getShares($this->getResourceId());
105
-	}
106
-
107
-	/**
108
-	 * @return int
109
-	 */
110
-	public function getResourceId() {
111
-		return $this->calendarInfo['id'];
112
-	}
113
-
114
-	/**
115
-	 * @return string
116
-	 */
117
-	public function getPrincipalURI() {
118
-		return $this->calendarInfo['principaluri'];
119
-	}
120
-
121
-	public function getACL() {
122
-		$acl =  [
123
-			[
124
-				'privilege' => '{DAV:}read',
125
-				'principal' => $this->getOwner(),
126
-				'protected' => true,
127
-			]];
128
-		if ($this->getName() !== BirthdayService::BIRTHDAY_CALENDAR_URI) {
129
-			$acl[] = [
130
-				'privilege' => '{DAV:}write',
131
-				'principal' => $this->getOwner(),
132
-				'protected' => true,
133
-			];
134
-		} else {
135
-			$acl[] = [
136
-				'privilege' => '{DAV:}write-properties',
137
-				'principal' => $this->getOwner(),
138
-				'protected' => true,
139
-			];
140
-		}
141
-
142
-		if ($this->getOwner() !== parent::getOwner()) {
143
-			$acl[] =  [
144
-					'privilege' => '{DAV:}read',
145
-					'principal' => parent::getOwner(),
146
-					'protected' => true,
147
-				];
148
-			if ($this->canWrite()) {
149
-				$acl[] = [
150
-					'privilege' => '{DAV:}write',
151
-					'principal' => parent::getOwner(),
152
-					'protected' => true,
153
-				];
154
-			} else {
155
-				$acl[] = [
156
-					'privilege' => '{DAV:}write-properties',
157
-					'principal' => parent::getOwner(),
158
-					'protected' => true,
159
-				];
160
-			}
161
-		}
162
-		if ($this->isPublic()) {
163
-			$acl[] = [
164
-				'privilege' => '{DAV:}read',
165
-				'principal' => 'principals/system/public',
166
-				'protected' => true,
167
-			];
168
-		}
169
-
170
-		$acl = $this->caldavBackend->applyShareAcl($this->getResourceId(), $acl);
171
-
172
-		if (!$this->isShared()) {
173
-			return $acl;
174
-		}
175
-
176
-		$allowedPrincipals = [$this->getOwner(), parent::getOwner(), 'principals/system/public'];
177
-		return array_filter($acl, function($rule) use ($allowedPrincipals) {
178
-			return in_array($rule['principal'], $allowedPrincipals);
179
-		});
180
-	}
181
-
182
-	public function getChildACL() {
183
-		return $this->getACL();
184
-	}
185
-
186
-	public function getOwner() {
187
-		if (isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal'])) {
188
-			return $this->calendarInfo['{http://owncloud.org/ns}owner-principal'];
189
-		}
190
-		return parent::getOwner();
191
-	}
192
-
193
-	public function delete() {
194
-		if (isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal']) &&
195
-			$this->calendarInfo['{http://owncloud.org/ns}owner-principal'] !== $this->calendarInfo['principaluri']) {
196
-			$principal = 'principal:' . parent::getOwner();
197
-			$shares = $this->caldavBackend->getShares($this->getResourceId());
198
-			$shares = array_filter($shares, function($share) use ($principal){
199
-				return $share['href'] === $principal;
200
-			});
201
-			if (empty($shares)) {
202
-				throw new Forbidden();
203
-			}
204
-
205
-			$this->caldavBackend->updateShares($this, [], [
206
-				$principal
207
-			]);
208
-			return;
209
-		}
210
-
211
-		// Remember when a user deleted their birthday calendar
212
-		// in order to not regenerate it on the next contacts change
213
-		if ($this->getName() === BirthdayService::BIRTHDAY_CALENDAR_URI) {
214
-			$principalURI = $this->getPrincipalURI();
215
-			$userId = substr($principalURI, 17);
216
-
217
-			$this->config->setUserValue($userId, 'dav', 'generateBirthdayCalendar', 'no');
218
-		}
219
-
220
-		parent::delete();
221
-	}
222
-
223
-	public function propPatch(PropPatch $propPatch) {
224
-		// parent::propPatch will only update calendars table
225
-		// if calendar is shared, changes have to be made to the properties table
226
-		if (!$this->isShared()) {
227
-			parent::propPatch($propPatch);
228
-		}
229
-	}
230
-
231
-	public function getChild($name) {
232
-
233
-		$obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name);
234
-
235
-		if (!$obj) {
236
-			throw new NotFound('Calendar object not found');
237
-		}
238
-
239
-		if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE && $this->isShared()) {
240
-			throw new NotFound('Calendar object not found');
241
-		}
242
-
243
-		$obj['acl'] = $this->getChildACL();
244
-
245
-		return new CalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
246
-
247
-	}
248
-
249
-	public function getChildren() {
250
-
251
-		$objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']);
252
-		$children = [];
253
-		foreach ($objs as $obj) {
254
-			if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE && $this->isShared()) {
255
-				continue;
256
-			}
257
-			$obj['acl'] = $this->getChildACL();
258
-			$children[] = new CalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
259
-		}
260
-		return $children;
261
-
262
-	}
263
-
264
-	public function getMultipleChildren(array $paths) {
265
-
266
-		$objs = $this->caldavBackend->getMultipleCalendarObjects($this->calendarInfo['id'], $paths);
267
-		$children = [];
268
-		foreach ($objs as $obj) {
269
-			if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE && $this->isShared()) {
270
-				continue;
271
-			}
272
-			$obj['acl'] = $this->getChildACL();
273
-			$children[] = new CalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
274
-		}
275
-		return $children;
276
-
277
-	}
278
-
279
-	public function childExists($name) {
280
-		$obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name);
281
-		if (!$obj) {
282
-			return false;
283
-		}
284
-		if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE && $this->isShared()) {
285
-			return false;
286
-		}
287
-
288
-		return true;
289
-	}
290
-
291
-	public function calendarQuery(array $filters) {
292
-
293
-		$uris = $this->caldavBackend->calendarQuery($this->calendarInfo['id'], $filters);
294
-		if ($this->isShared()) {
295
-			return array_filter($uris, function ($uri) {
296
-				return $this->childExists($uri);
297
-			});
298
-		}
299
-
300
-		return $uris;
301
-	}
302
-
303
-	/**
304
-	 * @param boolean $value
305
-	 * @return string|null
306
-	 */
307
-	public function setPublishStatus($value) {
308
-		$publicUri = $this->caldavBackend->setPublishStatus($value, $this);
309
-		$this->calendarInfo['publicuri'] = $publicUri;
310
-		return $publicUri;
311
-	}
312
-
313
-	/**
314
-	 * @return mixed $value
315
-	 */
316
-	public function getPublishStatus() {
317
-		return $this->caldavBackend->getPublishStatus($this);
318
-	}
319
-
320
-	private function canWrite() {
321
-		if (isset($this->calendarInfo['{http://owncloud.org/ns}read-only'])) {
322
-			return !$this->calendarInfo['{http://owncloud.org/ns}read-only'];
323
-		}
324
-		return true;
325
-	}
326
-
327
-	private function isPublic() {
328
-		return isset($this->calendarInfo['{http://owncloud.org/ns}public']);
329
-	}
330
-
331
-	protected function isShared() {
332
-		if (!isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal'])) {
333
-			return false;
334
-		}
335
-
336
-		return $this->calendarInfo['{http://owncloud.org/ns}owner-principal'] !== $this->calendarInfo['principaluri'];
337
-	}
338
-
339
-	public function isSubscription() {
340
-		return isset($this->calendarInfo['{http://calendarserver.org/ns/}source']);
341
-	}
45
+    /** @var IConfig */
46
+    private $config;
47
+
48
+    public function __construct(BackendInterface $caldavBackend, $calendarInfo, IL10N $l10n, IConfig $config) {
49
+        parent::__construct($caldavBackend, $calendarInfo);
50
+
51
+        if ($this->getName() === BirthdayService::BIRTHDAY_CALENDAR_URI) {
52
+            $this->calendarInfo['{DAV:}displayname'] = $l10n->t('Contact birthdays');
53
+        }
54
+        if ($this->getName() === CalDavBackend::PERSONAL_CALENDAR_URI &&
55
+            $this->calendarInfo['{DAV:}displayname'] === CalDavBackend::PERSONAL_CALENDAR_NAME) {
56
+            $this->calendarInfo['{DAV:}displayname'] = $l10n->t('Personal');
57
+        }
58
+
59
+        $this->config = $config;
60
+    }
61
+
62
+    /**
63
+     * Updates the list of shares.
64
+     *
65
+     * The first array is a list of people that are to be added to the
66
+     * resource.
67
+     *
68
+     * Every element in the add array has the following properties:
69
+     *   * href - A url. Usually a mailto: address
70
+     *   * commonName - Usually a first and last name, or false
71
+     *   * summary - A description of the share, can also be false
72
+     *   * readOnly - A boolean value
73
+     *
74
+     * Every element in the remove array is just the address string.
75
+     *
76
+     * @param array $add
77
+     * @param array $remove
78
+     * @return void
79
+     * @throws Forbidden
80
+     */
81
+    public function updateShares(array $add, array $remove) {
82
+        if ($this->isShared()) {
83
+            throw new Forbidden();
84
+        }
85
+        $this->caldavBackend->updateShares($this, $add, $remove);
86
+    }
87
+
88
+    /**
89
+     * Returns the list of people whom this resource is shared with.
90
+     *
91
+     * Every element in this array should have the following properties:
92
+     *   * href - Often a mailto: address
93
+     *   * commonName - Optional, for example a first + last name
94
+     *   * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants.
95
+     *   * readOnly - boolean
96
+     *   * summary - Optional, a description for the share
97
+     *
98
+     * @return array
99
+     */
100
+    public function getShares() {
101
+        if ($this->isShared()) {
102
+            return [];
103
+        }
104
+        return $this->caldavBackend->getShares($this->getResourceId());
105
+    }
106
+
107
+    /**
108
+     * @return int
109
+     */
110
+    public function getResourceId() {
111
+        return $this->calendarInfo['id'];
112
+    }
113
+
114
+    /**
115
+     * @return string
116
+     */
117
+    public function getPrincipalURI() {
118
+        return $this->calendarInfo['principaluri'];
119
+    }
120
+
121
+    public function getACL() {
122
+        $acl =  [
123
+            [
124
+                'privilege' => '{DAV:}read',
125
+                'principal' => $this->getOwner(),
126
+                'protected' => true,
127
+            ]];
128
+        if ($this->getName() !== BirthdayService::BIRTHDAY_CALENDAR_URI) {
129
+            $acl[] = [
130
+                'privilege' => '{DAV:}write',
131
+                'principal' => $this->getOwner(),
132
+                'protected' => true,
133
+            ];
134
+        } else {
135
+            $acl[] = [
136
+                'privilege' => '{DAV:}write-properties',
137
+                'principal' => $this->getOwner(),
138
+                'protected' => true,
139
+            ];
140
+        }
141
+
142
+        if ($this->getOwner() !== parent::getOwner()) {
143
+            $acl[] =  [
144
+                    'privilege' => '{DAV:}read',
145
+                    'principal' => parent::getOwner(),
146
+                    'protected' => true,
147
+                ];
148
+            if ($this->canWrite()) {
149
+                $acl[] = [
150
+                    'privilege' => '{DAV:}write',
151
+                    'principal' => parent::getOwner(),
152
+                    'protected' => true,
153
+                ];
154
+            } else {
155
+                $acl[] = [
156
+                    'privilege' => '{DAV:}write-properties',
157
+                    'principal' => parent::getOwner(),
158
+                    'protected' => true,
159
+                ];
160
+            }
161
+        }
162
+        if ($this->isPublic()) {
163
+            $acl[] = [
164
+                'privilege' => '{DAV:}read',
165
+                'principal' => 'principals/system/public',
166
+                'protected' => true,
167
+            ];
168
+        }
169
+
170
+        $acl = $this->caldavBackend->applyShareAcl($this->getResourceId(), $acl);
171
+
172
+        if (!$this->isShared()) {
173
+            return $acl;
174
+        }
175
+
176
+        $allowedPrincipals = [$this->getOwner(), parent::getOwner(), 'principals/system/public'];
177
+        return array_filter($acl, function($rule) use ($allowedPrincipals) {
178
+            return in_array($rule['principal'], $allowedPrincipals);
179
+        });
180
+    }
181
+
182
+    public function getChildACL() {
183
+        return $this->getACL();
184
+    }
185
+
186
+    public function getOwner() {
187
+        if (isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal'])) {
188
+            return $this->calendarInfo['{http://owncloud.org/ns}owner-principal'];
189
+        }
190
+        return parent::getOwner();
191
+    }
192
+
193
+    public function delete() {
194
+        if (isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal']) &&
195
+            $this->calendarInfo['{http://owncloud.org/ns}owner-principal'] !== $this->calendarInfo['principaluri']) {
196
+            $principal = 'principal:' . parent::getOwner();
197
+            $shares = $this->caldavBackend->getShares($this->getResourceId());
198
+            $shares = array_filter($shares, function($share) use ($principal){
199
+                return $share['href'] === $principal;
200
+            });
201
+            if (empty($shares)) {
202
+                throw new Forbidden();
203
+            }
204
+
205
+            $this->caldavBackend->updateShares($this, [], [
206
+                $principal
207
+            ]);
208
+            return;
209
+        }
210
+
211
+        // Remember when a user deleted their birthday calendar
212
+        // in order to not regenerate it on the next contacts change
213
+        if ($this->getName() === BirthdayService::BIRTHDAY_CALENDAR_URI) {
214
+            $principalURI = $this->getPrincipalURI();
215
+            $userId = substr($principalURI, 17);
216
+
217
+            $this->config->setUserValue($userId, 'dav', 'generateBirthdayCalendar', 'no');
218
+        }
219
+
220
+        parent::delete();
221
+    }
222
+
223
+    public function propPatch(PropPatch $propPatch) {
224
+        // parent::propPatch will only update calendars table
225
+        // if calendar is shared, changes have to be made to the properties table
226
+        if (!$this->isShared()) {
227
+            parent::propPatch($propPatch);
228
+        }
229
+    }
230
+
231
+    public function getChild($name) {
232
+
233
+        $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name);
234
+
235
+        if (!$obj) {
236
+            throw new NotFound('Calendar object not found');
237
+        }
238
+
239
+        if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE && $this->isShared()) {
240
+            throw new NotFound('Calendar object not found');
241
+        }
242
+
243
+        $obj['acl'] = $this->getChildACL();
244
+
245
+        return new CalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
246
+
247
+    }
248
+
249
+    public function getChildren() {
250
+
251
+        $objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']);
252
+        $children = [];
253
+        foreach ($objs as $obj) {
254
+            if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE && $this->isShared()) {
255
+                continue;
256
+            }
257
+            $obj['acl'] = $this->getChildACL();
258
+            $children[] = new CalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
259
+        }
260
+        return $children;
261
+
262
+    }
263
+
264
+    public function getMultipleChildren(array $paths) {
265
+
266
+        $objs = $this->caldavBackend->getMultipleCalendarObjects($this->calendarInfo['id'], $paths);
267
+        $children = [];
268
+        foreach ($objs as $obj) {
269
+            if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE && $this->isShared()) {
270
+                continue;
271
+            }
272
+            $obj['acl'] = $this->getChildACL();
273
+            $children[] = new CalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
274
+        }
275
+        return $children;
276
+
277
+    }
278
+
279
+    public function childExists($name) {
280
+        $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name);
281
+        if (!$obj) {
282
+            return false;
283
+        }
284
+        if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE && $this->isShared()) {
285
+            return false;
286
+        }
287
+
288
+        return true;
289
+    }
290
+
291
+    public function calendarQuery(array $filters) {
292
+
293
+        $uris = $this->caldavBackend->calendarQuery($this->calendarInfo['id'], $filters);
294
+        if ($this->isShared()) {
295
+            return array_filter($uris, function ($uri) {
296
+                return $this->childExists($uri);
297
+            });
298
+        }
299
+
300
+        return $uris;
301
+    }
302
+
303
+    /**
304
+     * @param boolean $value
305
+     * @return string|null
306
+     */
307
+    public function setPublishStatus($value) {
308
+        $publicUri = $this->caldavBackend->setPublishStatus($value, $this);
309
+        $this->calendarInfo['publicuri'] = $publicUri;
310
+        return $publicUri;
311
+    }
312
+
313
+    /**
314
+     * @return mixed $value
315
+     */
316
+    public function getPublishStatus() {
317
+        return $this->caldavBackend->getPublishStatus($this);
318
+    }
319
+
320
+    private function canWrite() {
321
+        if (isset($this->calendarInfo['{http://owncloud.org/ns}read-only'])) {
322
+            return !$this->calendarInfo['{http://owncloud.org/ns}read-only'];
323
+        }
324
+        return true;
325
+    }
326
+
327
+    private function isPublic() {
328
+        return isset($this->calendarInfo['{http://owncloud.org/ns}public']);
329
+    }
330
+
331
+    protected function isShared() {
332
+        if (!isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal'])) {
333
+            return false;
334
+        }
335
+
336
+        return $this->calendarInfo['{http://owncloud.org/ns}owner-principal'] !== $this->calendarInfo['principaluri'];
337
+    }
338
+
339
+    public function isSubscription() {
340
+        return isset($this->calendarInfo['{http://calendarserver.org/ns/}source']);
341
+    }
342 342
 
343 343
 }
Please login to merge, or discard this patch.
lib/private/Repair.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,6 @@
 block discarded – undo
47 47
 use OC\Repair\RepairInvalidShares;
48 48
 use OC\Template\JSCombiner;
49 49
 use OC\Template\SCSSCacher;
50
-use OCA\DAV\Connector\Sabre\Principal;
51
-use OCA\DAV\Repair\RemoveInvalidShares;
52 50
 use OCP\AppFramework\QueryException;
53 51
 use OCP\Migration\IOutput;
54 52
 use OCP\Migration\IRepairStep;
Please login to merge, or discard this patch.
Indentation   +164 added lines, -164 removed lines patch added patch discarded remove patch
@@ -56,168 +56,168 @@
 block discarded – undo
56 56
 use Symfony\Component\EventDispatcher\GenericEvent;
57 57
 
58 58
 class Repair implements IOutput{
59
-	/* @var IRepairStep[] */
60
-	private $repairSteps;
61
-	/** @var EventDispatcher */
62
-	private $dispatcher;
63
-	/** @var string */
64
-	private $currentStep;
65
-
66
-	/**
67
-	 * Creates a new repair step runner
68
-	 *
69
-	 * @param IRepairStep[] $repairSteps array of RepairStep instances
70
-	 * @param EventDispatcher $dispatcher
71
-	 */
72
-	public function __construct($repairSteps = [], EventDispatcher $dispatcher = null) {
73
-		$this->repairSteps = $repairSteps;
74
-		$this->dispatcher = $dispatcher;
75
-	}
76
-
77
-	/**
78
-	 * Run a series of repair steps for common problems
79
-	 */
80
-	public function run() {
81
-		if (count($this->repairSteps) === 0) {
82
-			$this->emit('\OC\Repair', 'info', array('No repair steps available'));
83
-			return;
84
-		}
85
-		// run each repair step
86
-		foreach ($this->repairSteps as $step) {
87
-			$this->currentStep = $step->getName();
88
-			$this->emit('\OC\Repair', 'step', [$this->currentStep]);
89
-			$step->run($this);
90
-		}
91
-	}
92
-
93
-	/**
94
-	 * Add repair step
95
-	 *
96
-	 * @param IRepairStep|string $repairStep repair step
97
-	 * @throws \Exception
98
-	 */
99
-	public function addStep($repairStep) {
100
-		if (is_string($repairStep)) {
101
-			try {
102
-				$s = \OC::$server->query($repairStep);
103
-			} catch (QueryException $e) {
104
-				if (class_exists($repairStep)) {
105
-					$s = new $repairStep();
106
-				} else {
107
-					throw new \Exception("Repair step '$repairStep' is unknown");
108
-				}
109
-			}
110
-
111
-			if ($s instanceof IRepairStep) {
112
-				$this->repairSteps[] = $s;
113
-			} else {
114
-				throw new \Exception("Repair step '$repairStep' is not of type \\OCP\\Migration\\IRepairStep");
115
-			}
116
-		} else {
117
-			$this->repairSteps[] = $repairStep;
118
-		}
119
-	}
120
-
121
-	/**
122
-	 * Returns the default repair steps to be run on the
123
-	 * command line or after an upgrade.
124
-	 *
125
-	 * @return IRepairStep[]
126
-	 */
127
-	public static function getRepairSteps() {
128
-		return [
129
-			new Collation(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->getDatabaseConnection(), false),
130
-			new RepairMimeTypes(\OC::$server->getConfig()),
131
-			new CleanTags(\OC::$server->getDatabaseConnection(), \OC::$server->getUserManager()),
132
-			new RepairInvalidShares(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection()),
133
-			new RemoveRootShares(\OC::$server->getDatabaseConnection(), \OC::$server->getUserManager(), \OC::$server->getLazyRootFolder()),
134
-			new MoveUpdaterStepFile(\OC::$server->getConfig()),
135
-			new FixMountStorages(\OC::$server->getDatabaseConnection()),
136
-			new RepairInvalidPaths(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig()),
137
-			new AddLogRotateJob(\OC::$server->getJobList()),
138
-			new ClearFrontendCaches(\OC::$server->getMemCacheFactory(), \OC::$server->query(SCSSCacher::class), \OC::$server->query(JSCombiner::class)),
139
-			new AddPreviewBackgroundCleanupJob(\OC::$server->getJobList()),
140
-		];
141
-	}
142
-
143
-	/**
144
-	 * Returns expensive repair steps to be run on the
145
-	 * command line with a special option.
146
-	 *
147
-	 * @return IRepairStep[]
148
-	 */
149
-	public static function getExpensiveRepairSteps() {
150
-		return [
151
-			new OldGroupMembershipShares(\OC::$server->getDatabaseConnection(), \OC::$server->getGroupManager()),
152
-		];
153
-	}
154
-
155
-	/**
156
-	 * Returns the repair steps to be run before an
157
-	 * upgrade.
158
-	 *
159
-	 * @return IRepairStep[]
160
-	 */
161
-	public static function getBeforeUpgradeRepairSteps() {
162
-		$connection = \OC::$server->getDatabaseConnection();
163
-		$config = \OC::$server->getConfig();
164
-		$steps = [
165
-			new Collation(\OC::$server->getConfig(), \OC::$server->getLogger(), $connection, true),
166
-			new SqliteAutoincrement($connection),
167
-			new SaveAccountsTableData($connection, $config),
168
-			new DropAccountTermsTable($connection),
169
-		];
170
-
171
-		return $steps;
172
-	}
173
-
174
-	/**
175
-	 * @param string $scope
176
-	 * @param string $method
177
-	 * @param array $arguments
178
-	 */
179
-	public function emit($scope, $method, array $arguments = []) {
180
-		if (!is_null($this->dispatcher)) {
181
-			$this->dispatcher->dispatch("$scope::$method",
182
-				new GenericEvent("$scope::$method", $arguments));
183
-		}
184
-	}
185
-
186
-	public function info($string) {
187
-		// for now just emit as we did in the past
188
-		$this->emit('\OC\Repair', 'info', array($string));
189
-	}
190
-
191
-	/**
192
-	 * @param string $message
193
-	 */
194
-	public function warning($message) {
195
-		// for now just emit as we did in the past
196
-		$this->emit('\OC\Repair', 'warning', [$message]);
197
-	}
198
-
199
-	/**
200
-	 * @param int $max
201
-	 */
202
-	public function startProgress($max = 0) {
203
-		// for now just emit as we did in the past
204
-		$this->emit('\OC\Repair', 'startProgress', [$max, $this->currentStep]);
205
-	}
206
-
207
-	/**
208
-	 * @param int $step
209
-	 * @param string $description
210
-	 */
211
-	public function advance($step = 1, $description = '') {
212
-		// for now just emit as we did in the past
213
-		$this->emit('\OC\Repair', 'advance', [$step, $description]);
214
-	}
215
-
216
-	/**
217
-	 * @param int $max
218
-	 */
219
-	public function finishProgress() {
220
-		// for now just emit as we did in the past
221
-		$this->emit('\OC\Repair', 'finishProgress', []);
222
-	}
59
+    /* @var IRepairStep[] */
60
+    private $repairSteps;
61
+    /** @var EventDispatcher */
62
+    private $dispatcher;
63
+    /** @var string */
64
+    private $currentStep;
65
+
66
+    /**
67
+     * Creates a new repair step runner
68
+     *
69
+     * @param IRepairStep[] $repairSteps array of RepairStep instances
70
+     * @param EventDispatcher $dispatcher
71
+     */
72
+    public function __construct($repairSteps = [], EventDispatcher $dispatcher = null) {
73
+        $this->repairSteps = $repairSteps;
74
+        $this->dispatcher = $dispatcher;
75
+    }
76
+
77
+    /**
78
+     * Run a series of repair steps for common problems
79
+     */
80
+    public function run() {
81
+        if (count($this->repairSteps) === 0) {
82
+            $this->emit('\OC\Repair', 'info', array('No repair steps available'));
83
+            return;
84
+        }
85
+        // run each repair step
86
+        foreach ($this->repairSteps as $step) {
87
+            $this->currentStep = $step->getName();
88
+            $this->emit('\OC\Repair', 'step', [$this->currentStep]);
89
+            $step->run($this);
90
+        }
91
+    }
92
+
93
+    /**
94
+     * Add repair step
95
+     *
96
+     * @param IRepairStep|string $repairStep repair step
97
+     * @throws \Exception
98
+     */
99
+    public function addStep($repairStep) {
100
+        if (is_string($repairStep)) {
101
+            try {
102
+                $s = \OC::$server->query($repairStep);
103
+            } catch (QueryException $e) {
104
+                if (class_exists($repairStep)) {
105
+                    $s = new $repairStep();
106
+                } else {
107
+                    throw new \Exception("Repair step '$repairStep' is unknown");
108
+                }
109
+            }
110
+
111
+            if ($s instanceof IRepairStep) {
112
+                $this->repairSteps[] = $s;
113
+            } else {
114
+                throw new \Exception("Repair step '$repairStep' is not of type \\OCP\\Migration\\IRepairStep");
115
+            }
116
+        } else {
117
+            $this->repairSteps[] = $repairStep;
118
+        }
119
+    }
120
+
121
+    /**
122
+     * Returns the default repair steps to be run on the
123
+     * command line or after an upgrade.
124
+     *
125
+     * @return IRepairStep[]
126
+     */
127
+    public static function getRepairSteps() {
128
+        return [
129
+            new Collation(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->getDatabaseConnection(), false),
130
+            new RepairMimeTypes(\OC::$server->getConfig()),
131
+            new CleanTags(\OC::$server->getDatabaseConnection(), \OC::$server->getUserManager()),
132
+            new RepairInvalidShares(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection()),
133
+            new RemoveRootShares(\OC::$server->getDatabaseConnection(), \OC::$server->getUserManager(), \OC::$server->getLazyRootFolder()),
134
+            new MoveUpdaterStepFile(\OC::$server->getConfig()),
135
+            new FixMountStorages(\OC::$server->getDatabaseConnection()),
136
+            new RepairInvalidPaths(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig()),
137
+            new AddLogRotateJob(\OC::$server->getJobList()),
138
+            new ClearFrontendCaches(\OC::$server->getMemCacheFactory(), \OC::$server->query(SCSSCacher::class), \OC::$server->query(JSCombiner::class)),
139
+            new AddPreviewBackgroundCleanupJob(\OC::$server->getJobList()),
140
+        ];
141
+    }
142
+
143
+    /**
144
+     * Returns expensive repair steps to be run on the
145
+     * command line with a special option.
146
+     *
147
+     * @return IRepairStep[]
148
+     */
149
+    public static function getExpensiveRepairSteps() {
150
+        return [
151
+            new OldGroupMembershipShares(\OC::$server->getDatabaseConnection(), \OC::$server->getGroupManager()),
152
+        ];
153
+    }
154
+
155
+    /**
156
+     * Returns the repair steps to be run before an
157
+     * upgrade.
158
+     *
159
+     * @return IRepairStep[]
160
+     */
161
+    public static function getBeforeUpgradeRepairSteps() {
162
+        $connection = \OC::$server->getDatabaseConnection();
163
+        $config = \OC::$server->getConfig();
164
+        $steps = [
165
+            new Collation(\OC::$server->getConfig(), \OC::$server->getLogger(), $connection, true),
166
+            new SqliteAutoincrement($connection),
167
+            new SaveAccountsTableData($connection, $config),
168
+            new DropAccountTermsTable($connection),
169
+        ];
170
+
171
+        return $steps;
172
+    }
173
+
174
+    /**
175
+     * @param string $scope
176
+     * @param string $method
177
+     * @param array $arguments
178
+     */
179
+    public function emit($scope, $method, array $arguments = []) {
180
+        if (!is_null($this->dispatcher)) {
181
+            $this->dispatcher->dispatch("$scope::$method",
182
+                new GenericEvent("$scope::$method", $arguments));
183
+        }
184
+    }
185
+
186
+    public function info($string) {
187
+        // for now just emit as we did in the past
188
+        $this->emit('\OC\Repair', 'info', array($string));
189
+    }
190
+
191
+    /**
192
+     * @param string $message
193
+     */
194
+    public function warning($message) {
195
+        // for now just emit as we did in the past
196
+        $this->emit('\OC\Repair', 'warning', [$message]);
197
+    }
198
+
199
+    /**
200
+     * @param int $max
201
+     */
202
+    public function startProgress($max = 0) {
203
+        // for now just emit as we did in the past
204
+        $this->emit('\OC\Repair', 'startProgress', [$max, $this->currentStep]);
205
+    }
206
+
207
+    /**
208
+     * @param int $step
209
+     * @param string $description
210
+     */
211
+    public function advance($step = 1, $description = '') {
212
+        // for now just emit as we did in the past
213
+        $this->emit('\OC\Repair', 'advance', [$step, $description]);
214
+    }
215
+
216
+    /**
217
+     * @param int $max
218
+     */
219
+    public function finishProgress() {
220
+        // for now just emit as we did in the past
221
+        $this->emit('\OC\Repair', 'finishProgress', []);
222
+    }
223 223
 }
Please login to merge, or discard this patch.
apps/dav/lib/Command/RemoveInvalidShares.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -34,49 +34,49 @@
 block discarded – undo
34 34
  */
35 35
 class RemoveInvalidShares extends Command {
36 36
 
37
-	/** @var IDBConnection */
38
-	private $connection;
39
-	/** @var Principal */
40
-	private $principalBackend;
37
+    /** @var IDBConnection */
38
+    private $connection;
39
+    /** @var Principal */
40
+    private $principalBackend;
41 41
 
42
-	public function __construct(IDBConnection $connection,
43
-								Principal $principalBackend) {
44
-		parent::__construct();
42
+    public function __construct(IDBConnection $connection,
43
+                                Principal $principalBackend) {
44
+        parent::__construct();
45 45
 
46
-		$this->connection = $connection;
47
-		$this->principalBackend = $principalBackend;
48
-	}
46
+        $this->connection = $connection;
47
+        $this->principalBackend = $principalBackend;
48
+    }
49 49
 
50
-	protected function configure() {
51
-		$this
52
-			->setName('dav:remove-invalid-shares')
53
-			->setDescription('Remove invalid dav shares');
54
-	}
50
+    protected function configure() {
51
+        $this
52
+            ->setName('dav:remove-invalid-shares')
53
+            ->setDescription('Remove invalid dav shares');
54
+    }
55 55
 
56
-	protected function execute(InputInterface $input, OutputInterface $output) {
57
-		$query = $this->connection->getQueryBuilder();
58
-		$result = $query->selectDistinct('principaluri')
59
-			->from('dav_shares')
60
-			->execute();
56
+    protected function execute(InputInterface $input, OutputInterface $output) {
57
+        $query = $this->connection->getQueryBuilder();
58
+        $result = $query->selectDistinct('principaluri')
59
+            ->from('dav_shares')
60
+            ->execute();
61 61
 
62
-		while($row = $result->fetch()) {
63
-			$principaluri = $row['principaluri'];
64
-			$p = $this->principalBackend->getPrincipalByPath($principaluri);
65
-			if ($p === null) {
66
-				$this->deleteSharesForPrincipal($principaluri);
67
-			}
68
-		}
62
+        while($row = $result->fetch()) {
63
+            $principaluri = $row['principaluri'];
64
+            $p = $this->principalBackend->getPrincipalByPath($principaluri);
65
+            if ($p === null) {
66
+                $this->deleteSharesForPrincipal($principaluri);
67
+            }
68
+        }
69 69
 
70
-		$result->closeCursor();
71
-	}
70
+        $result->closeCursor();
71
+    }
72 72
 
73
-	/**
74
-	 * @param string $principaluri
75
-	 */
76
-	private function deleteSharesForPrincipal($principaluri) {
77
-		$delete = $this->connection->getQueryBuilder();
78
-		$delete->delete('dav_shares')
79
-			->where($delete->expr()->eq('principaluri', $delete->createNamedParameter($principaluri)));
80
-		$delete->execute();
81
-	}
73
+    /**
74
+     * @param string $principaluri
75
+     */
76
+    private function deleteSharesForPrincipal($principaluri) {
77
+        $delete = $this->connection->getQueryBuilder();
78
+        $delete->delete('dav_shares')
79
+            ->where($delete->expr()->eq('principaluri', $delete->createNamedParameter($principaluri)));
80
+        $delete->execute();
81
+    }
82 82
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 			->from('dav_shares')
77 77
 			->execute();
78 78
 
79
-		while($row = $result->fetch()) {
79
+		while ($row = $result->fetch()) {
80 80
 			$principaluri = $row['principaluri'];
81 81
 			$p = $this->principalBackend->getPrincipalByPath($principaluri);
82 82
 			if ($p === null) {
Please login to merge, or discard this patch.
apps/dav/composer/composer/autoload_static.php 1 patch
Spacing   +160 added lines, -160 removed lines patch added patch discarded remove patch
@@ -6,179 +6,179 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInitDAV
8 8
 {
9
-    public static $prefixLengthsPsr4 = array (
9
+    public static $prefixLengthsPsr4 = array(
10 10
         'O' => 
11
-        array (
11
+        array(
12 12
             'OCA\\DAV\\' => 8,
13 13
         ),
14 14
     );
15 15
 
16
-    public static $prefixDirsPsr4 = array (
16
+    public static $prefixDirsPsr4 = array(
17 17
         'OCA\\DAV\\' => 
18
-        array (
19
-            0 => __DIR__ . '/..' . '/../lib',
18
+        array(
19
+            0 => __DIR__.'/..'.'/../lib',
20 20
         ),
21 21
     );
22 22
 
23
-    public static $classMap = array (
24
-        'OCA\\DAV\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
25
-        'OCA\\DAV\\AppInfo\\PluginManager' => __DIR__ . '/..' . '/../lib/AppInfo/PluginManager.php',
26
-        'OCA\\DAV\\Avatars\\AvatarHome' => __DIR__ . '/..' . '/../lib/Avatars/AvatarHome.php',
27
-        'OCA\\DAV\\Avatars\\AvatarNode' => __DIR__ . '/..' . '/../lib/Avatars/AvatarNode.php',
28
-        'OCA\\DAV\\Avatars\\RootCollection' => __DIR__ . '/..' . '/../lib/Avatars/RootCollection.php',
29
-        'OCA\\DAV\\BackgroundJob\\CleanupDirectLinksJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/CleanupDirectLinksJob.php',
30
-        'OCA\\DAV\\BackgroundJob\\GenerateBirthdayCalendarBackgroundJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php',
31
-        'OCA\\DAV\\CalDAV\\Activity\\Backend' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Backend.php',
32
-        'OCA\\DAV\\CalDAV\\Activity\\Filter\\Calendar' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Filter/Calendar.php',
33
-        'OCA\\DAV\\CalDAV\\Activity\\Filter\\Todo' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Filter/Todo.php',
34
-        'OCA\\DAV\\CalDAV\\Activity\\Provider\\Base' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Provider/Base.php',
35
-        'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Provider/Calendar.php',
36
-        'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Provider/Event.php',
37
-        'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Provider/Todo.php',
38
-        'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Setting/Calendar.php',
39
-        'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Setting/Event.php',
40
-        'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Setting/Todo.php',
41
-        'OCA\\DAV\\CalDAV\\BirthdayCalendar\\EnablePlugin' => __DIR__ . '/..' . '/../lib/CalDAV/BirthdayCalendar/EnablePlugin.php',
42
-        'OCA\\DAV\\CalDAV\\BirthdayService' => __DIR__ . '/..' . '/../lib/CalDAV/BirthdayService.php',
43
-        'OCA\\DAV\\CalDAV\\CalDavBackend' => __DIR__ . '/..' . '/../lib/CalDAV/CalDavBackend.php',
44
-        'OCA\\DAV\\CalDAV\\Calendar' => __DIR__ . '/..' . '/../lib/CalDAV/Calendar.php',
45
-        'OCA\\DAV\\CalDAV\\CalendarHome' => __DIR__ . '/..' . '/../lib/CalDAV/CalendarHome.php',
46
-        'OCA\\DAV\\CalDAV\\CalendarImpl' => __DIR__ . '/..' . '/../lib/CalDAV/CalendarImpl.php',
47
-        'OCA\\DAV\\CalDAV\\CalendarManager' => __DIR__ . '/..' . '/../lib/CalDAV/CalendarManager.php',
48
-        'OCA\\DAV\\CalDAV\\CalendarObject' => __DIR__ . '/..' . '/../lib/CalDAV/CalendarObject.php',
49
-        'OCA\\DAV\\CalDAV\\CalendarRoot' => __DIR__ . '/..' . '/../lib/CalDAV/CalendarRoot.php',
50
-        'OCA\\DAV\\CalDAV\\Plugin' => __DIR__ . '/..' . '/../lib/CalDAV/Plugin.php',
51
-        'OCA\\DAV\\CalDAV\\Principal\\Collection' => __DIR__ . '/..' . '/../lib/CalDAV/Principal/Collection.php',
52
-        'OCA\\DAV\\CalDAV\\Principal\\User' => __DIR__ . '/..' . '/../lib/CalDAV/Principal/User.php',
53
-        'OCA\\DAV\\CalDAV\\PublicCalendar' => __DIR__ . '/..' . '/../lib/CalDAV/PublicCalendar.php',
54
-        'OCA\\DAV\\CalDAV\\PublicCalendarObject' => __DIR__ . '/..' . '/../lib/CalDAV/PublicCalendarObject.php',
55
-        'OCA\\DAV\\CalDAV\\PublicCalendarRoot' => __DIR__ . '/..' . '/../lib/CalDAV/PublicCalendarRoot.php',
56
-        'OCA\\DAV\\CalDAV\\Publishing\\PublishPlugin' => __DIR__ . '/..' . '/../lib/CalDAV/Publishing/PublishPlugin.php',
57
-        'OCA\\DAV\\CalDAV\\Publishing\\Xml\\Publisher' => __DIR__ . '/..' . '/../lib/CalDAV/Publishing/Xml/Publisher.php',
58
-        'OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin' => __DIR__ . '/..' . '/../lib/CalDAV/Schedule/IMipPlugin.php',
59
-        'OCA\\DAV\\CalDAV\\Schedule\\Plugin' => __DIR__ . '/..' . '/../lib/CalDAV/Schedule/Plugin.php',
60
-        'OCA\\DAV\\CalDAV\\Search\\SearchPlugin' => __DIR__ . '/..' . '/../lib/CalDAV/Search/SearchPlugin.php',
61
-        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/CompFilter.php',
62
-        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/LimitFilter.php',
63
-        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/OffsetFilter.php',
64
-        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/ParamFilter.php',
65
-        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/PropFilter.php',
66
-        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php',
67
-        'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php',
68
-        'OCA\\DAV\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php',
69
-        'OCA\\DAV\\CardDAV\\AddressBook' => __DIR__ . '/..' . '/../lib/CardDAV/AddressBook.php',
70
-        'OCA\\DAV\\CardDAV\\AddressBookImpl' => __DIR__ . '/..' . '/../lib/CardDAV/AddressBookImpl.php',
71
-        'OCA\\DAV\\CardDAV\\AddressBookRoot' => __DIR__ . '/..' . '/../lib/CardDAV/AddressBookRoot.php',
72
-        'OCA\\DAV\\CardDAV\\CardDavBackend' => __DIR__ . '/..' . '/../lib/CardDAV/CardDavBackend.php',
73
-        'OCA\\DAV\\CardDAV\\ContactsManager' => __DIR__ . '/..' . '/../lib/CardDAV/ContactsManager.php',
74
-        'OCA\\DAV\\CardDAV\\Converter' => __DIR__ . '/..' . '/../lib/CardDAV/Converter.php',
75
-        'OCA\\DAV\\CardDAV\\ImageExportPlugin' => __DIR__ . '/..' . '/../lib/CardDAV/ImageExportPlugin.php',
76
-        'OCA\\DAV\\CardDAV\\PhotoCache' => __DIR__ . '/..' . '/../lib/CardDAV/PhotoCache.php',
77
-        'OCA\\DAV\\CardDAV\\Plugin' => __DIR__ . '/..' . '/../lib/CardDAV/Plugin.php',
78
-        'OCA\\DAV\\CardDAV\\SyncService' => __DIR__ . '/..' . '/../lib/CardDAV/SyncService.php',
79
-        'OCA\\DAV\\CardDAV\\UserAddressBooks' => __DIR__ . '/..' . '/../lib/CardDAV/UserAddressBooks.php',
80
-        'OCA\\DAV\\CardDAV\\Xml\\Groups' => __DIR__ . '/..' . '/../lib/CardDAV/Xml/Groups.php',
81
-        'OCA\\DAV\\Command\\CreateAddressBook' => __DIR__ . '/..' . '/../lib/Command/CreateAddressBook.php',
82
-        'OCA\\DAV\\Command\\CreateCalendar' => __DIR__ . '/..' . '/../lib/Command/CreateCalendar.php',
83
-        'OCA\\DAV\\Command\\RemoveInvalidShares' => __DIR__ . '/..' . '/../lib/Command/RemoveInvalidShares.php',
84
-        'OCA\\DAV\\Command\\SyncBirthdayCalendar' => __DIR__ . '/..' . '/../lib/Command/SyncBirthdayCalendar.php',
85
-        'OCA\\DAV\\Command\\SyncSystemAddressBook' => __DIR__ . '/..' . '/../lib/Command/SyncSystemAddressBook.php',
86
-        'OCA\\DAV\\Comments\\CommentNode' => __DIR__ . '/..' . '/../lib/Comments/CommentNode.php',
87
-        'OCA\\DAV\\Comments\\CommentsPlugin' => __DIR__ . '/..' . '/../lib/Comments/CommentsPlugin.php',
88
-        'OCA\\DAV\\Comments\\EntityCollection' => __DIR__ . '/..' . '/../lib/Comments/EntityCollection.php',
89
-        'OCA\\DAV\\Comments\\EntityTypeCollection' => __DIR__ . '/..' . '/../lib/Comments/EntityTypeCollection.php',
90
-        'OCA\\DAV\\Comments\\RootCollection' => __DIR__ . '/..' . '/../lib/Comments/RootCollection.php',
91
-        'OCA\\DAV\\Connector\\LegacyDAVACL' => __DIR__ . '/..' . '/../lib/Connector/LegacyDAVACL.php',
92
-        'OCA\\DAV\\Connector\\PublicAuth' => __DIR__ . '/..' . '/../lib/Connector/PublicAuth.php',
93
-        'OCA\\DAV\\Connector\\Sabre\\AppEnabledPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/AppEnabledPlugin.php',
94
-        'OCA\\DAV\\Connector\\Sabre\\Auth' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Auth.php',
95
-        'OCA\\DAV\\Connector\\Sabre\\BearerAuth' => __DIR__ . '/..' . '/../lib/Connector/Sabre/BearerAuth.php',
96
-        'OCA\\DAV\\Connector\\Sabre\\BlockLegacyClientPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/BlockLegacyClientPlugin.php',
97
-        'OCA\\DAV\\Connector\\Sabre\\CachingTree' => __DIR__ . '/..' . '/../lib/Connector/Sabre/CachingTree.php',
98
-        'OCA\\DAV\\Connector\\Sabre\\ChecksumList' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ChecksumList.php',
99
-        'OCA\\DAV\\Connector\\Sabre\\CommentPropertiesPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/CommentPropertiesPlugin.php',
100
-        'OCA\\DAV\\Connector\\Sabre\\CopyEtagHeaderPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/CopyEtagHeaderPlugin.php',
101
-        'OCA\\DAV\\Connector\\Sabre\\CustomPropertiesBackend' => __DIR__ . '/..' . '/../lib/Connector/Sabre/CustomPropertiesBackend.php',
102
-        'OCA\\DAV\\Connector\\Sabre\\DavAclPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/DavAclPlugin.php',
103
-        'OCA\\DAV\\Connector\\Sabre\\Directory' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Directory.php',
104
-        'OCA\\DAV\\Connector\\Sabre\\DummyGetResponsePlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/DummyGetResponsePlugin.php',
105
-        'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ExceptionLoggerPlugin.php',
106
-        'OCA\\DAV\\Connector\\Sabre\\Exception\\EntityTooLarge' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/EntityTooLarge.php',
107
-        'OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/FileLocked.php',
108
-        'OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/Forbidden.php',
109
-        'OCA\\DAV\\Connector\\Sabre\\Exception\\InvalidPath' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/InvalidPath.php',
110
-        'OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/PasswordLoginForbidden.php',
111
-        'OCA\\DAV\\Connector\\Sabre\\Exception\\UnsupportedMediaType' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/UnsupportedMediaType.php',
112
-        'OCA\\DAV\\Connector\\Sabre\\FakeLockerPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/FakeLockerPlugin.php',
113
-        'OCA\\DAV\\Connector\\Sabre\\File' => __DIR__ . '/..' . '/../lib/Connector/Sabre/File.php',
114
-        'OCA\\DAV\\Connector\\Sabre\\FilesPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/FilesPlugin.php',
115
-        'OCA\\DAV\\Connector\\Sabre\\FilesReportPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/FilesReportPlugin.php',
116
-        'OCA\\DAV\\Connector\\Sabre\\LockPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/LockPlugin.php',
117
-        'OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/MaintenancePlugin.php',
118
-        'OCA\\DAV\\Connector\\Sabre\\Node' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Node.php',
119
-        'OCA\\DAV\\Connector\\Sabre\\ObjectTree' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ObjectTree.php',
120
-        'OCA\\DAV\\Connector\\Sabre\\Principal' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Principal.php',
121
-        'OCA\\DAV\\Connector\\Sabre\\QuotaPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/QuotaPlugin.php',
122
-        'OCA\\DAV\\Connector\\Sabre\\Server' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Server.php',
123
-        'OCA\\DAV\\Connector\\Sabre\\ServerFactory' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ServerFactory.php',
124
-        'OCA\\DAV\\Connector\\Sabre\\ShareTypeList' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ShareTypeList.php',
125
-        'OCA\\DAV\\Connector\\Sabre\\SharesPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/SharesPlugin.php',
126
-        'OCA\\DAV\\Connector\\Sabre\\TagList' => __DIR__ . '/..' . '/../lib/Connector/Sabre/TagList.php',
127
-        'OCA\\DAV\\Connector\\Sabre\\TagsPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/TagsPlugin.php',
128
-        'OCA\\DAV\\Controller\\BirthdayCalendarController' => __DIR__ . '/..' . '/../lib/Controller/BirthdayCalendarController.php',
129
-        'OCA\\DAV\\Controller\\DirectController' => __DIR__ . '/..' . '/../lib/Controller/DirectController.php',
130
-        'OCA\\DAV\\DAV\\CustomPropertiesBackend' => __DIR__ . '/..' . '/../lib/DAV/CustomPropertiesBackend.php',
131
-        'OCA\\DAV\\DAV\\GroupPrincipalBackend' => __DIR__ . '/..' . '/../lib/DAV/GroupPrincipalBackend.php',
132
-        'OCA\\DAV\\DAV\\PublicAuth' => __DIR__ . '/..' . '/../lib/DAV/PublicAuth.php',
133
-        'OCA\\DAV\\DAV\\Sharing\\Backend' => __DIR__ . '/..' . '/../lib/DAV/Sharing/Backend.php',
134
-        'OCA\\DAV\\DAV\\Sharing\\IShareable' => __DIR__ . '/..' . '/../lib/DAV/Sharing/IShareable.php',
135
-        'OCA\\DAV\\DAV\\Sharing\\Plugin' => __DIR__ . '/..' . '/../lib/DAV/Sharing/Plugin.php',
136
-        'OCA\\DAV\\DAV\\Sharing\\Xml\\Invite' => __DIR__ . '/..' . '/../lib/DAV/Sharing/Xml/Invite.php',
137
-        'OCA\\DAV\\DAV\\Sharing\\Xml\\ShareRequest' => __DIR__ . '/..' . '/../lib/DAV/Sharing/Xml/ShareRequest.php',
138
-        'OCA\\DAV\\DAV\\SystemPrincipalBackend' => __DIR__ . '/..' . '/../lib/DAV/SystemPrincipalBackend.php',
139
-        'OCA\\DAV\\Db\\Direct' => __DIR__ . '/..' . '/../lib/Db/Direct.php',
140
-        'OCA\\DAV\\Db\\DirectMapper' => __DIR__ . '/..' . '/../lib/Db/DirectMapper.php',
141
-        'OCA\\DAV\\Direct\\DirectFile' => __DIR__ . '/..' . '/../lib/Direct/DirectFile.php',
142
-        'OCA\\DAV\\Direct\\DirectHome' => __DIR__ . '/..' . '/../lib/Direct/DirectHome.php',
143
-        'OCA\\DAV\\Direct\\Server' => __DIR__ . '/..' . '/../lib/Direct/Server.php',
144
-        'OCA\\DAV\\Direct\\ServerFactory' => __DIR__ . '/..' . '/../lib/Direct/ServerFactory.php',
145
-        'OCA\\DAV\\Files\\BrowserErrorPagePlugin' => __DIR__ . '/..' . '/../lib/Files/BrowserErrorPagePlugin.php',
146
-        'OCA\\DAV\\Files\\FileSearchBackend' => __DIR__ . '/..' . '/../lib/Files/FileSearchBackend.php',
147
-        'OCA\\DAV\\Files\\FilesHome' => __DIR__ . '/..' . '/../lib/Files/FilesHome.php',
148
-        'OCA\\DAV\\Files\\RootCollection' => __DIR__ . '/..' . '/../lib/Files/RootCollection.php',
149
-        'OCA\\DAV\\Files\\Sharing\\FilesDropPlugin' => __DIR__ . '/..' . '/../lib/Files/Sharing/FilesDropPlugin.php',
150
-        'OCA\\DAV\\Files\\Sharing\\PublicLinkCheckPlugin' => __DIR__ . '/..' . '/../lib/Files/Sharing/PublicLinkCheckPlugin.php',
151
-        'OCA\\DAV\\HookManager' => __DIR__ . '/..' . '/../lib/HookManager.php',
152
-        'OCA\\DAV\\Migration\\BuildCalendarSearchIndex' => __DIR__ . '/..' . '/../lib/Migration/BuildCalendarSearchIndex.php',
153
-        'OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob' => __DIR__ . '/..' . '/../lib/Migration/BuildCalendarSearchIndexBackgroundJob.php',
154
-        'OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue' => __DIR__ . '/..' . '/../lib/Migration/CalDAVRemoveEmptyValue.php',
155
-        'OCA\\DAV\\Migration\\FixBirthdayCalendarComponent' => __DIR__ . '/..' . '/../lib/Migration/FixBirthdayCalendarComponent.php',
156
-        'OCA\\DAV\\Migration\\Version1004Date20170825134824' => __DIR__ . '/..' . '/../lib/Migration/Version1004Date20170825134824.php',
157
-        'OCA\\DAV\\Migration\\Version1004Date20170919104507' => __DIR__ . '/..' . '/../lib/Migration/Version1004Date20170919104507.php',
158
-        'OCA\\DAV\\Migration\\Version1004Date20170924124212' => __DIR__ . '/..' . '/../lib/Migration/Version1004Date20170924124212.php',
159
-        'OCA\\DAV\\Migration\\Version1004Date20170926103422' => __DIR__ . '/..' . '/../lib/Migration/Version1004Date20170926103422.php',
160
-        'OCA\\DAV\\Migration\\Version1005Date20180413093149' => __DIR__ . '/..' . '/../lib/Migration/Version1005Date20180413093149.php',
161
-        'OCA\\DAV\\RootCollection' => __DIR__ . '/..' . '/../lib/RootCollection.php',
162
-        'OCA\\DAV\\Server' => __DIR__ . '/..' . '/../lib/Server.php',
163
-        'OCA\\DAV\\Settings\\CalDAVSettings' => __DIR__ . '/..' . '/../lib/Settings/CalDAVSettings.php',
164
-        'OCA\\DAV\\SystemTag\\SystemTagMappingNode' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagMappingNode.php',
165
-        'OCA\\DAV\\SystemTag\\SystemTagNode' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagNode.php',
166
-        'OCA\\DAV\\SystemTag\\SystemTagPlugin' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagPlugin.php',
167
-        'OCA\\DAV\\SystemTag\\SystemTagsByIdCollection' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagsByIdCollection.php',
168
-        'OCA\\DAV\\SystemTag\\SystemTagsObjectMappingCollection' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagsObjectMappingCollection.php',
169
-        'OCA\\DAV\\SystemTag\\SystemTagsObjectTypeCollection' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagsObjectTypeCollection.php',
170
-        'OCA\\DAV\\SystemTag\\SystemTagsRelationsCollection' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagsRelationsCollection.php',
171
-        'OCA\\DAV\\Upload\\AssemblyStream' => __DIR__ . '/..' . '/../lib/Upload/AssemblyStream.php',
172
-        'OCA\\DAV\\Upload\\ChunkingPlugin' => __DIR__ . '/..' . '/../lib/Upload/ChunkingPlugin.php',
173
-        'OCA\\DAV\\Upload\\FutureFile' => __DIR__ . '/..' . '/../lib/Upload/FutureFile.php',
174
-        'OCA\\DAV\\Upload\\RootCollection' => __DIR__ . '/..' . '/../lib/Upload/RootCollection.php',
175
-        'OCA\\DAV\\Upload\\UploadFolder' => __DIR__ . '/..' . '/../lib/Upload/UploadFolder.php',
176
-        'OCA\\DAV\\Upload\\UploadHome' => __DIR__ . '/..' . '/../lib/Upload/UploadHome.php',
23
+    public static $classMap = array(
24
+        'OCA\\DAV\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php',
25
+        'OCA\\DAV\\AppInfo\\PluginManager' => __DIR__.'/..'.'/../lib/AppInfo/PluginManager.php',
26
+        'OCA\\DAV\\Avatars\\AvatarHome' => __DIR__.'/..'.'/../lib/Avatars/AvatarHome.php',
27
+        'OCA\\DAV\\Avatars\\AvatarNode' => __DIR__.'/..'.'/../lib/Avatars/AvatarNode.php',
28
+        'OCA\\DAV\\Avatars\\RootCollection' => __DIR__.'/..'.'/../lib/Avatars/RootCollection.php',
29
+        'OCA\\DAV\\BackgroundJob\\CleanupDirectLinksJob' => __DIR__.'/..'.'/../lib/BackgroundJob/CleanupDirectLinksJob.php',
30
+        'OCA\\DAV\\BackgroundJob\\GenerateBirthdayCalendarBackgroundJob' => __DIR__.'/..'.'/../lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php',
31
+        'OCA\\DAV\\CalDAV\\Activity\\Backend' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Backend.php',
32
+        'OCA\\DAV\\CalDAV\\Activity\\Filter\\Calendar' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Filter/Calendar.php',
33
+        'OCA\\DAV\\CalDAV\\Activity\\Filter\\Todo' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Filter/Todo.php',
34
+        'OCA\\DAV\\CalDAV\\Activity\\Provider\\Base' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Provider/Base.php',
35
+        'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Provider/Calendar.php',
36
+        'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Provider/Event.php',
37
+        'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Provider/Todo.php',
38
+        'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Setting/Calendar.php',
39
+        'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Setting/Event.php',
40
+        'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Setting/Todo.php',
41
+        'OCA\\DAV\\CalDAV\\BirthdayCalendar\\EnablePlugin' => __DIR__.'/..'.'/../lib/CalDAV/BirthdayCalendar/EnablePlugin.php',
42
+        'OCA\\DAV\\CalDAV\\BirthdayService' => __DIR__.'/..'.'/../lib/CalDAV/BirthdayService.php',
43
+        'OCA\\DAV\\CalDAV\\CalDavBackend' => __DIR__.'/..'.'/../lib/CalDAV/CalDavBackend.php',
44
+        'OCA\\DAV\\CalDAV\\Calendar' => __DIR__.'/..'.'/../lib/CalDAV/Calendar.php',
45
+        'OCA\\DAV\\CalDAV\\CalendarHome' => __DIR__.'/..'.'/../lib/CalDAV/CalendarHome.php',
46
+        'OCA\\DAV\\CalDAV\\CalendarImpl' => __DIR__.'/..'.'/../lib/CalDAV/CalendarImpl.php',
47
+        'OCA\\DAV\\CalDAV\\CalendarManager' => __DIR__.'/..'.'/../lib/CalDAV/CalendarManager.php',
48
+        'OCA\\DAV\\CalDAV\\CalendarObject' => __DIR__.'/..'.'/../lib/CalDAV/CalendarObject.php',
49
+        'OCA\\DAV\\CalDAV\\CalendarRoot' => __DIR__.'/..'.'/../lib/CalDAV/CalendarRoot.php',
50
+        'OCA\\DAV\\CalDAV\\Plugin' => __DIR__.'/..'.'/../lib/CalDAV/Plugin.php',
51
+        'OCA\\DAV\\CalDAV\\Principal\\Collection' => __DIR__.'/..'.'/../lib/CalDAV/Principal/Collection.php',
52
+        'OCA\\DAV\\CalDAV\\Principal\\User' => __DIR__.'/..'.'/../lib/CalDAV/Principal/User.php',
53
+        'OCA\\DAV\\CalDAV\\PublicCalendar' => __DIR__.'/..'.'/../lib/CalDAV/PublicCalendar.php',
54
+        'OCA\\DAV\\CalDAV\\PublicCalendarObject' => __DIR__.'/..'.'/../lib/CalDAV/PublicCalendarObject.php',
55
+        'OCA\\DAV\\CalDAV\\PublicCalendarRoot' => __DIR__.'/..'.'/../lib/CalDAV/PublicCalendarRoot.php',
56
+        'OCA\\DAV\\CalDAV\\Publishing\\PublishPlugin' => __DIR__.'/..'.'/../lib/CalDAV/Publishing/PublishPlugin.php',
57
+        'OCA\\DAV\\CalDAV\\Publishing\\Xml\\Publisher' => __DIR__.'/..'.'/../lib/CalDAV/Publishing/Xml/Publisher.php',
58
+        'OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin' => __DIR__.'/..'.'/../lib/CalDAV/Schedule/IMipPlugin.php',
59
+        'OCA\\DAV\\CalDAV\\Schedule\\Plugin' => __DIR__.'/..'.'/../lib/CalDAV/Schedule/Plugin.php',
60
+        'OCA\\DAV\\CalDAV\\Search\\SearchPlugin' => __DIR__.'/..'.'/../lib/CalDAV/Search/SearchPlugin.php',
61
+        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/CompFilter.php',
62
+        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/LimitFilter.php',
63
+        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/OffsetFilter.php',
64
+        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/ParamFilter.php',
65
+        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/PropFilter.php',
66
+        'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php',
67
+        'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php',
68
+        'OCA\\DAV\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php',
69
+        'OCA\\DAV\\CardDAV\\AddressBook' => __DIR__.'/..'.'/../lib/CardDAV/AddressBook.php',
70
+        'OCA\\DAV\\CardDAV\\AddressBookImpl' => __DIR__.'/..'.'/../lib/CardDAV/AddressBookImpl.php',
71
+        'OCA\\DAV\\CardDAV\\AddressBookRoot' => __DIR__.'/..'.'/../lib/CardDAV/AddressBookRoot.php',
72
+        'OCA\\DAV\\CardDAV\\CardDavBackend' => __DIR__.'/..'.'/../lib/CardDAV/CardDavBackend.php',
73
+        'OCA\\DAV\\CardDAV\\ContactsManager' => __DIR__.'/..'.'/../lib/CardDAV/ContactsManager.php',
74
+        'OCA\\DAV\\CardDAV\\Converter' => __DIR__.'/..'.'/../lib/CardDAV/Converter.php',
75
+        'OCA\\DAV\\CardDAV\\ImageExportPlugin' => __DIR__.'/..'.'/../lib/CardDAV/ImageExportPlugin.php',
76
+        'OCA\\DAV\\CardDAV\\PhotoCache' => __DIR__.'/..'.'/../lib/CardDAV/PhotoCache.php',
77
+        'OCA\\DAV\\CardDAV\\Plugin' => __DIR__.'/..'.'/../lib/CardDAV/Plugin.php',
78
+        'OCA\\DAV\\CardDAV\\SyncService' => __DIR__.'/..'.'/../lib/CardDAV/SyncService.php',
79
+        'OCA\\DAV\\CardDAV\\UserAddressBooks' => __DIR__.'/..'.'/../lib/CardDAV/UserAddressBooks.php',
80
+        'OCA\\DAV\\CardDAV\\Xml\\Groups' => __DIR__.'/..'.'/../lib/CardDAV/Xml/Groups.php',
81
+        'OCA\\DAV\\Command\\CreateAddressBook' => __DIR__.'/..'.'/../lib/Command/CreateAddressBook.php',
82
+        'OCA\\DAV\\Command\\CreateCalendar' => __DIR__.'/..'.'/../lib/Command/CreateCalendar.php',
83
+        'OCA\\DAV\\Command\\RemoveInvalidShares' => __DIR__.'/..'.'/../lib/Command/RemoveInvalidShares.php',
84
+        'OCA\\DAV\\Command\\SyncBirthdayCalendar' => __DIR__.'/..'.'/../lib/Command/SyncBirthdayCalendar.php',
85
+        'OCA\\DAV\\Command\\SyncSystemAddressBook' => __DIR__.'/..'.'/../lib/Command/SyncSystemAddressBook.php',
86
+        'OCA\\DAV\\Comments\\CommentNode' => __DIR__.'/..'.'/../lib/Comments/CommentNode.php',
87
+        'OCA\\DAV\\Comments\\CommentsPlugin' => __DIR__.'/..'.'/../lib/Comments/CommentsPlugin.php',
88
+        'OCA\\DAV\\Comments\\EntityCollection' => __DIR__.'/..'.'/../lib/Comments/EntityCollection.php',
89
+        'OCA\\DAV\\Comments\\EntityTypeCollection' => __DIR__.'/..'.'/../lib/Comments/EntityTypeCollection.php',
90
+        'OCA\\DAV\\Comments\\RootCollection' => __DIR__.'/..'.'/../lib/Comments/RootCollection.php',
91
+        'OCA\\DAV\\Connector\\LegacyDAVACL' => __DIR__.'/..'.'/../lib/Connector/LegacyDAVACL.php',
92
+        'OCA\\DAV\\Connector\\PublicAuth' => __DIR__.'/..'.'/../lib/Connector/PublicAuth.php',
93
+        'OCA\\DAV\\Connector\\Sabre\\AppEnabledPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/AppEnabledPlugin.php',
94
+        'OCA\\DAV\\Connector\\Sabre\\Auth' => __DIR__.'/..'.'/../lib/Connector/Sabre/Auth.php',
95
+        'OCA\\DAV\\Connector\\Sabre\\BearerAuth' => __DIR__.'/..'.'/../lib/Connector/Sabre/BearerAuth.php',
96
+        'OCA\\DAV\\Connector\\Sabre\\BlockLegacyClientPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/BlockLegacyClientPlugin.php',
97
+        'OCA\\DAV\\Connector\\Sabre\\CachingTree' => __DIR__.'/..'.'/../lib/Connector/Sabre/CachingTree.php',
98
+        'OCA\\DAV\\Connector\\Sabre\\ChecksumList' => __DIR__.'/..'.'/../lib/Connector/Sabre/ChecksumList.php',
99
+        'OCA\\DAV\\Connector\\Sabre\\CommentPropertiesPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/CommentPropertiesPlugin.php',
100
+        'OCA\\DAV\\Connector\\Sabre\\CopyEtagHeaderPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/CopyEtagHeaderPlugin.php',
101
+        'OCA\\DAV\\Connector\\Sabre\\CustomPropertiesBackend' => __DIR__.'/..'.'/../lib/Connector/Sabre/CustomPropertiesBackend.php',
102
+        'OCA\\DAV\\Connector\\Sabre\\DavAclPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/DavAclPlugin.php',
103
+        'OCA\\DAV\\Connector\\Sabre\\Directory' => __DIR__.'/..'.'/../lib/Connector/Sabre/Directory.php',
104
+        'OCA\\DAV\\Connector\\Sabre\\DummyGetResponsePlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/DummyGetResponsePlugin.php',
105
+        'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/ExceptionLoggerPlugin.php',
106
+        'OCA\\DAV\\Connector\\Sabre\\Exception\\EntityTooLarge' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/EntityTooLarge.php',
107
+        'OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/FileLocked.php',
108
+        'OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/Forbidden.php',
109
+        'OCA\\DAV\\Connector\\Sabre\\Exception\\InvalidPath' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/InvalidPath.php',
110
+        'OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/PasswordLoginForbidden.php',
111
+        'OCA\\DAV\\Connector\\Sabre\\Exception\\UnsupportedMediaType' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/UnsupportedMediaType.php',
112
+        'OCA\\DAV\\Connector\\Sabre\\FakeLockerPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/FakeLockerPlugin.php',
113
+        'OCA\\DAV\\Connector\\Sabre\\File' => __DIR__.'/..'.'/../lib/Connector/Sabre/File.php',
114
+        'OCA\\DAV\\Connector\\Sabre\\FilesPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/FilesPlugin.php',
115
+        'OCA\\DAV\\Connector\\Sabre\\FilesReportPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/FilesReportPlugin.php',
116
+        'OCA\\DAV\\Connector\\Sabre\\LockPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/LockPlugin.php',
117
+        'OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/MaintenancePlugin.php',
118
+        'OCA\\DAV\\Connector\\Sabre\\Node' => __DIR__.'/..'.'/../lib/Connector/Sabre/Node.php',
119
+        'OCA\\DAV\\Connector\\Sabre\\ObjectTree' => __DIR__.'/..'.'/../lib/Connector/Sabre/ObjectTree.php',
120
+        'OCA\\DAV\\Connector\\Sabre\\Principal' => __DIR__.'/..'.'/../lib/Connector/Sabre/Principal.php',
121
+        'OCA\\DAV\\Connector\\Sabre\\QuotaPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/QuotaPlugin.php',
122
+        'OCA\\DAV\\Connector\\Sabre\\Server' => __DIR__.'/..'.'/../lib/Connector/Sabre/Server.php',
123
+        'OCA\\DAV\\Connector\\Sabre\\ServerFactory' => __DIR__.'/..'.'/../lib/Connector/Sabre/ServerFactory.php',
124
+        'OCA\\DAV\\Connector\\Sabre\\ShareTypeList' => __DIR__.'/..'.'/../lib/Connector/Sabre/ShareTypeList.php',
125
+        'OCA\\DAV\\Connector\\Sabre\\SharesPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/SharesPlugin.php',
126
+        'OCA\\DAV\\Connector\\Sabre\\TagList' => __DIR__.'/..'.'/../lib/Connector/Sabre/TagList.php',
127
+        'OCA\\DAV\\Connector\\Sabre\\TagsPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/TagsPlugin.php',
128
+        'OCA\\DAV\\Controller\\BirthdayCalendarController' => __DIR__.'/..'.'/../lib/Controller/BirthdayCalendarController.php',
129
+        'OCA\\DAV\\Controller\\DirectController' => __DIR__.'/..'.'/../lib/Controller/DirectController.php',
130
+        'OCA\\DAV\\DAV\\CustomPropertiesBackend' => __DIR__.'/..'.'/../lib/DAV/CustomPropertiesBackend.php',
131
+        'OCA\\DAV\\DAV\\GroupPrincipalBackend' => __DIR__.'/..'.'/../lib/DAV/GroupPrincipalBackend.php',
132
+        'OCA\\DAV\\DAV\\PublicAuth' => __DIR__.'/..'.'/../lib/DAV/PublicAuth.php',
133
+        'OCA\\DAV\\DAV\\Sharing\\Backend' => __DIR__.'/..'.'/../lib/DAV/Sharing/Backend.php',
134
+        'OCA\\DAV\\DAV\\Sharing\\IShareable' => __DIR__.'/..'.'/../lib/DAV/Sharing/IShareable.php',
135
+        'OCA\\DAV\\DAV\\Sharing\\Plugin' => __DIR__.'/..'.'/../lib/DAV/Sharing/Plugin.php',
136
+        'OCA\\DAV\\DAV\\Sharing\\Xml\\Invite' => __DIR__.'/..'.'/../lib/DAV/Sharing/Xml/Invite.php',
137
+        'OCA\\DAV\\DAV\\Sharing\\Xml\\ShareRequest' => __DIR__.'/..'.'/../lib/DAV/Sharing/Xml/ShareRequest.php',
138
+        'OCA\\DAV\\DAV\\SystemPrincipalBackend' => __DIR__.'/..'.'/../lib/DAV/SystemPrincipalBackend.php',
139
+        'OCA\\DAV\\Db\\Direct' => __DIR__.'/..'.'/../lib/Db/Direct.php',
140
+        'OCA\\DAV\\Db\\DirectMapper' => __DIR__.'/..'.'/../lib/Db/DirectMapper.php',
141
+        'OCA\\DAV\\Direct\\DirectFile' => __DIR__.'/..'.'/../lib/Direct/DirectFile.php',
142
+        'OCA\\DAV\\Direct\\DirectHome' => __DIR__.'/..'.'/../lib/Direct/DirectHome.php',
143
+        'OCA\\DAV\\Direct\\Server' => __DIR__.'/..'.'/../lib/Direct/Server.php',
144
+        'OCA\\DAV\\Direct\\ServerFactory' => __DIR__.'/..'.'/../lib/Direct/ServerFactory.php',
145
+        'OCA\\DAV\\Files\\BrowserErrorPagePlugin' => __DIR__.'/..'.'/../lib/Files/BrowserErrorPagePlugin.php',
146
+        'OCA\\DAV\\Files\\FileSearchBackend' => __DIR__.'/..'.'/../lib/Files/FileSearchBackend.php',
147
+        'OCA\\DAV\\Files\\FilesHome' => __DIR__.'/..'.'/../lib/Files/FilesHome.php',
148
+        'OCA\\DAV\\Files\\RootCollection' => __DIR__.'/..'.'/../lib/Files/RootCollection.php',
149
+        'OCA\\DAV\\Files\\Sharing\\FilesDropPlugin' => __DIR__.'/..'.'/../lib/Files/Sharing/FilesDropPlugin.php',
150
+        'OCA\\DAV\\Files\\Sharing\\PublicLinkCheckPlugin' => __DIR__.'/..'.'/../lib/Files/Sharing/PublicLinkCheckPlugin.php',
151
+        'OCA\\DAV\\HookManager' => __DIR__.'/..'.'/../lib/HookManager.php',
152
+        'OCA\\DAV\\Migration\\BuildCalendarSearchIndex' => __DIR__.'/..'.'/../lib/Migration/BuildCalendarSearchIndex.php',
153
+        'OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob' => __DIR__.'/..'.'/../lib/Migration/BuildCalendarSearchIndexBackgroundJob.php',
154
+        'OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue' => __DIR__.'/..'.'/../lib/Migration/CalDAVRemoveEmptyValue.php',
155
+        'OCA\\DAV\\Migration\\FixBirthdayCalendarComponent' => __DIR__.'/..'.'/../lib/Migration/FixBirthdayCalendarComponent.php',
156
+        'OCA\\DAV\\Migration\\Version1004Date20170825134824' => __DIR__.'/..'.'/../lib/Migration/Version1004Date20170825134824.php',
157
+        'OCA\\DAV\\Migration\\Version1004Date20170919104507' => __DIR__.'/..'.'/../lib/Migration/Version1004Date20170919104507.php',
158
+        'OCA\\DAV\\Migration\\Version1004Date20170924124212' => __DIR__.'/..'.'/../lib/Migration/Version1004Date20170924124212.php',
159
+        'OCA\\DAV\\Migration\\Version1004Date20170926103422' => __DIR__.'/..'.'/../lib/Migration/Version1004Date20170926103422.php',
160
+        'OCA\\DAV\\Migration\\Version1005Date20180413093149' => __DIR__.'/..'.'/../lib/Migration/Version1005Date20180413093149.php',
161
+        'OCA\\DAV\\RootCollection' => __DIR__.'/..'.'/../lib/RootCollection.php',
162
+        'OCA\\DAV\\Server' => __DIR__.'/..'.'/../lib/Server.php',
163
+        'OCA\\DAV\\Settings\\CalDAVSettings' => __DIR__.'/..'.'/../lib/Settings/CalDAVSettings.php',
164
+        'OCA\\DAV\\SystemTag\\SystemTagMappingNode' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagMappingNode.php',
165
+        'OCA\\DAV\\SystemTag\\SystemTagNode' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagNode.php',
166
+        'OCA\\DAV\\SystemTag\\SystemTagPlugin' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagPlugin.php',
167
+        'OCA\\DAV\\SystemTag\\SystemTagsByIdCollection' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagsByIdCollection.php',
168
+        'OCA\\DAV\\SystemTag\\SystemTagsObjectMappingCollection' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagsObjectMappingCollection.php',
169
+        'OCA\\DAV\\SystemTag\\SystemTagsObjectTypeCollection' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagsObjectTypeCollection.php',
170
+        'OCA\\DAV\\SystemTag\\SystemTagsRelationsCollection' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagsRelationsCollection.php',
171
+        'OCA\\DAV\\Upload\\AssemblyStream' => __DIR__.'/..'.'/../lib/Upload/AssemblyStream.php',
172
+        'OCA\\DAV\\Upload\\ChunkingPlugin' => __DIR__.'/..'.'/../lib/Upload/ChunkingPlugin.php',
173
+        'OCA\\DAV\\Upload\\FutureFile' => __DIR__.'/..'.'/../lib/Upload/FutureFile.php',
174
+        'OCA\\DAV\\Upload\\RootCollection' => __DIR__.'/..'.'/../lib/Upload/RootCollection.php',
175
+        'OCA\\DAV\\Upload\\UploadFolder' => __DIR__.'/..'.'/../lib/Upload/UploadFolder.php',
176
+        'OCA\\DAV\\Upload\\UploadHome' => __DIR__.'/..'.'/../lib/Upload/UploadHome.php',
177 177
     );
178 178
 
179 179
     public static function getInitializer(ClassLoader $loader)
180 180
     {
181
-        return \Closure::bind(function () use ($loader) {
181
+        return \Closure::bind(function() use ($loader) {
182 182
             $loader->prefixLengthsPsr4 = ComposerStaticInitDAV::$prefixLengthsPsr4;
183 183
             $loader->prefixDirsPsr4 = ComposerStaticInitDAV::$prefixDirsPsr4;
184 184
             $loader->classMap = ComposerStaticInitDAV::$classMap;
Please login to merge, or discard this patch.
apps/dav/composer/composer/autoload_classmap.php 1 patch
Spacing   +153 added lines, -153 removed lines patch added patch discarded remove patch
@@ -6,157 +6,157 @@
 block discarded – undo
6 6
 $baseDir = $vendorDir;
7 7
 
8 8
 return array(
9
-    'OCA\\DAV\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
10
-    'OCA\\DAV\\AppInfo\\PluginManager' => $baseDir . '/../lib/AppInfo/PluginManager.php',
11
-    'OCA\\DAV\\Avatars\\AvatarHome' => $baseDir . '/../lib/Avatars/AvatarHome.php',
12
-    'OCA\\DAV\\Avatars\\AvatarNode' => $baseDir . '/../lib/Avatars/AvatarNode.php',
13
-    'OCA\\DAV\\Avatars\\RootCollection' => $baseDir . '/../lib/Avatars/RootCollection.php',
14
-    'OCA\\DAV\\BackgroundJob\\CleanupDirectLinksJob' => $baseDir . '/../lib/BackgroundJob/CleanupDirectLinksJob.php',
15
-    'OCA\\DAV\\BackgroundJob\\GenerateBirthdayCalendarBackgroundJob' => $baseDir . '/../lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php',
16
-    'OCA\\DAV\\CalDAV\\Activity\\Backend' => $baseDir . '/../lib/CalDAV/Activity/Backend.php',
17
-    'OCA\\DAV\\CalDAV\\Activity\\Filter\\Calendar' => $baseDir . '/../lib/CalDAV/Activity/Filter/Calendar.php',
18
-    'OCA\\DAV\\CalDAV\\Activity\\Filter\\Todo' => $baseDir . '/../lib/CalDAV/Activity/Filter/Todo.php',
19
-    'OCA\\DAV\\CalDAV\\Activity\\Provider\\Base' => $baseDir . '/../lib/CalDAV/Activity/Provider/Base.php',
20
-    'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => $baseDir . '/../lib/CalDAV/Activity/Provider/Calendar.php',
21
-    'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => $baseDir . '/../lib/CalDAV/Activity/Provider/Event.php',
22
-    'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => $baseDir . '/../lib/CalDAV/Activity/Provider/Todo.php',
23
-    'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => $baseDir . '/../lib/CalDAV/Activity/Setting/Calendar.php',
24
-    'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => $baseDir . '/../lib/CalDAV/Activity/Setting/Event.php',
25
-    'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => $baseDir . '/../lib/CalDAV/Activity/Setting/Todo.php',
26
-    'OCA\\DAV\\CalDAV\\BirthdayCalendar\\EnablePlugin' => $baseDir . '/../lib/CalDAV/BirthdayCalendar/EnablePlugin.php',
27
-    'OCA\\DAV\\CalDAV\\BirthdayService' => $baseDir . '/../lib/CalDAV/BirthdayService.php',
28
-    'OCA\\DAV\\CalDAV\\CalDavBackend' => $baseDir . '/../lib/CalDAV/CalDavBackend.php',
29
-    'OCA\\DAV\\CalDAV\\Calendar' => $baseDir . '/../lib/CalDAV/Calendar.php',
30
-    'OCA\\DAV\\CalDAV\\CalendarHome' => $baseDir . '/../lib/CalDAV/CalendarHome.php',
31
-    'OCA\\DAV\\CalDAV\\CalendarImpl' => $baseDir . '/../lib/CalDAV/CalendarImpl.php',
32
-    'OCA\\DAV\\CalDAV\\CalendarManager' => $baseDir . '/../lib/CalDAV/CalendarManager.php',
33
-    'OCA\\DAV\\CalDAV\\CalendarObject' => $baseDir . '/../lib/CalDAV/CalendarObject.php',
34
-    'OCA\\DAV\\CalDAV\\CalendarRoot' => $baseDir . '/../lib/CalDAV/CalendarRoot.php',
35
-    'OCA\\DAV\\CalDAV\\Plugin' => $baseDir . '/../lib/CalDAV/Plugin.php',
36
-    'OCA\\DAV\\CalDAV\\Principal\\Collection' => $baseDir . '/../lib/CalDAV/Principal/Collection.php',
37
-    'OCA\\DAV\\CalDAV\\Principal\\User' => $baseDir . '/../lib/CalDAV/Principal/User.php',
38
-    'OCA\\DAV\\CalDAV\\PublicCalendar' => $baseDir . '/../lib/CalDAV/PublicCalendar.php',
39
-    'OCA\\DAV\\CalDAV\\PublicCalendarObject' => $baseDir . '/../lib/CalDAV/PublicCalendarObject.php',
40
-    'OCA\\DAV\\CalDAV\\PublicCalendarRoot' => $baseDir . '/../lib/CalDAV/PublicCalendarRoot.php',
41
-    'OCA\\DAV\\CalDAV\\Publishing\\PublishPlugin' => $baseDir . '/../lib/CalDAV/Publishing/PublishPlugin.php',
42
-    'OCA\\DAV\\CalDAV\\Publishing\\Xml\\Publisher' => $baseDir . '/../lib/CalDAV/Publishing/Xml/Publisher.php',
43
-    'OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin' => $baseDir . '/../lib/CalDAV/Schedule/IMipPlugin.php',
44
-    'OCA\\DAV\\CalDAV\\Schedule\\Plugin' => $baseDir . '/../lib/CalDAV/Schedule/Plugin.php',
45
-    'OCA\\DAV\\CalDAV\\Search\\SearchPlugin' => $baseDir . '/../lib/CalDAV/Search/SearchPlugin.php',
46
-    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/CompFilter.php',
47
-    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/LimitFilter.php',
48
-    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/OffsetFilter.php',
49
-    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/ParamFilter.php',
50
-    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/PropFilter.php',
51
-    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php',
52
-    'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport' => $baseDir . '/../lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php',
53
-    'OCA\\DAV\\Capabilities' => $baseDir . '/../lib/Capabilities.php',
54
-    'OCA\\DAV\\CardDAV\\AddressBook' => $baseDir . '/../lib/CardDAV/AddressBook.php',
55
-    'OCA\\DAV\\CardDAV\\AddressBookImpl' => $baseDir . '/../lib/CardDAV/AddressBookImpl.php',
56
-    'OCA\\DAV\\CardDAV\\AddressBookRoot' => $baseDir . '/../lib/CardDAV/AddressBookRoot.php',
57
-    'OCA\\DAV\\CardDAV\\CardDavBackend' => $baseDir . '/../lib/CardDAV/CardDavBackend.php',
58
-    'OCA\\DAV\\CardDAV\\ContactsManager' => $baseDir . '/../lib/CardDAV/ContactsManager.php',
59
-    'OCA\\DAV\\CardDAV\\Converter' => $baseDir . '/../lib/CardDAV/Converter.php',
60
-    'OCA\\DAV\\CardDAV\\ImageExportPlugin' => $baseDir . '/../lib/CardDAV/ImageExportPlugin.php',
61
-    'OCA\\DAV\\CardDAV\\PhotoCache' => $baseDir . '/../lib/CardDAV/PhotoCache.php',
62
-    'OCA\\DAV\\CardDAV\\Plugin' => $baseDir . '/../lib/CardDAV/Plugin.php',
63
-    'OCA\\DAV\\CardDAV\\SyncService' => $baseDir . '/../lib/CardDAV/SyncService.php',
64
-    'OCA\\DAV\\CardDAV\\UserAddressBooks' => $baseDir . '/../lib/CardDAV/UserAddressBooks.php',
65
-    'OCA\\DAV\\CardDAV\\Xml\\Groups' => $baseDir . '/../lib/CardDAV/Xml/Groups.php',
66
-    'OCA\\DAV\\Command\\CreateAddressBook' => $baseDir . '/../lib/Command/CreateAddressBook.php',
67
-    'OCA\\DAV\\Command\\CreateCalendar' => $baseDir . '/../lib/Command/CreateCalendar.php',
68
-    'OCA\\DAV\\Command\\RemoveInvalidShares' => $baseDir . '/../lib/Command/RemoveInvalidShares.php',
69
-    'OCA\\DAV\\Command\\SyncBirthdayCalendar' => $baseDir . '/../lib/Command/SyncBirthdayCalendar.php',
70
-    'OCA\\DAV\\Command\\SyncSystemAddressBook' => $baseDir . '/../lib/Command/SyncSystemAddressBook.php',
71
-    'OCA\\DAV\\Comments\\CommentNode' => $baseDir . '/../lib/Comments/CommentNode.php',
72
-    'OCA\\DAV\\Comments\\CommentsPlugin' => $baseDir . '/../lib/Comments/CommentsPlugin.php',
73
-    'OCA\\DAV\\Comments\\EntityCollection' => $baseDir . '/../lib/Comments/EntityCollection.php',
74
-    'OCA\\DAV\\Comments\\EntityTypeCollection' => $baseDir . '/../lib/Comments/EntityTypeCollection.php',
75
-    'OCA\\DAV\\Comments\\RootCollection' => $baseDir . '/../lib/Comments/RootCollection.php',
76
-    'OCA\\DAV\\Connector\\LegacyDAVACL' => $baseDir . '/../lib/Connector/LegacyDAVACL.php',
77
-    'OCA\\DAV\\Connector\\PublicAuth' => $baseDir . '/../lib/Connector/PublicAuth.php',
78
-    'OCA\\DAV\\Connector\\Sabre\\AppEnabledPlugin' => $baseDir . '/../lib/Connector/Sabre/AppEnabledPlugin.php',
79
-    'OCA\\DAV\\Connector\\Sabre\\Auth' => $baseDir . '/../lib/Connector/Sabre/Auth.php',
80
-    'OCA\\DAV\\Connector\\Sabre\\BearerAuth' => $baseDir . '/../lib/Connector/Sabre/BearerAuth.php',
81
-    'OCA\\DAV\\Connector\\Sabre\\BlockLegacyClientPlugin' => $baseDir . '/../lib/Connector/Sabre/BlockLegacyClientPlugin.php',
82
-    'OCA\\DAV\\Connector\\Sabre\\CachingTree' => $baseDir . '/../lib/Connector/Sabre/CachingTree.php',
83
-    'OCA\\DAV\\Connector\\Sabre\\ChecksumList' => $baseDir . '/../lib/Connector/Sabre/ChecksumList.php',
84
-    'OCA\\DAV\\Connector\\Sabre\\CommentPropertiesPlugin' => $baseDir . '/../lib/Connector/Sabre/CommentPropertiesPlugin.php',
85
-    'OCA\\DAV\\Connector\\Sabre\\CopyEtagHeaderPlugin' => $baseDir . '/../lib/Connector/Sabre/CopyEtagHeaderPlugin.php',
86
-    'OCA\\DAV\\Connector\\Sabre\\CustomPropertiesBackend' => $baseDir . '/../lib/Connector/Sabre/CustomPropertiesBackend.php',
87
-    'OCA\\DAV\\Connector\\Sabre\\DavAclPlugin' => $baseDir . '/../lib/Connector/Sabre/DavAclPlugin.php',
88
-    'OCA\\DAV\\Connector\\Sabre\\Directory' => $baseDir . '/../lib/Connector/Sabre/Directory.php',
89
-    'OCA\\DAV\\Connector\\Sabre\\DummyGetResponsePlugin' => $baseDir . '/../lib/Connector/Sabre/DummyGetResponsePlugin.php',
90
-    'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' => $baseDir . '/../lib/Connector/Sabre/ExceptionLoggerPlugin.php',
91
-    'OCA\\DAV\\Connector\\Sabre\\Exception\\EntityTooLarge' => $baseDir . '/../lib/Connector/Sabre/Exception/EntityTooLarge.php',
92
-    'OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked' => $baseDir . '/../lib/Connector/Sabre/Exception/FileLocked.php',
93
-    'OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden' => $baseDir . '/../lib/Connector/Sabre/Exception/Forbidden.php',
94
-    'OCA\\DAV\\Connector\\Sabre\\Exception\\InvalidPath' => $baseDir . '/../lib/Connector/Sabre/Exception/InvalidPath.php',
95
-    'OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden' => $baseDir . '/../lib/Connector/Sabre/Exception/PasswordLoginForbidden.php',
96
-    'OCA\\DAV\\Connector\\Sabre\\Exception\\UnsupportedMediaType' => $baseDir . '/../lib/Connector/Sabre/Exception/UnsupportedMediaType.php',
97
-    'OCA\\DAV\\Connector\\Sabre\\FakeLockerPlugin' => $baseDir . '/../lib/Connector/Sabre/FakeLockerPlugin.php',
98
-    'OCA\\DAV\\Connector\\Sabre\\File' => $baseDir . '/../lib/Connector/Sabre/File.php',
99
-    'OCA\\DAV\\Connector\\Sabre\\FilesPlugin' => $baseDir . '/../lib/Connector/Sabre/FilesPlugin.php',
100
-    'OCA\\DAV\\Connector\\Sabre\\FilesReportPlugin' => $baseDir . '/../lib/Connector/Sabre/FilesReportPlugin.php',
101
-    'OCA\\DAV\\Connector\\Sabre\\LockPlugin' => $baseDir . '/../lib/Connector/Sabre/LockPlugin.php',
102
-    'OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin' => $baseDir . '/../lib/Connector/Sabre/MaintenancePlugin.php',
103
-    'OCA\\DAV\\Connector\\Sabre\\Node' => $baseDir . '/../lib/Connector/Sabre/Node.php',
104
-    'OCA\\DAV\\Connector\\Sabre\\ObjectTree' => $baseDir . '/../lib/Connector/Sabre/ObjectTree.php',
105
-    'OCA\\DAV\\Connector\\Sabre\\Principal' => $baseDir . '/../lib/Connector/Sabre/Principal.php',
106
-    'OCA\\DAV\\Connector\\Sabre\\QuotaPlugin' => $baseDir . '/../lib/Connector/Sabre/QuotaPlugin.php',
107
-    'OCA\\DAV\\Connector\\Sabre\\Server' => $baseDir . '/../lib/Connector/Sabre/Server.php',
108
-    'OCA\\DAV\\Connector\\Sabre\\ServerFactory' => $baseDir . '/../lib/Connector/Sabre/ServerFactory.php',
109
-    'OCA\\DAV\\Connector\\Sabre\\ShareTypeList' => $baseDir . '/../lib/Connector/Sabre/ShareTypeList.php',
110
-    'OCA\\DAV\\Connector\\Sabre\\SharesPlugin' => $baseDir . '/../lib/Connector/Sabre/SharesPlugin.php',
111
-    'OCA\\DAV\\Connector\\Sabre\\TagList' => $baseDir . '/../lib/Connector/Sabre/TagList.php',
112
-    'OCA\\DAV\\Connector\\Sabre\\TagsPlugin' => $baseDir . '/../lib/Connector/Sabre/TagsPlugin.php',
113
-    'OCA\\DAV\\Controller\\BirthdayCalendarController' => $baseDir . '/../lib/Controller/BirthdayCalendarController.php',
114
-    'OCA\\DAV\\Controller\\DirectController' => $baseDir . '/../lib/Controller/DirectController.php',
115
-    'OCA\\DAV\\DAV\\CustomPropertiesBackend' => $baseDir . '/../lib/DAV/CustomPropertiesBackend.php',
116
-    'OCA\\DAV\\DAV\\GroupPrincipalBackend' => $baseDir . '/../lib/DAV/GroupPrincipalBackend.php',
117
-    'OCA\\DAV\\DAV\\PublicAuth' => $baseDir . '/../lib/DAV/PublicAuth.php',
118
-    'OCA\\DAV\\DAV\\Sharing\\Backend' => $baseDir . '/../lib/DAV/Sharing/Backend.php',
119
-    'OCA\\DAV\\DAV\\Sharing\\IShareable' => $baseDir . '/../lib/DAV/Sharing/IShareable.php',
120
-    'OCA\\DAV\\DAV\\Sharing\\Plugin' => $baseDir . '/../lib/DAV/Sharing/Plugin.php',
121
-    'OCA\\DAV\\DAV\\Sharing\\Xml\\Invite' => $baseDir . '/../lib/DAV/Sharing/Xml/Invite.php',
122
-    'OCA\\DAV\\DAV\\Sharing\\Xml\\ShareRequest' => $baseDir . '/../lib/DAV/Sharing/Xml/ShareRequest.php',
123
-    'OCA\\DAV\\DAV\\SystemPrincipalBackend' => $baseDir . '/../lib/DAV/SystemPrincipalBackend.php',
124
-    'OCA\\DAV\\Db\\Direct' => $baseDir . '/../lib/Db/Direct.php',
125
-    'OCA\\DAV\\Db\\DirectMapper' => $baseDir . '/../lib/Db/DirectMapper.php',
126
-    'OCA\\DAV\\Direct\\DirectFile' => $baseDir . '/../lib/Direct/DirectFile.php',
127
-    'OCA\\DAV\\Direct\\DirectHome' => $baseDir . '/../lib/Direct/DirectHome.php',
128
-    'OCA\\DAV\\Direct\\Server' => $baseDir . '/../lib/Direct/Server.php',
129
-    'OCA\\DAV\\Direct\\ServerFactory' => $baseDir . '/../lib/Direct/ServerFactory.php',
130
-    'OCA\\DAV\\Files\\BrowserErrorPagePlugin' => $baseDir . '/../lib/Files/BrowserErrorPagePlugin.php',
131
-    'OCA\\DAV\\Files\\FileSearchBackend' => $baseDir . '/../lib/Files/FileSearchBackend.php',
132
-    'OCA\\DAV\\Files\\FilesHome' => $baseDir . '/../lib/Files/FilesHome.php',
133
-    'OCA\\DAV\\Files\\RootCollection' => $baseDir . '/../lib/Files/RootCollection.php',
134
-    'OCA\\DAV\\Files\\Sharing\\FilesDropPlugin' => $baseDir . '/../lib/Files/Sharing/FilesDropPlugin.php',
135
-    'OCA\\DAV\\Files\\Sharing\\PublicLinkCheckPlugin' => $baseDir . '/../lib/Files/Sharing/PublicLinkCheckPlugin.php',
136
-    'OCA\\DAV\\HookManager' => $baseDir . '/../lib/HookManager.php',
137
-    'OCA\\DAV\\Migration\\BuildCalendarSearchIndex' => $baseDir . '/../lib/Migration/BuildCalendarSearchIndex.php',
138
-    'OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob' => $baseDir . '/../lib/Migration/BuildCalendarSearchIndexBackgroundJob.php',
139
-    'OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue' => $baseDir . '/../lib/Migration/CalDAVRemoveEmptyValue.php',
140
-    'OCA\\DAV\\Migration\\FixBirthdayCalendarComponent' => $baseDir . '/../lib/Migration/FixBirthdayCalendarComponent.php',
141
-    'OCA\\DAV\\Migration\\Version1004Date20170825134824' => $baseDir . '/../lib/Migration/Version1004Date20170825134824.php',
142
-    'OCA\\DAV\\Migration\\Version1004Date20170919104507' => $baseDir . '/../lib/Migration/Version1004Date20170919104507.php',
143
-    'OCA\\DAV\\Migration\\Version1004Date20170924124212' => $baseDir . '/../lib/Migration/Version1004Date20170924124212.php',
144
-    'OCA\\DAV\\Migration\\Version1004Date20170926103422' => $baseDir . '/../lib/Migration/Version1004Date20170926103422.php',
145
-    'OCA\\DAV\\Migration\\Version1005Date20180413093149' => $baseDir . '/../lib/Migration/Version1005Date20180413093149.php',
146
-    'OCA\\DAV\\RootCollection' => $baseDir . '/../lib/RootCollection.php',
147
-    'OCA\\DAV\\Server' => $baseDir . '/../lib/Server.php',
148
-    'OCA\\DAV\\Settings\\CalDAVSettings' => $baseDir . '/../lib/Settings/CalDAVSettings.php',
149
-    'OCA\\DAV\\SystemTag\\SystemTagMappingNode' => $baseDir . '/../lib/SystemTag/SystemTagMappingNode.php',
150
-    'OCA\\DAV\\SystemTag\\SystemTagNode' => $baseDir . '/../lib/SystemTag/SystemTagNode.php',
151
-    'OCA\\DAV\\SystemTag\\SystemTagPlugin' => $baseDir . '/../lib/SystemTag/SystemTagPlugin.php',
152
-    'OCA\\DAV\\SystemTag\\SystemTagsByIdCollection' => $baseDir . '/../lib/SystemTag/SystemTagsByIdCollection.php',
153
-    'OCA\\DAV\\SystemTag\\SystemTagsObjectMappingCollection' => $baseDir . '/../lib/SystemTag/SystemTagsObjectMappingCollection.php',
154
-    'OCA\\DAV\\SystemTag\\SystemTagsObjectTypeCollection' => $baseDir . '/../lib/SystemTag/SystemTagsObjectTypeCollection.php',
155
-    'OCA\\DAV\\SystemTag\\SystemTagsRelationsCollection' => $baseDir . '/../lib/SystemTag/SystemTagsRelationsCollection.php',
156
-    'OCA\\DAV\\Upload\\AssemblyStream' => $baseDir . '/../lib/Upload/AssemblyStream.php',
157
-    'OCA\\DAV\\Upload\\ChunkingPlugin' => $baseDir . '/../lib/Upload/ChunkingPlugin.php',
158
-    'OCA\\DAV\\Upload\\FutureFile' => $baseDir . '/../lib/Upload/FutureFile.php',
159
-    'OCA\\DAV\\Upload\\RootCollection' => $baseDir . '/../lib/Upload/RootCollection.php',
160
-    'OCA\\DAV\\Upload\\UploadFolder' => $baseDir . '/../lib/Upload/UploadFolder.php',
161
-    'OCA\\DAV\\Upload\\UploadHome' => $baseDir . '/../lib/Upload/UploadHome.php',
9
+    'OCA\\DAV\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php',
10
+    'OCA\\DAV\\AppInfo\\PluginManager' => $baseDir.'/../lib/AppInfo/PluginManager.php',
11
+    'OCA\\DAV\\Avatars\\AvatarHome' => $baseDir.'/../lib/Avatars/AvatarHome.php',
12
+    'OCA\\DAV\\Avatars\\AvatarNode' => $baseDir.'/../lib/Avatars/AvatarNode.php',
13
+    'OCA\\DAV\\Avatars\\RootCollection' => $baseDir.'/../lib/Avatars/RootCollection.php',
14
+    'OCA\\DAV\\BackgroundJob\\CleanupDirectLinksJob' => $baseDir.'/../lib/BackgroundJob/CleanupDirectLinksJob.php',
15
+    'OCA\\DAV\\BackgroundJob\\GenerateBirthdayCalendarBackgroundJob' => $baseDir.'/../lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php',
16
+    'OCA\\DAV\\CalDAV\\Activity\\Backend' => $baseDir.'/../lib/CalDAV/Activity/Backend.php',
17
+    'OCA\\DAV\\CalDAV\\Activity\\Filter\\Calendar' => $baseDir.'/../lib/CalDAV/Activity/Filter/Calendar.php',
18
+    'OCA\\DAV\\CalDAV\\Activity\\Filter\\Todo' => $baseDir.'/../lib/CalDAV/Activity/Filter/Todo.php',
19
+    'OCA\\DAV\\CalDAV\\Activity\\Provider\\Base' => $baseDir.'/../lib/CalDAV/Activity/Provider/Base.php',
20
+    'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => $baseDir.'/../lib/CalDAV/Activity/Provider/Calendar.php',
21
+    'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => $baseDir.'/../lib/CalDAV/Activity/Provider/Event.php',
22
+    'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => $baseDir.'/../lib/CalDAV/Activity/Provider/Todo.php',
23
+    'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => $baseDir.'/../lib/CalDAV/Activity/Setting/Calendar.php',
24
+    'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => $baseDir.'/../lib/CalDAV/Activity/Setting/Event.php',
25
+    'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => $baseDir.'/../lib/CalDAV/Activity/Setting/Todo.php',
26
+    'OCA\\DAV\\CalDAV\\BirthdayCalendar\\EnablePlugin' => $baseDir.'/../lib/CalDAV/BirthdayCalendar/EnablePlugin.php',
27
+    'OCA\\DAV\\CalDAV\\BirthdayService' => $baseDir.'/../lib/CalDAV/BirthdayService.php',
28
+    'OCA\\DAV\\CalDAV\\CalDavBackend' => $baseDir.'/../lib/CalDAV/CalDavBackend.php',
29
+    'OCA\\DAV\\CalDAV\\Calendar' => $baseDir.'/../lib/CalDAV/Calendar.php',
30
+    'OCA\\DAV\\CalDAV\\CalendarHome' => $baseDir.'/../lib/CalDAV/CalendarHome.php',
31
+    'OCA\\DAV\\CalDAV\\CalendarImpl' => $baseDir.'/../lib/CalDAV/CalendarImpl.php',
32
+    'OCA\\DAV\\CalDAV\\CalendarManager' => $baseDir.'/../lib/CalDAV/CalendarManager.php',
33
+    'OCA\\DAV\\CalDAV\\CalendarObject' => $baseDir.'/../lib/CalDAV/CalendarObject.php',
34
+    'OCA\\DAV\\CalDAV\\CalendarRoot' => $baseDir.'/../lib/CalDAV/CalendarRoot.php',
35
+    'OCA\\DAV\\CalDAV\\Plugin' => $baseDir.'/../lib/CalDAV/Plugin.php',
36
+    'OCA\\DAV\\CalDAV\\Principal\\Collection' => $baseDir.'/../lib/CalDAV/Principal/Collection.php',
37
+    'OCA\\DAV\\CalDAV\\Principal\\User' => $baseDir.'/../lib/CalDAV/Principal/User.php',
38
+    'OCA\\DAV\\CalDAV\\PublicCalendar' => $baseDir.'/../lib/CalDAV/PublicCalendar.php',
39
+    'OCA\\DAV\\CalDAV\\PublicCalendarObject' => $baseDir.'/../lib/CalDAV/PublicCalendarObject.php',
40
+    'OCA\\DAV\\CalDAV\\PublicCalendarRoot' => $baseDir.'/../lib/CalDAV/PublicCalendarRoot.php',
41
+    'OCA\\DAV\\CalDAV\\Publishing\\PublishPlugin' => $baseDir.'/../lib/CalDAV/Publishing/PublishPlugin.php',
42
+    'OCA\\DAV\\CalDAV\\Publishing\\Xml\\Publisher' => $baseDir.'/../lib/CalDAV/Publishing/Xml/Publisher.php',
43
+    'OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin' => $baseDir.'/../lib/CalDAV/Schedule/IMipPlugin.php',
44
+    'OCA\\DAV\\CalDAV\\Schedule\\Plugin' => $baseDir.'/../lib/CalDAV/Schedule/Plugin.php',
45
+    'OCA\\DAV\\CalDAV\\Search\\SearchPlugin' => $baseDir.'/../lib/CalDAV/Search/SearchPlugin.php',
46
+    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/CompFilter.php',
47
+    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/LimitFilter.php',
48
+    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/OffsetFilter.php',
49
+    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/ParamFilter.php',
50
+    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/PropFilter.php',
51
+    'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php',
52
+    'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport' => $baseDir.'/../lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php',
53
+    'OCA\\DAV\\Capabilities' => $baseDir.'/../lib/Capabilities.php',
54
+    'OCA\\DAV\\CardDAV\\AddressBook' => $baseDir.'/../lib/CardDAV/AddressBook.php',
55
+    'OCA\\DAV\\CardDAV\\AddressBookImpl' => $baseDir.'/../lib/CardDAV/AddressBookImpl.php',
56
+    'OCA\\DAV\\CardDAV\\AddressBookRoot' => $baseDir.'/../lib/CardDAV/AddressBookRoot.php',
57
+    'OCA\\DAV\\CardDAV\\CardDavBackend' => $baseDir.'/../lib/CardDAV/CardDavBackend.php',
58
+    'OCA\\DAV\\CardDAV\\ContactsManager' => $baseDir.'/../lib/CardDAV/ContactsManager.php',
59
+    'OCA\\DAV\\CardDAV\\Converter' => $baseDir.'/../lib/CardDAV/Converter.php',
60
+    'OCA\\DAV\\CardDAV\\ImageExportPlugin' => $baseDir.'/../lib/CardDAV/ImageExportPlugin.php',
61
+    'OCA\\DAV\\CardDAV\\PhotoCache' => $baseDir.'/../lib/CardDAV/PhotoCache.php',
62
+    'OCA\\DAV\\CardDAV\\Plugin' => $baseDir.'/../lib/CardDAV/Plugin.php',
63
+    'OCA\\DAV\\CardDAV\\SyncService' => $baseDir.'/../lib/CardDAV/SyncService.php',
64
+    'OCA\\DAV\\CardDAV\\UserAddressBooks' => $baseDir.'/../lib/CardDAV/UserAddressBooks.php',
65
+    'OCA\\DAV\\CardDAV\\Xml\\Groups' => $baseDir.'/../lib/CardDAV/Xml/Groups.php',
66
+    'OCA\\DAV\\Command\\CreateAddressBook' => $baseDir.'/../lib/Command/CreateAddressBook.php',
67
+    'OCA\\DAV\\Command\\CreateCalendar' => $baseDir.'/../lib/Command/CreateCalendar.php',
68
+    'OCA\\DAV\\Command\\RemoveInvalidShares' => $baseDir.'/../lib/Command/RemoveInvalidShares.php',
69
+    'OCA\\DAV\\Command\\SyncBirthdayCalendar' => $baseDir.'/../lib/Command/SyncBirthdayCalendar.php',
70
+    'OCA\\DAV\\Command\\SyncSystemAddressBook' => $baseDir.'/../lib/Command/SyncSystemAddressBook.php',
71
+    'OCA\\DAV\\Comments\\CommentNode' => $baseDir.'/../lib/Comments/CommentNode.php',
72
+    'OCA\\DAV\\Comments\\CommentsPlugin' => $baseDir.'/../lib/Comments/CommentsPlugin.php',
73
+    'OCA\\DAV\\Comments\\EntityCollection' => $baseDir.'/../lib/Comments/EntityCollection.php',
74
+    'OCA\\DAV\\Comments\\EntityTypeCollection' => $baseDir.'/../lib/Comments/EntityTypeCollection.php',
75
+    'OCA\\DAV\\Comments\\RootCollection' => $baseDir.'/../lib/Comments/RootCollection.php',
76
+    'OCA\\DAV\\Connector\\LegacyDAVACL' => $baseDir.'/../lib/Connector/LegacyDAVACL.php',
77
+    'OCA\\DAV\\Connector\\PublicAuth' => $baseDir.'/../lib/Connector/PublicAuth.php',
78
+    'OCA\\DAV\\Connector\\Sabre\\AppEnabledPlugin' => $baseDir.'/../lib/Connector/Sabre/AppEnabledPlugin.php',
79
+    'OCA\\DAV\\Connector\\Sabre\\Auth' => $baseDir.'/../lib/Connector/Sabre/Auth.php',
80
+    'OCA\\DAV\\Connector\\Sabre\\BearerAuth' => $baseDir.'/../lib/Connector/Sabre/BearerAuth.php',
81
+    'OCA\\DAV\\Connector\\Sabre\\BlockLegacyClientPlugin' => $baseDir.'/../lib/Connector/Sabre/BlockLegacyClientPlugin.php',
82
+    'OCA\\DAV\\Connector\\Sabre\\CachingTree' => $baseDir.'/../lib/Connector/Sabre/CachingTree.php',
83
+    'OCA\\DAV\\Connector\\Sabre\\ChecksumList' => $baseDir.'/../lib/Connector/Sabre/ChecksumList.php',
84
+    'OCA\\DAV\\Connector\\Sabre\\CommentPropertiesPlugin' => $baseDir.'/../lib/Connector/Sabre/CommentPropertiesPlugin.php',
85
+    'OCA\\DAV\\Connector\\Sabre\\CopyEtagHeaderPlugin' => $baseDir.'/../lib/Connector/Sabre/CopyEtagHeaderPlugin.php',
86
+    'OCA\\DAV\\Connector\\Sabre\\CustomPropertiesBackend' => $baseDir.'/../lib/Connector/Sabre/CustomPropertiesBackend.php',
87
+    'OCA\\DAV\\Connector\\Sabre\\DavAclPlugin' => $baseDir.'/../lib/Connector/Sabre/DavAclPlugin.php',
88
+    'OCA\\DAV\\Connector\\Sabre\\Directory' => $baseDir.'/../lib/Connector/Sabre/Directory.php',
89
+    'OCA\\DAV\\Connector\\Sabre\\DummyGetResponsePlugin' => $baseDir.'/../lib/Connector/Sabre/DummyGetResponsePlugin.php',
90
+    'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' => $baseDir.'/../lib/Connector/Sabre/ExceptionLoggerPlugin.php',
91
+    'OCA\\DAV\\Connector\\Sabre\\Exception\\EntityTooLarge' => $baseDir.'/../lib/Connector/Sabre/Exception/EntityTooLarge.php',
92
+    'OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked' => $baseDir.'/../lib/Connector/Sabre/Exception/FileLocked.php',
93
+    'OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden' => $baseDir.'/../lib/Connector/Sabre/Exception/Forbidden.php',
94
+    'OCA\\DAV\\Connector\\Sabre\\Exception\\InvalidPath' => $baseDir.'/../lib/Connector/Sabre/Exception/InvalidPath.php',
95
+    'OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden' => $baseDir.'/../lib/Connector/Sabre/Exception/PasswordLoginForbidden.php',
96
+    'OCA\\DAV\\Connector\\Sabre\\Exception\\UnsupportedMediaType' => $baseDir.'/../lib/Connector/Sabre/Exception/UnsupportedMediaType.php',
97
+    'OCA\\DAV\\Connector\\Sabre\\FakeLockerPlugin' => $baseDir.'/../lib/Connector/Sabre/FakeLockerPlugin.php',
98
+    'OCA\\DAV\\Connector\\Sabre\\File' => $baseDir.'/../lib/Connector/Sabre/File.php',
99
+    'OCA\\DAV\\Connector\\Sabre\\FilesPlugin' => $baseDir.'/../lib/Connector/Sabre/FilesPlugin.php',
100
+    'OCA\\DAV\\Connector\\Sabre\\FilesReportPlugin' => $baseDir.'/../lib/Connector/Sabre/FilesReportPlugin.php',
101
+    'OCA\\DAV\\Connector\\Sabre\\LockPlugin' => $baseDir.'/../lib/Connector/Sabre/LockPlugin.php',
102
+    'OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin' => $baseDir.'/../lib/Connector/Sabre/MaintenancePlugin.php',
103
+    'OCA\\DAV\\Connector\\Sabre\\Node' => $baseDir.'/../lib/Connector/Sabre/Node.php',
104
+    'OCA\\DAV\\Connector\\Sabre\\ObjectTree' => $baseDir.'/../lib/Connector/Sabre/ObjectTree.php',
105
+    'OCA\\DAV\\Connector\\Sabre\\Principal' => $baseDir.'/../lib/Connector/Sabre/Principal.php',
106
+    'OCA\\DAV\\Connector\\Sabre\\QuotaPlugin' => $baseDir.'/../lib/Connector/Sabre/QuotaPlugin.php',
107
+    'OCA\\DAV\\Connector\\Sabre\\Server' => $baseDir.'/../lib/Connector/Sabre/Server.php',
108
+    'OCA\\DAV\\Connector\\Sabre\\ServerFactory' => $baseDir.'/../lib/Connector/Sabre/ServerFactory.php',
109
+    'OCA\\DAV\\Connector\\Sabre\\ShareTypeList' => $baseDir.'/../lib/Connector/Sabre/ShareTypeList.php',
110
+    'OCA\\DAV\\Connector\\Sabre\\SharesPlugin' => $baseDir.'/../lib/Connector/Sabre/SharesPlugin.php',
111
+    'OCA\\DAV\\Connector\\Sabre\\TagList' => $baseDir.'/../lib/Connector/Sabre/TagList.php',
112
+    'OCA\\DAV\\Connector\\Sabre\\TagsPlugin' => $baseDir.'/../lib/Connector/Sabre/TagsPlugin.php',
113
+    'OCA\\DAV\\Controller\\BirthdayCalendarController' => $baseDir.'/../lib/Controller/BirthdayCalendarController.php',
114
+    'OCA\\DAV\\Controller\\DirectController' => $baseDir.'/../lib/Controller/DirectController.php',
115
+    'OCA\\DAV\\DAV\\CustomPropertiesBackend' => $baseDir.'/../lib/DAV/CustomPropertiesBackend.php',
116
+    'OCA\\DAV\\DAV\\GroupPrincipalBackend' => $baseDir.'/../lib/DAV/GroupPrincipalBackend.php',
117
+    'OCA\\DAV\\DAV\\PublicAuth' => $baseDir.'/../lib/DAV/PublicAuth.php',
118
+    'OCA\\DAV\\DAV\\Sharing\\Backend' => $baseDir.'/../lib/DAV/Sharing/Backend.php',
119
+    'OCA\\DAV\\DAV\\Sharing\\IShareable' => $baseDir.'/../lib/DAV/Sharing/IShareable.php',
120
+    'OCA\\DAV\\DAV\\Sharing\\Plugin' => $baseDir.'/../lib/DAV/Sharing/Plugin.php',
121
+    'OCA\\DAV\\DAV\\Sharing\\Xml\\Invite' => $baseDir.'/../lib/DAV/Sharing/Xml/Invite.php',
122
+    'OCA\\DAV\\DAV\\Sharing\\Xml\\ShareRequest' => $baseDir.'/../lib/DAV/Sharing/Xml/ShareRequest.php',
123
+    'OCA\\DAV\\DAV\\SystemPrincipalBackend' => $baseDir.'/../lib/DAV/SystemPrincipalBackend.php',
124
+    'OCA\\DAV\\Db\\Direct' => $baseDir.'/../lib/Db/Direct.php',
125
+    'OCA\\DAV\\Db\\DirectMapper' => $baseDir.'/../lib/Db/DirectMapper.php',
126
+    'OCA\\DAV\\Direct\\DirectFile' => $baseDir.'/../lib/Direct/DirectFile.php',
127
+    'OCA\\DAV\\Direct\\DirectHome' => $baseDir.'/../lib/Direct/DirectHome.php',
128
+    'OCA\\DAV\\Direct\\Server' => $baseDir.'/../lib/Direct/Server.php',
129
+    'OCA\\DAV\\Direct\\ServerFactory' => $baseDir.'/../lib/Direct/ServerFactory.php',
130
+    'OCA\\DAV\\Files\\BrowserErrorPagePlugin' => $baseDir.'/../lib/Files/BrowserErrorPagePlugin.php',
131
+    'OCA\\DAV\\Files\\FileSearchBackend' => $baseDir.'/../lib/Files/FileSearchBackend.php',
132
+    'OCA\\DAV\\Files\\FilesHome' => $baseDir.'/../lib/Files/FilesHome.php',
133
+    'OCA\\DAV\\Files\\RootCollection' => $baseDir.'/../lib/Files/RootCollection.php',
134
+    'OCA\\DAV\\Files\\Sharing\\FilesDropPlugin' => $baseDir.'/../lib/Files/Sharing/FilesDropPlugin.php',
135
+    'OCA\\DAV\\Files\\Sharing\\PublicLinkCheckPlugin' => $baseDir.'/../lib/Files/Sharing/PublicLinkCheckPlugin.php',
136
+    'OCA\\DAV\\HookManager' => $baseDir.'/../lib/HookManager.php',
137
+    'OCA\\DAV\\Migration\\BuildCalendarSearchIndex' => $baseDir.'/../lib/Migration/BuildCalendarSearchIndex.php',
138
+    'OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob' => $baseDir.'/../lib/Migration/BuildCalendarSearchIndexBackgroundJob.php',
139
+    'OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue' => $baseDir.'/../lib/Migration/CalDAVRemoveEmptyValue.php',
140
+    'OCA\\DAV\\Migration\\FixBirthdayCalendarComponent' => $baseDir.'/../lib/Migration/FixBirthdayCalendarComponent.php',
141
+    'OCA\\DAV\\Migration\\Version1004Date20170825134824' => $baseDir.'/../lib/Migration/Version1004Date20170825134824.php',
142
+    'OCA\\DAV\\Migration\\Version1004Date20170919104507' => $baseDir.'/../lib/Migration/Version1004Date20170919104507.php',
143
+    'OCA\\DAV\\Migration\\Version1004Date20170924124212' => $baseDir.'/../lib/Migration/Version1004Date20170924124212.php',
144
+    'OCA\\DAV\\Migration\\Version1004Date20170926103422' => $baseDir.'/../lib/Migration/Version1004Date20170926103422.php',
145
+    'OCA\\DAV\\Migration\\Version1005Date20180413093149' => $baseDir.'/../lib/Migration/Version1005Date20180413093149.php',
146
+    'OCA\\DAV\\RootCollection' => $baseDir.'/../lib/RootCollection.php',
147
+    'OCA\\DAV\\Server' => $baseDir.'/../lib/Server.php',
148
+    'OCA\\DAV\\Settings\\CalDAVSettings' => $baseDir.'/../lib/Settings/CalDAVSettings.php',
149
+    'OCA\\DAV\\SystemTag\\SystemTagMappingNode' => $baseDir.'/../lib/SystemTag/SystemTagMappingNode.php',
150
+    'OCA\\DAV\\SystemTag\\SystemTagNode' => $baseDir.'/../lib/SystemTag/SystemTagNode.php',
151
+    'OCA\\DAV\\SystemTag\\SystemTagPlugin' => $baseDir.'/../lib/SystemTag/SystemTagPlugin.php',
152
+    'OCA\\DAV\\SystemTag\\SystemTagsByIdCollection' => $baseDir.'/../lib/SystemTag/SystemTagsByIdCollection.php',
153
+    'OCA\\DAV\\SystemTag\\SystemTagsObjectMappingCollection' => $baseDir.'/../lib/SystemTag/SystemTagsObjectMappingCollection.php',
154
+    'OCA\\DAV\\SystemTag\\SystemTagsObjectTypeCollection' => $baseDir.'/../lib/SystemTag/SystemTagsObjectTypeCollection.php',
155
+    'OCA\\DAV\\SystemTag\\SystemTagsRelationsCollection' => $baseDir.'/../lib/SystemTag/SystemTagsRelationsCollection.php',
156
+    'OCA\\DAV\\Upload\\AssemblyStream' => $baseDir.'/../lib/Upload/AssemblyStream.php',
157
+    'OCA\\DAV\\Upload\\ChunkingPlugin' => $baseDir.'/../lib/Upload/ChunkingPlugin.php',
158
+    'OCA\\DAV\\Upload\\FutureFile' => $baseDir.'/../lib/Upload/FutureFile.php',
159
+    'OCA\\DAV\\Upload\\RootCollection' => $baseDir.'/../lib/Upload/RootCollection.php',
160
+    'OCA\\DAV\\Upload\\UploadFolder' => $baseDir.'/../lib/Upload/UploadFolder.php',
161
+    'OCA\\DAV\\Upload\\UploadHome' => $baseDir.'/../lib/Upload/UploadHome.php',
162 162
 );
Please login to merge, or discard this patch.