@@ -67,7 +67,7 @@ |
||
| 67 | 67 | * |
| 68 | 68 | * @param string $path source path |
| 69 | 69 | * @param string $destination destination path |
| 70 | - * @return bool|void false to stop handling, void to skip this handler |
|
| 70 | + * @return null|false false to stop handling, void to skip this handler |
|
| 71 | 71 | */ |
| 72 | 72 | public function performMove($path, $destination) { |
| 73 | 73 | if (!$this->server->tree->nodeExists($destination)) { |
@@ -23,7 +23,6 @@ |
||
| 23 | 23 | namespace OCA\DAV\Upload; |
| 24 | 24 | |
| 25 | 25 | |
| 26 | -use OCA\DAV\Connector\Sabre\File; |
|
| 27 | 26 | use Sabre\DAV\Exception\BadRequest; |
| 28 | 27 | use Sabre\DAV\Server; |
| 29 | 28 | use Sabre\DAV\ServerPlugin; |
@@ -30,77 +30,77 @@ |
||
| 30 | 30 | |
| 31 | 31 | class ChunkingPlugin extends ServerPlugin { |
| 32 | 32 | |
| 33 | - /** @var Server */ |
|
| 34 | - private $server; |
|
| 35 | - /** @var FutureFile */ |
|
| 36 | - private $sourceNode; |
|
| 33 | + /** @var Server */ |
|
| 34 | + private $server; |
|
| 35 | + /** @var FutureFile */ |
|
| 36 | + private $sourceNode; |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * @inheritdoc |
|
| 40 | - */ |
|
| 41 | - function initialize(Server $server) { |
|
| 42 | - $server->on('beforeMove', [$this, 'beforeMove']); |
|
| 43 | - $this->server = $server; |
|
| 44 | - } |
|
| 38 | + /** |
|
| 39 | + * @inheritdoc |
|
| 40 | + */ |
|
| 41 | + function initialize(Server $server) { |
|
| 42 | + $server->on('beforeMove', [$this, 'beforeMove']); |
|
| 43 | + $this->server = $server; |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * @param string $sourcePath source path |
|
| 48 | - * @param string $destination destination path |
|
| 49 | - */ |
|
| 50 | - function beforeMove($sourcePath, $destination) { |
|
| 51 | - $this->sourceNode = $this->server->tree->getNodeForPath($sourcePath); |
|
| 52 | - if (!$this->sourceNode instanceof FutureFile) { |
|
| 53 | - // skip handling as the source is not a chunked FutureFile |
|
| 54 | - return; |
|
| 55 | - } |
|
| 46 | + /** |
|
| 47 | + * @param string $sourcePath source path |
|
| 48 | + * @param string $destination destination path |
|
| 49 | + */ |
|
| 50 | + function beforeMove($sourcePath, $destination) { |
|
| 51 | + $this->sourceNode = $this->server->tree->getNodeForPath($sourcePath); |
|
| 52 | + if (!$this->sourceNode instanceof FutureFile) { |
|
| 53 | + // skip handling as the source is not a chunked FutureFile |
|
| 54 | + return; |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - $this->verifySize(); |
|
| 58 | - return $this->performMove($sourcePath, $destination); |
|
| 59 | - } |
|
| 57 | + $this->verifySize(); |
|
| 58 | + return $this->performMove($sourcePath, $destination); |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * Move handler for future file. |
|
| 63 | - * |
|
| 64 | - * This overrides the default move behavior to prevent Sabre |
|
| 65 | - * to delete the target file before moving. Because deleting would |
|
| 66 | - * lose the file id and metadata. |
|
| 67 | - * |
|
| 68 | - * @param string $path source path |
|
| 69 | - * @param string $destination destination path |
|
| 70 | - * @return bool|void false to stop handling, void to skip this handler |
|
| 71 | - */ |
|
| 72 | - public function performMove($path, $destination) { |
|
| 73 | - if (!$this->server->tree->nodeExists($destination)) { |
|
| 74 | - // skip and let the default handler do its work |
|
| 75 | - return; |
|
| 76 | - } |
|
| 61 | + /** |
|
| 62 | + * Move handler for future file. |
|
| 63 | + * |
|
| 64 | + * This overrides the default move behavior to prevent Sabre |
|
| 65 | + * to delete the target file before moving. Because deleting would |
|
| 66 | + * lose the file id and metadata. |
|
| 67 | + * |
|
| 68 | + * @param string $path source path |
|
| 69 | + * @param string $destination destination path |
|
| 70 | + * @return bool|void false to stop handling, void to skip this handler |
|
| 71 | + */ |
|
| 72 | + public function performMove($path, $destination) { |
|
| 73 | + if (!$this->server->tree->nodeExists($destination)) { |
|
| 74 | + // skip and let the default handler do its work |
|
| 75 | + return; |
|
| 76 | + } |
|
| 77 | 77 | |
| 78 | - // do a move manually, skipping Sabre's default "delete" for existing nodes |
|
| 79 | - $this->server->tree->move($path, $destination); |
|
| 78 | + // do a move manually, skipping Sabre's default "delete" for existing nodes |
|
| 79 | + $this->server->tree->move($path, $destination); |
|
| 80 | 80 | |
| 81 | - // trigger all default events (copied from CorePlugin::move) |
|
| 82 | - $this->server->emit('afterMove', [$path, $destination]); |
|
| 83 | - $this->server->emit('afterUnbind', [$path]); |
|
| 84 | - $this->server->emit('afterBind', [$destination]); |
|
| 81 | + // trigger all default events (copied from CorePlugin::move) |
|
| 82 | + $this->server->emit('afterMove', [$path, $destination]); |
|
| 83 | + $this->server->emit('afterUnbind', [$path]); |
|
| 84 | + $this->server->emit('afterBind', [$destination]); |
|
| 85 | 85 | |
| 86 | - $response = $this->server->httpResponse; |
|
| 87 | - $response->setHeader('Content-Length', '0'); |
|
| 88 | - $response->setStatus(204); |
|
| 86 | + $response = $this->server->httpResponse; |
|
| 87 | + $response->setHeader('Content-Length', '0'); |
|
| 88 | + $response->setStatus(204); |
|
| 89 | 89 | |
| 90 | - return false; |
|
| 91 | - } |
|
| 90 | + return false; |
|
| 91 | + } |
|
| 92 | 92 | |
| 93 | - /** |
|
| 94 | - * @throws BadRequest |
|
| 95 | - */ |
|
| 96 | - private function verifySize() { |
|
| 97 | - $expectedSize = $this->server->httpRequest->getHeader('OC-Total-Length'); |
|
| 98 | - if ($expectedSize === null) { |
|
| 99 | - return; |
|
| 100 | - } |
|
| 101 | - $actualSize = $this->sourceNode->getSize(); |
|
| 102 | - if ((int)$expectedSize !== $actualSize) { |
|
| 103 | - throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize bytes"); |
|
| 104 | - } |
|
| 105 | - } |
|
| 93 | + /** |
|
| 94 | + * @throws BadRequest |
|
| 95 | + */ |
|
| 96 | + private function verifySize() { |
|
| 97 | + $expectedSize = $this->server->httpRequest->getHeader('OC-Total-Length'); |
|
| 98 | + if ($expectedSize === null) { |
|
| 99 | + return; |
|
| 100 | + } |
|
| 101 | + $actualSize = $this->sourceNode->getSize(); |
|
| 102 | + if ((int)$expectedSize !== $actualSize) { |
|
| 103 | + throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize bytes"); |
|
| 104 | + } |
|
| 105 | + } |
|
| 106 | 106 | } |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | return; |
| 100 | 100 | } |
| 101 | 101 | $actualSize = $this->sourceNode->getSize(); |
| 102 | - if ((int)$expectedSize !== $actualSize) { |
|
| 102 | + if ((int) $expectedSize !== $actualSize) { |
|
| 103 | 103 | throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize bytes"); |
| 104 | 104 | } |
| 105 | 105 | } |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | require '../../../../3rdparty/autoload.php'; |
| 24 | 24 | |
| 25 | 25 | if ($argc !== 6) { |
| 26 | - echo "Invalid number of arguments" . PHP_EOL; |
|
| 27 | - exit; |
|
| 26 | + echo "Invalid number of arguments" . PHP_EOL; |
|
| 27 | + exit; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
@@ -33,15 +33,15 @@ discard block |
||
| 33 | 33 | * @return mixed |
| 34 | 34 | */ |
| 35 | 35 | function request($client, $method, $uploadUrl, $data = null, $headers = []) { |
| 36 | - echo "$method $uploadUrl ... "; |
|
| 37 | - $t0 = microtime(true); |
|
| 38 | - $result = $client->request($method, $uploadUrl, $data, $headers); |
|
| 39 | - $t1 = microtime(true); |
|
| 40 | - echo $result['statusCode'] . " - " . ($t1 - $t0) . ' seconds' . PHP_EOL; |
|
| 41 | - if (!in_array($result['statusCode'], [200, 201])) { |
|
| 42 | - echo $result['body'] . PHP_EOL; |
|
| 43 | - } |
|
| 44 | - return $result; |
|
| 36 | + echo "$method $uploadUrl ... "; |
|
| 37 | + $t0 = microtime(true); |
|
| 38 | + $result = $client->request($method, $uploadUrl, $data, $headers); |
|
| 39 | + $t1 = microtime(true); |
|
| 40 | + echo $result['statusCode'] . " - " . ($t1 - $t0) . ' seconds' . PHP_EOL; |
|
| 41 | + if (!in_array($result['statusCode'], [200, 201])) { |
|
| 42 | + echo $result['body'] . PHP_EOL; |
|
| 43 | + } |
|
| 44 | + return $result; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | $baseUri = $argv[1]; |
@@ -51,9 +51,9 @@ discard block |
||
| 51 | 51 | $chunkSize = $argv[5] * 1024 * 1024; |
| 52 | 52 | |
| 53 | 53 | $client = new \Sabre\DAV\Client([ |
| 54 | - 'baseUri' => $baseUri, |
|
| 55 | - 'userName' => $userName, |
|
| 56 | - 'password' => $password |
|
| 54 | + 'baseUri' => $baseUri, |
|
| 55 | + 'userName' => $userName, |
|
| 56 | + 'password' => $password |
|
| 57 | 57 | ]); |
| 58 | 58 | |
| 59 | 59 | $transfer = uniqid('transfer', true); |
@@ -66,14 +66,14 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $index = 0; |
| 68 | 68 | while(!feof($stream)) { |
| 69 | - request($client, 'PUT', "$uploadUrl/$index", fread($stream, $chunkSize)); |
|
| 70 | - $index++; |
|
| 69 | + request($client, 'PUT', "$uploadUrl/$index", fread($stream, $chunkSize)); |
|
| 70 | + $index++; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $destination = pathinfo($file, PATHINFO_BASENAME); |
| 74 | 74 | //echo "Moving $uploadUrl/.file to it's final destination $baseUri/files/$userName/$destination" . PHP_EOL; |
| 75 | 75 | request($client, 'MOVE', "$uploadUrl/.file", null, [ |
| 76 | - 'Destination' => "$baseUri/files/$userName/$destination", |
|
| 77 | - 'OC-Total-Length' => filesize($file), |
|
| 78 | - 'X-OC-MTime' => filemtime($file) |
|
| 76 | + 'Destination' => "$baseUri/files/$userName/$destination", |
|
| 77 | + 'OC-Total-Length' => filesize($file), |
|
| 78 | + 'X-OC-MTime' => filemtime($file) |
|
| 79 | 79 | ]); |
@@ -65,540 +65,540 @@ |
||
| 65 | 65 | |
| 66 | 66 | class File extends Node implements IFile { |
| 67 | 67 | |
| 68 | - protected $request; |
|
| 69 | - |
|
| 70 | - /** |
|
| 71 | - * Sets up the node, expects a full path name |
|
| 72 | - * |
|
| 73 | - * @param \OC\Files\View $view |
|
| 74 | - * @param \OCP\Files\FileInfo $info |
|
| 75 | - * @param \OCP\Share\IManager $shareManager |
|
| 76 | - * @param \OC\AppFramework\Http\Request $request |
|
| 77 | - */ |
|
| 78 | - public function __construct(View $view, FileInfo $info, IManager $shareManager = null, Request $request = null) { |
|
| 79 | - parent::__construct($view, $info, $shareManager); |
|
| 80 | - |
|
| 81 | - if (isset($request)) { |
|
| 82 | - $this->request = $request; |
|
| 83 | - } else { |
|
| 84 | - $this->request = \OC::$server->getRequest(); |
|
| 85 | - } |
|
| 86 | - } |
|
| 87 | - |
|
| 88 | - /** |
|
| 89 | - * Updates the data |
|
| 90 | - * |
|
| 91 | - * The data argument is a readable stream resource. |
|
| 92 | - * |
|
| 93 | - * After a successful put operation, you may choose to return an ETag. The |
|
| 94 | - * etag must always be surrounded by double-quotes. These quotes must |
|
| 95 | - * appear in the actual string you're returning. |
|
| 96 | - * |
|
| 97 | - * Clients may use the ETag from a PUT request to later on make sure that |
|
| 98 | - * when they update the file, the contents haven't changed in the mean |
|
| 99 | - * time. |
|
| 100 | - * |
|
| 101 | - * If you don't plan to store the file byte-by-byte, and you return a |
|
| 102 | - * different object on a subsequent GET you are strongly recommended to not |
|
| 103 | - * return an ETag, and just return null. |
|
| 104 | - * |
|
| 105 | - * @param resource $data |
|
| 106 | - * |
|
| 107 | - * @throws Forbidden |
|
| 108 | - * @throws UnsupportedMediaType |
|
| 109 | - * @throws BadRequest |
|
| 110 | - * @throws Exception |
|
| 111 | - * @throws EntityTooLarge |
|
| 112 | - * @throws ServiceUnavailable |
|
| 113 | - * @throws FileLocked |
|
| 114 | - * @return string|null |
|
| 115 | - */ |
|
| 116 | - public function put($data) { |
|
| 117 | - try { |
|
| 118 | - $exists = $this->fileView->file_exists($this->path); |
|
| 119 | - if ($this->info && $exists && !$this->info->isUpdateable()) { |
|
| 120 | - throw new Forbidden(); |
|
| 121 | - } |
|
| 122 | - } catch (StorageNotAvailableException $e) { |
|
| 123 | - throw new ServiceUnavailable("File is not updatable: " . $e->getMessage()); |
|
| 124 | - } |
|
| 125 | - |
|
| 126 | - // verify path of the target |
|
| 127 | - $this->verifyPath(); |
|
| 128 | - |
|
| 129 | - // chunked handling |
|
| 130 | - if (isset($_SERVER['HTTP_OC_CHUNKED'])) { |
|
| 131 | - try { |
|
| 132 | - return $this->createFileChunked($data); |
|
| 133 | - } catch (\Exception $e) { |
|
| 134 | - $this->convertToSabreException($e); |
|
| 135 | - } |
|
| 136 | - } |
|
| 137 | - |
|
| 138 | - list($partStorage) = $this->fileView->resolvePath($this->path); |
|
| 139 | - $needsPartFile = $this->needsPartFile($partStorage) && (strlen($this->path) > 1); |
|
| 140 | - |
|
| 141 | - if ($needsPartFile) { |
|
| 142 | - // mark file as partial while uploading (ignored by the scanner) |
|
| 143 | - $partFilePath = $this->getPartFileBasePath($this->path) . '.ocTransferId' . rand() . '.part'; |
|
| 144 | - } else { |
|
| 145 | - // upload file directly as the final path |
|
| 146 | - $partFilePath = $this->path; |
|
| 147 | - } |
|
| 148 | - |
|
| 149 | - // the part file and target file might be on a different storage in case of a single file storage (e.g. single file share) |
|
| 150 | - /** @var \OC\Files\Storage\Storage $partStorage */ |
|
| 151 | - list($partStorage, $internalPartPath) = $this->fileView->resolvePath($partFilePath); |
|
| 152 | - /** @var \OC\Files\Storage\Storage $storage */ |
|
| 153 | - list($storage, $internalPath) = $this->fileView->resolvePath($this->path); |
|
| 154 | - try { |
|
| 155 | - $target = $partStorage->fopen($internalPartPath, 'wb'); |
|
| 156 | - if ($target === false) { |
|
| 157 | - \OCP\Util::writeLog('webdav', '\OC\Files\Filesystem::fopen() failed', \OCP\Util::ERROR); |
|
| 158 | - // because we have no clue about the cause we can only throw back a 500/Internal Server Error |
|
| 159 | - throw new Exception('Could not write file contents'); |
|
| 160 | - } |
|
| 161 | - list($count, $result) = \OC_Helper::streamCopy($data, $target); |
|
| 162 | - fclose($target); |
|
| 163 | - |
|
| 164 | - if ($result === false) { |
|
| 165 | - $expected = -1; |
|
| 166 | - if (isset($_SERVER['CONTENT_LENGTH'])) { |
|
| 167 | - $expected = $_SERVER['CONTENT_LENGTH']; |
|
| 168 | - } |
|
| 169 | - throw new Exception('Error while copying file to target location (copied bytes: ' . $count . ', expected filesize: ' . $expected . ' )'); |
|
| 170 | - } |
|
| 171 | - |
|
| 172 | - // if content length is sent by client: |
|
| 173 | - // double check if the file was fully received |
|
| 174 | - // compare expected and actual size |
|
| 175 | - if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { |
|
| 176 | - $expected = (int) $_SERVER['CONTENT_LENGTH']; |
|
| 177 | - if ($count !== $expected) { |
|
| 178 | - throw new BadRequest('expected filesize ' . $expected . ' got ' . $count); |
|
| 179 | - } |
|
| 180 | - } |
|
| 181 | - |
|
| 182 | - } catch (\Exception $e) { |
|
| 183 | - if ($needsPartFile) { |
|
| 184 | - $partStorage->unlink($internalPartPath); |
|
| 185 | - } |
|
| 186 | - $this->convertToSabreException($e); |
|
| 187 | - } |
|
| 188 | - |
|
| 189 | - try { |
|
| 190 | - $view = \OC\Files\Filesystem::getView(); |
|
| 191 | - if ($view) { |
|
| 192 | - $run = $this->emitPreHooks($exists); |
|
| 193 | - } else { |
|
| 194 | - $run = true; |
|
| 195 | - } |
|
| 196 | - |
|
| 197 | - try { |
|
| 198 | - $this->changeLock(ILockingProvider::LOCK_EXCLUSIVE); |
|
| 199 | - } catch (LockedException $e) { |
|
| 200 | - if ($needsPartFile) { |
|
| 201 | - $partStorage->unlink($internalPartPath); |
|
| 202 | - } |
|
| 203 | - throw new FileLocked($e->getMessage(), $e->getCode(), $e); |
|
| 204 | - } |
|
| 205 | - |
|
| 206 | - if ($needsPartFile) { |
|
| 207 | - // rename to correct path |
|
| 208 | - try { |
|
| 209 | - if ($run) { |
|
| 210 | - $renameOkay = $storage->moveFromStorage($partStorage, $internalPartPath, $internalPath); |
|
| 211 | - $fileExists = $storage->file_exists($internalPath); |
|
| 212 | - } |
|
| 213 | - if (!$run || $renameOkay === false || $fileExists === false) { |
|
| 214 | - \OCP\Util::writeLog('webdav', 'renaming part file to final file failed ($run: ' . ( $run ? 'true' : 'false' ) . ', $renameOkay: ' . ( $renameOkay ? 'true' : 'false' ) . ', $fileExists: ' . ( $fileExists ? 'true' : 'false' ) . ')', \OCP\Util::ERROR); |
|
| 215 | - throw new Exception('Could not rename part file to final file'); |
|
| 216 | - } |
|
| 217 | - } catch (ForbiddenException $ex) { |
|
| 218 | - throw new DAVForbiddenException($ex->getMessage(), $ex->getRetry()); |
|
| 219 | - } catch (\Exception $e) { |
|
| 220 | - $partStorage->unlink($internalPartPath); |
|
| 221 | - $this->convertToSabreException($e); |
|
| 222 | - } |
|
| 223 | - } |
|
| 224 | - |
|
| 225 | - // since we skipped the view we need to scan and emit the hooks ourselves |
|
| 226 | - $storage->getUpdater()->update($internalPath); |
|
| 227 | - |
|
| 228 | - try { |
|
| 229 | - $this->changeLock(ILockingProvider::LOCK_SHARED); |
|
| 230 | - } catch (LockedException $e) { |
|
| 231 | - throw new FileLocked($e->getMessage(), $e->getCode(), $e); |
|
| 232 | - } |
|
| 233 | - |
|
| 234 | - // allow sync clients to send the mtime along in a header |
|
| 235 | - if (isset($this->request->server['HTTP_X_OC_MTIME'])) { |
|
| 236 | - $mtime = $this->sanitizeMtime($this->request->server['HTTP_X_OC_MTIME']); |
|
| 237 | - if ($this->fileView->touch($this->path, $mtime)) { |
|
| 238 | - $this->header('X-OC-MTime: accepted'); |
|
| 239 | - } |
|
| 240 | - } |
|
| 68 | + protected $request; |
|
| 69 | + |
|
| 70 | + /** |
|
| 71 | + * Sets up the node, expects a full path name |
|
| 72 | + * |
|
| 73 | + * @param \OC\Files\View $view |
|
| 74 | + * @param \OCP\Files\FileInfo $info |
|
| 75 | + * @param \OCP\Share\IManager $shareManager |
|
| 76 | + * @param \OC\AppFramework\Http\Request $request |
|
| 77 | + */ |
|
| 78 | + public function __construct(View $view, FileInfo $info, IManager $shareManager = null, Request $request = null) { |
|
| 79 | + parent::__construct($view, $info, $shareManager); |
|
| 80 | + |
|
| 81 | + if (isset($request)) { |
|
| 82 | + $this->request = $request; |
|
| 83 | + } else { |
|
| 84 | + $this->request = \OC::$server->getRequest(); |
|
| 85 | + } |
|
| 86 | + } |
|
| 87 | + |
|
| 88 | + /** |
|
| 89 | + * Updates the data |
|
| 90 | + * |
|
| 91 | + * The data argument is a readable stream resource. |
|
| 92 | + * |
|
| 93 | + * After a successful put operation, you may choose to return an ETag. The |
|
| 94 | + * etag must always be surrounded by double-quotes. These quotes must |
|
| 95 | + * appear in the actual string you're returning. |
|
| 96 | + * |
|
| 97 | + * Clients may use the ETag from a PUT request to later on make sure that |
|
| 98 | + * when they update the file, the contents haven't changed in the mean |
|
| 99 | + * time. |
|
| 100 | + * |
|
| 101 | + * If you don't plan to store the file byte-by-byte, and you return a |
|
| 102 | + * different object on a subsequent GET you are strongly recommended to not |
|
| 103 | + * return an ETag, and just return null. |
|
| 104 | + * |
|
| 105 | + * @param resource $data |
|
| 106 | + * |
|
| 107 | + * @throws Forbidden |
|
| 108 | + * @throws UnsupportedMediaType |
|
| 109 | + * @throws BadRequest |
|
| 110 | + * @throws Exception |
|
| 111 | + * @throws EntityTooLarge |
|
| 112 | + * @throws ServiceUnavailable |
|
| 113 | + * @throws FileLocked |
|
| 114 | + * @return string|null |
|
| 115 | + */ |
|
| 116 | + public function put($data) { |
|
| 117 | + try { |
|
| 118 | + $exists = $this->fileView->file_exists($this->path); |
|
| 119 | + if ($this->info && $exists && !$this->info->isUpdateable()) { |
|
| 120 | + throw new Forbidden(); |
|
| 121 | + } |
|
| 122 | + } catch (StorageNotAvailableException $e) { |
|
| 123 | + throw new ServiceUnavailable("File is not updatable: " . $e->getMessage()); |
|
| 124 | + } |
|
| 125 | + |
|
| 126 | + // verify path of the target |
|
| 127 | + $this->verifyPath(); |
|
| 128 | + |
|
| 129 | + // chunked handling |
|
| 130 | + if (isset($_SERVER['HTTP_OC_CHUNKED'])) { |
|
| 131 | + try { |
|
| 132 | + return $this->createFileChunked($data); |
|
| 133 | + } catch (\Exception $e) { |
|
| 134 | + $this->convertToSabreException($e); |
|
| 135 | + } |
|
| 136 | + } |
|
| 137 | + |
|
| 138 | + list($partStorage) = $this->fileView->resolvePath($this->path); |
|
| 139 | + $needsPartFile = $this->needsPartFile($partStorage) && (strlen($this->path) > 1); |
|
| 140 | + |
|
| 141 | + if ($needsPartFile) { |
|
| 142 | + // mark file as partial while uploading (ignored by the scanner) |
|
| 143 | + $partFilePath = $this->getPartFileBasePath($this->path) . '.ocTransferId' . rand() . '.part'; |
|
| 144 | + } else { |
|
| 145 | + // upload file directly as the final path |
|
| 146 | + $partFilePath = $this->path; |
|
| 147 | + } |
|
| 148 | + |
|
| 149 | + // the part file and target file might be on a different storage in case of a single file storage (e.g. single file share) |
|
| 150 | + /** @var \OC\Files\Storage\Storage $partStorage */ |
|
| 151 | + list($partStorage, $internalPartPath) = $this->fileView->resolvePath($partFilePath); |
|
| 152 | + /** @var \OC\Files\Storage\Storage $storage */ |
|
| 153 | + list($storage, $internalPath) = $this->fileView->resolvePath($this->path); |
|
| 154 | + try { |
|
| 155 | + $target = $partStorage->fopen($internalPartPath, 'wb'); |
|
| 156 | + if ($target === false) { |
|
| 157 | + \OCP\Util::writeLog('webdav', '\OC\Files\Filesystem::fopen() failed', \OCP\Util::ERROR); |
|
| 158 | + // because we have no clue about the cause we can only throw back a 500/Internal Server Error |
|
| 159 | + throw new Exception('Could not write file contents'); |
|
| 160 | + } |
|
| 161 | + list($count, $result) = \OC_Helper::streamCopy($data, $target); |
|
| 162 | + fclose($target); |
|
| 163 | + |
|
| 164 | + if ($result === false) { |
|
| 165 | + $expected = -1; |
|
| 166 | + if (isset($_SERVER['CONTENT_LENGTH'])) { |
|
| 167 | + $expected = $_SERVER['CONTENT_LENGTH']; |
|
| 168 | + } |
|
| 169 | + throw new Exception('Error while copying file to target location (copied bytes: ' . $count . ', expected filesize: ' . $expected . ' )'); |
|
| 170 | + } |
|
| 171 | + |
|
| 172 | + // if content length is sent by client: |
|
| 173 | + // double check if the file was fully received |
|
| 174 | + // compare expected and actual size |
|
| 175 | + if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { |
|
| 176 | + $expected = (int) $_SERVER['CONTENT_LENGTH']; |
|
| 177 | + if ($count !== $expected) { |
|
| 178 | + throw new BadRequest('expected filesize ' . $expected . ' got ' . $count); |
|
| 179 | + } |
|
| 180 | + } |
|
| 181 | + |
|
| 182 | + } catch (\Exception $e) { |
|
| 183 | + if ($needsPartFile) { |
|
| 184 | + $partStorage->unlink($internalPartPath); |
|
| 185 | + } |
|
| 186 | + $this->convertToSabreException($e); |
|
| 187 | + } |
|
| 188 | + |
|
| 189 | + try { |
|
| 190 | + $view = \OC\Files\Filesystem::getView(); |
|
| 191 | + if ($view) { |
|
| 192 | + $run = $this->emitPreHooks($exists); |
|
| 193 | + } else { |
|
| 194 | + $run = true; |
|
| 195 | + } |
|
| 196 | + |
|
| 197 | + try { |
|
| 198 | + $this->changeLock(ILockingProvider::LOCK_EXCLUSIVE); |
|
| 199 | + } catch (LockedException $e) { |
|
| 200 | + if ($needsPartFile) { |
|
| 201 | + $partStorage->unlink($internalPartPath); |
|
| 202 | + } |
|
| 203 | + throw new FileLocked($e->getMessage(), $e->getCode(), $e); |
|
| 204 | + } |
|
| 205 | + |
|
| 206 | + if ($needsPartFile) { |
|
| 207 | + // rename to correct path |
|
| 208 | + try { |
|
| 209 | + if ($run) { |
|
| 210 | + $renameOkay = $storage->moveFromStorage($partStorage, $internalPartPath, $internalPath); |
|
| 211 | + $fileExists = $storage->file_exists($internalPath); |
|
| 212 | + } |
|
| 213 | + if (!$run || $renameOkay === false || $fileExists === false) { |
|
| 214 | + \OCP\Util::writeLog('webdav', 'renaming part file to final file failed ($run: ' . ( $run ? 'true' : 'false' ) . ', $renameOkay: ' . ( $renameOkay ? 'true' : 'false' ) . ', $fileExists: ' . ( $fileExists ? 'true' : 'false' ) . ')', \OCP\Util::ERROR); |
|
| 215 | + throw new Exception('Could not rename part file to final file'); |
|
| 216 | + } |
|
| 217 | + } catch (ForbiddenException $ex) { |
|
| 218 | + throw new DAVForbiddenException($ex->getMessage(), $ex->getRetry()); |
|
| 219 | + } catch (\Exception $e) { |
|
| 220 | + $partStorage->unlink($internalPartPath); |
|
| 221 | + $this->convertToSabreException($e); |
|
| 222 | + } |
|
| 223 | + } |
|
| 224 | + |
|
| 225 | + // since we skipped the view we need to scan and emit the hooks ourselves |
|
| 226 | + $storage->getUpdater()->update($internalPath); |
|
| 227 | + |
|
| 228 | + try { |
|
| 229 | + $this->changeLock(ILockingProvider::LOCK_SHARED); |
|
| 230 | + } catch (LockedException $e) { |
|
| 231 | + throw new FileLocked($e->getMessage(), $e->getCode(), $e); |
|
| 232 | + } |
|
| 233 | + |
|
| 234 | + // allow sync clients to send the mtime along in a header |
|
| 235 | + if (isset($this->request->server['HTTP_X_OC_MTIME'])) { |
|
| 236 | + $mtime = $this->sanitizeMtime($this->request->server['HTTP_X_OC_MTIME']); |
|
| 237 | + if ($this->fileView->touch($this->path, $mtime)) { |
|
| 238 | + $this->header('X-OC-MTime: accepted'); |
|
| 239 | + } |
|
| 240 | + } |
|
| 241 | 241 | |
| 242 | - if ($view) { |
|
| 243 | - $this->emitPostHooks($exists); |
|
| 244 | - } |
|
| 245 | - |
|
| 246 | - $this->refreshInfo(); |
|
| 247 | - |
|
| 248 | - if (isset($this->request->server['HTTP_OC_CHECKSUM'])) { |
|
| 249 | - $checksum = trim($this->request->server['HTTP_OC_CHECKSUM']); |
|
| 250 | - $this->fileView->putFileInfo($this->path, ['checksum' => $checksum]); |
|
| 251 | - $this->refreshInfo(); |
|
| 252 | - } else if ($this->getChecksum() !== null && $this->getChecksum() !== '') { |
|
| 253 | - $this->fileView->putFileInfo($this->path, ['checksum' => '']); |
|
| 254 | - $this->refreshInfo(); |
|
| 255 | - } |
|
| 256 | - |
|
| 257 | - } catch (StorageNotAvailableException $e) { |
|
| 258 | - throw new ServiceUnavailable("Failed to check file size: " . $e->getMessage()); |
|
| 259 | - } |
|
| 260 | - |
|
| 261 | - return '"' . $this->info->getEtag() . '"'; |
|
| 262 | - } |
|
| 263 | - |
|
| 264 | - private function getPartFileBasePath($path) { |
|
| 265 | - $partFileInStorage = \OC::$server->getConfig()->getSystemValue('part_file_in_storage', true); |
|
| 266 | - if ($partFileInStorage) { |
|
| 267 | - return $path; |
|
| 268 | - } else { |
|
| 269 | - return md5($path); // will place it in the root of the view with a unique name |
|
| 270 | - } |
|
| 271 | - } |
|
| 272 | - |
|
| 273 | - /** |
|
| 274 | - * @param string $path |
|
| 275 | - */ |
|
| 276 | - private function emitPreHooks($exists, $path = null) { |
|
| 277 | - if (is_null($path)) { |
|
| 278 | - $path = $this->path; |
|
| 279 | - } |
|
| 280 | - $hookPath = Filesystem::getView()->getRelativePath($this->fileView->getAbsolutePath($path)); |
|
| 281 | - $run = true; |
|
| 282 | - |
|
| 283 | - if (!$exists) { |
|
| 284 | - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_create, array( |
|
| 285 | - \OC\Files\Filesystem::signal_param_path => $hookPath, |
|
| 286 | - \OC\Files\Filesystem::signal_param_run => &$run, |
|
| 287 | - )); |
|
| 288 | - } else { |
|
| 289 | - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_update, array( |
|
| 290 | - \OC\Files\Filesystem::signal_param_path => $hookPath, |
|
| 291 | - \OC\Files\Filesystem::signal_param_run => &$run, |
|
| 292 | - )); |
|
| 293 | - } |
|
| 294 | - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_write, array( |
|
| 295 | - \OC\Files\Filesystem::signal_param_path => $hookPath, |
|
| 296 | - \OC\Files\Filesystem::signal_param_run => &$run, |
|
| 297 | - )); |
|
| 298 | - return $run; |
|
| 299 | - } |
|
| 300 | - |
|
| 301 | - /** |
|
| 302 | - * @param string $path |
|
| 303 | - */ |
|
| 304 | - private function emitPostHooks($exists, $path = null) { |
|
| 305 | - if (is_null($path)) { |
|
| 306 | - $path = $this->path; |
|
| 307 | - } |
|
| 308 | - $hookPath = Filesystem::getView()->getRelativePath($this->fileView->getAbsolutePath($path)); |
|
| 309 | - if (!$exists) { |
|
| 310 | - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_create, array( |
|
| 311 | - \OC\Files\Filesystem::signal_param_path => $hookPath |
|
| 312 | - )); |
|
| 313 | - } else { |
|
| 314 | - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_update, array( |
|
| 315 | - \OC\Files\Filesystem::signal_param_path => $hookPath |
|
| 316 | - )); |
|
| 317 | - } |
|
| 318 | - \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_write, array( |
|
| 319 | - \OC\Files\Filesystem::signal_param_path => $hookPath |
|
| 320 | - )); |
|
| 321 | - } |
|
| 322 | - |
|
| 323 | - /** |
|
| 324 | - * Returns the data |
|
| 325 | - * |
|
| 326 | - * @return resource |
|
| 327 | - * @throws Forbidden |
|
| 328 | - * @throws ServiceUnavailable |
|
| 329 | - */ |
|
| 330 | - public function get() { |
|
| 331 | - //throw exception if encryption is disabled but files are still encrypted |
|
| 332 | - try { |
|
| 333 | - if (!$this->info->isReadable()) { |
|
| 334 | - // do a if the file did not exist |
|
| 335 | - throw new NotFound(); |
|
| 336 | - } |
|
| 337 | - $res = $this->fileView->fopen(ltrim($this->path, '/'), 'rb'); |
|
| 338 | - if ($res === false) { |
|
| 339 | - throw new ServiceUnavailable("Could not open file"); |
|
| 340 | - } |
|
| 341 | - return $res; |
|
| 342 | - } catch (GenericEncryptionException $e) { |
|
| 343 | - // returning 503 will allow retry of the operation at a later point in time |
|
| 344 | - throw new ServiceUnavailable("Encryption not ready: " . $e->getMessage()); |
|
| 345 | - } catch (StorageNotAvailableException $e) { |
|
| 346 | - throw new ServiceUnavailable("Failed to open file: " . $e->getMessage()); |
|
| 347 | - } catch (ForbiddenException $ex) { |
|
| 348 | - throw new DAVForbiddenException($ex->getMessage(), $ex->getRetry()); |
|
| 349 | - } catch (LockedException $e) { |
|
| 350 | - throw new FileLocked($e->getMessage(), $e->getCode(), $e); |
|
| 351 | - } |
|
| 352 | - } |
|
| 353 | - |
|
| 354 | - /** |
|
| 355 | - * Delete the current file |
|
| 356 | - * |
|
| 357 | - * @throws Forbidden |
|
| 358 | - * @throws ServiceUnavailable |
|
| 359 | - */ |
|
| 360 | - public function delete() { |
|
| 361 | - if (!$this->info->isDeletable()) { |
|
| 362 | - throw new Forbidden(); |
|
| 363 | - } |
|
| 364 | - |
|
| 365 | - try { |
|
| 366 | - if (!$this->fileView->unlink($this->path)) { |
|
| 367 | - // assume it wasn't possible to delete due to permissions |
|
| 368 | - throw new Forbidden(); |
|
| 369 | - } |
|
| 370 | - } catch (StorageNotAvailableException $e) { |
|
| 371 | - throw new ServiceUnavailable("Failed to unlink: " . $e->getMessage()); |
|
| 372 | - } catch (ForbiddenException $ex) { |
|
| 373 | - throw new DAVForbiddenException($ex->getMessage(), $ex->getRetry()); |
|
| 374 | - } catch (LockedException $e) { |
|
| 375 | - throw new FileLocked($e->getMessage(), $e->getCode(), $e); |
|
| 376 | - } |
|
| 377 | - } |
|
| 378 | - |
|
| 379 | - /** |
|
| 380 | - * Returns the mime-type for a file |
|
| 381 | - * |
|
| 382 | - * If null is returned, we'll assume application/octet-stream |
|
| 383 | - * |
|
| 384 | - * @return string |
|
| 385 | - */ |
|
| 386 | - public function getContentType() { |
|
| 387 | - $mimeType = $this->info->getMimetype(); |
|
| 388 | - |
|
| 389 | - // PROPFIND needs to return the correct mime type, for consistency with the web UI |
|
| 390 | - if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PROPFIND') { |
|
| 391 | - return $mimeType; |
|
| 392 | - } |
|
| 393 | - return \OC::$server->getMimeTypeDetector()->getSecureMimeType($mimeType); |
|
| 394 | - } |
|
| 395 | - |
|
| 396 | - /** |
|
| 397 | - * @return array|false |
|
| 398 | - */ |
|
| 399 | - public function getDirectDownload() { |
|
| 400 | - if (\OCP\App::isEnabled('encryption')) { |
|
| 401 | - return []; |
|
| 402 | - } |
|
| 403 | - /** @var \OCP\Files\Storage $storage */ |
|
| 404 | - list($storage, $internalPath) = $this->fileView->resolvePath($this->path); |
|
| 405 | - if (is_null($storage)) { |
|
| 406 | - return []; |
|
| 407 | - } |
|
| 408 | - |
|
| 409 | - return $storage->getDirectDownload($internalPath); |
|
| 410 | - } |
|
| 411 | - |
|
| 412 | - /** |
|
| 413 | - * @param resource $data |
|
| 414 | - * @return null|string |
|
| 415 | - * @throws Exception |
|
| 416 | - * @throws BadRequest |
|
| 417 | - * @throws NotImplemented |
|
| 418 | - * @throws ServiceUnavailable |
|
| 419 | - */ |
|
| 420 | - private function createFileChunked($data) { |
|
| 421 | - list($path, $name) = \Sabre\Uri\split($this->path); |
|
| 422 | - |
|
| 423 | - $info = \OC_FileChunking::decodeName($name); |
|
| 424 | - if (empty($info)) { |
|
| 425 | - throw new NotImplemented('Invalid chunk name'); |
|
| 426 | - } |
|
| 427 | - |
|
| 428 | - $chunk_handler = new \OC_FileChunking($info); |
|
| 429 | - $bytesWritten = $chunk_handler->store($info['index'], $data); |
|
| 430 | - |
|
| 431 | - //detect aborted upload |
|
| 432 | - if (isset ($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { |
|
| 433 | - if (isset($_SERVER['CONTENT_LENGTH'])) { |
|
| 434 | - $expected = (int) $_SERVER['CONTENT_LENGTH']; |
|
| 435 | - if ($bytesWritten !== $expected) { |
|
| 436 | - $chunk_handler->remove($info['index']); |
|
| 437 | - throw new BadRequest( |
|
| 438 | - 'expected filesize ' . $expected . ' got ' . $bytesWritten); |
|
| 439 | - } |
|
| 440 | - } |
|
| 441 | - } |
|
| 442 | - |
|
| 443 | - if ($chunk_handler->isComplete()) { |
|
| 444 | - list($storage,) = $this->fileView->resolvePath($path); |
|
| 445 | - $needsPartFile = $this->needsPartFile($storage); |
|
| 446 | - $partFile = null; |
|
| 447 | - |
|
| 448 | - $targetPath = $path . '/' . $info['name']; |
|
| 449 | - /** @var \OC\Files\Storage\Storage $targetStorage */ |
|
| 450 | - list($targetStorage, $targetInternalPath) = $this->fileView->resolvePath($targetPath); |
|
| 451 | - |
|
| 452 | - $exists = $this->fileView->file_exists($targetPath); |
|
| 453 | - |
|
| 454 | - try { |
|
| 455 | - $this->fileView->lockFile($targetPath, ILockingProvider::LOCK_SHARED); |
|
| 456 | - |
|
| 457 | - $this->emitPreHooks($exists, $targetPath); |
|
| 458 | - $this->fileView->changeLock($targetPath, ILockingProvider::LOCK_EXCLUSIVE); |
|
| 459 | - /** @var \OC\Files\Storage\Storage $targetStorage */ |
|
| 460 | - list($targetStorage, $targetInternalPath) = $this->fileView->resolvePath($targetPath); |
|
| 461 | - |
|
| 462 | - if ($needsPartFile) { |
|
| 463 | - // we first assembly the target file as a part file |
|
| 464 | - $partFile = $this->getPartFileBasePath($path . '/' . $info['name']) . '.ocTransferId' . $info['transferid'] . '.part'; |
|
| 465 | - /** @var \OC\Files\Storage\Storage $targetStorage */ |
|
| 466 | - list($partStorage, $partInternalPath) = $this->fileView->resolvePath($partFile); |
|
| 467 | - |
|
| 468 | - |
|
| 469 | - $chunk_handler->file_assemble($partStorage, $partInternalPath); |
|
| 470 | - |
|
| 471 | - // here is the final atomic rename |
|
| 472 | - $renameOkay = $targetStorage->moveFromStorage($partStorage, $partInternalPath, $targetInternalPath); |
|
| 473 | - $fileExists = $targetStorage->file_exists($targetInternalPath); |
|
| 474 | - if ($renameOkay === false || $fileExists === false) { |
|
| 475 | - \OCP\Util::writeLog('webdav', '\OC\Files\Filesystem::rename() failed', \OCP\Util::ERROR); |
|
| 476 | - // only delete if an error occurred and the target file was already created |
|
| 477 | - if ($fileExists) { |
|
| 478 | - // set to null to avoid double-deletion when handling exception |
|
| 479 | - // stray part file |
|
| 480 | - $partFile = null; |
|
| 481 | - $targetStorage->unlink($targetInternalPath); |
|
| 482 | - } |
|
| 483 | - $this->fileView->changeLock($targetPath, ILockingProvider::LOCK_SHARED); |
|
| 484 | - throw new Exception('Could not rename part file assembled from chunks'); |
|
| 485 | - } |
|
| 486 | - } else { |
|
| 487 | - // assemble directly into the final file |
|
| 488 | - $chunk_handler->file_assemble($targetStorage, $targetInternalPath); |
|
| 489 | - } |
|
| 490 | - |
|
| 491 | - // allow sync clients to send the mtime along in a header |
|
| 492 | - if (isset($this->request->server['HTTP_X_OC_MTIME'])) { |
|
| 493 | - $mtime = $this->sanitizeMtime($this->request->server['HTTP_X_OC_MTIME']); |
|
| 494 | - if ($targetStorage->touch($targetInternalPath, $mtime)) { |
|
| 495 | - $this->header('X-OC-MTime: accepted'); |
|
| 496 | - } |
|
| 497 | - } |
|
| 498 | - |
|
| 499 | - // since we skipped the view we need to scan and emit the hooks ourselves |
|
| 500 | - $targetStorage->getUpdater()->update($targetInternalPath); |
|
| 501 | - |
|
| 502 | - $this->fileView->changeLock($targetPath, ILockingProvider::LOCK_SHARED); |
|
| 503 | - |
|
| 504 | - $this->emitPostHooks($exists, $targetPath); |
|
| 505 | - |
|
| 506 | - // FIXME: should call refreshInfo but can't because $this->path is not the of the final file |
|
| 507 | - $info = $this->fileView->getFileInfo($targetPath); |
|
| 508 | - |
|
| 509 | - if (isset($this->request->server['HTTP_OC_CHECKSUM'])) { |
|
| 510 | - $checksum = trim($this->request->server['HTTP_OC_CHECKSUM']); |
|
| 511 | - $this->fileView->putFileInfo($targetPath, ['checksum' => $checksum]); |
|
| 512 | - } else if ($info->getChecksum() !== null && $info->getChecksum() !== '') { |
|
| 513 | - $this->fileView->putFileInfo($this->path, ['checksum' => '']); |
|
| 514 | - } |
|
| 515 | - |
|
| 516 | - $this->fileView->unlockFile($targetPath, ILockingProvider::LOCK_SHARED); |
|
| 517 | - |
|
| 518 | - return $info->getEtag(); |
|
| 519 | - } catch (\Exception $e) { |
|
| 520 | - if ($partFile !== null) { |
|
| 521 | - $targetStorage->unlink($targetInternalPath); |
|
| 522 | - } |
|
| 523 | - $this->convertToSabreException($e); |
|
| 524 | - } |
|
| 525 | - } |
|
| 526 | - |
|
| 527 | - return null; |
|
| 528 | - } |
|
| 529 | - |
|
| 530 | - /** |
|
| 531 | - * Returns whether a part file is needed for the given storage |
|
| 532 | - * or whether the file can be assembled/uploaded directly on the |
|
| 533 | - * target storage. |
|
| 534 | - * |
|
| 535 | - * @param \OCP\Files\Storage $storage |
|
| 536 | - * @return bool true if the storage needs part file handling |
|
| 537 | - */ |
|
| 538 | - private function needsPartFile($storage) { |
|
| 539 | - // TODO: in the future use ChunkHandler provided by storage |
|
| 540 | - return !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') && |
|
| 541 | - !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud') && |
|
| 542 | - $storage->needsPartFile(); |
|
| 543 | - } |
|
| 544 | - |
|
| 545 | - /** |
|
| 546 | - * Convert the given exception to a SabreException instance |
|
| 547 | - * |
|
| 548 | - * @param \Exception $e |
|
| 549 | - * |
|
| 550 | - * @throws \Sabre\DAV\Exception |
|
| 551 | - */ |
|
| 552 | - private function convertToSabreException(\Exception $e) { |
|
| 553 | - if ($e instanceof \Sabre\DAV\Exception) { |
|
| 554 | - throw $e; |
|
| 555 | - } |
|
| 556 | - if ($e instanceof NotPermittedException) { |
|
| 557 | - // a more general case - due to whatever reason the content could not be written |
|
| 558 | - throw new Forbidden($e->getMessage(), 0, $e); |
|
| 559 | - } |
|
| 560 | - if ($e instanceof ForbiddenException) { |
|
| 561 | - // the path for the file was forbidden |
|
| 562 | - throw new DAVForbiddenException($e->getMessage(), $e->getRetry(), $e); |
|
| 563 | - } |
|
| 564 | - if ($e instanceof EntityTooLargeException) { |
|
| 565 | - // the file is too big to be stored |
|
| 566 | - throw new EntityTooLarge($e->getMessage(), 0, $e); |
|
| 567 | - } |
|
| 568 | - if ($e instanceof InvalidContentException) { |
|
| 569 | - // the file content is not permitted |
|
| 570 | - throw new UnsupportedMediaType($e->getMessage(), 0, $e); |
|
| 571 | - } |
|
| 572 | - if ($e instanceof InvalidPathException) { |
|
| 573 | - // the path for the file was not valid |
|
| 574 | - // TODO: find proper http status code for this case |
|
| 575 | - throw new Forbidden($e->getMessage(), 0, $e); |
|
| 576 | - } |
|
| 577 | - if ($e instanceof LockedException || $e instanceof LockNotAcquiredException) { |
|
| 578 | - // the file is currently being written to by another process |
|
| 579 | - throw new FileLocked($e->getMessage(), $e->getCode(), $e); |
|
| 580 | - } |
|
| 581 | - if ($e instanceof GenericEncryptionException) { |
|
| 582 | - // returning 503 will allow retry of the operation at a later point in time |
|
| 583 | - throw new ServiceUnavailable('Encryption not ready: ' . $e->getMessage(), 0, $e); |
|
| 584 | - } |
|
| 585 | - if ($e instanceof StorageNotAvailableException) { |
|
| 586 | - throw new ServiceUnavailable('Failed to write file contents: ' . $e->getMessage(), 0, $e); |
|
| 587 | - } |
|
| 588 | - |
|
| 589 | - throw new \Sabre\DAV\Exception($e->getMessage(), 0, $e); |
|
| 590 | - } |
|
| 591 | - |
|
| 592 | - /** |
|
| 593 | - * Get the checksum for this file |
|
| 594 | - * |
|
| 595 | - * @return string |
|
| 596 | - */ |
|
| 597 | - public function getChecksum() { |
|
| 598 | - return $this->info->getChecksum(); |
|
| 599 | - } |
|
| 600 | - |
|
| 601 | - protected function header($string) { |
|
| 602 | - \header($string); |
|
| 603 | - } |
|
| 242 | + if ($view) { |
|
| 243 | + $this->emitPostHooks($exists); |
|
| 244 | + } |
|
| 245 | + |
|
| 246 | + $this->refreshInfo(); |
|
| 247 | + |
|
| 248 | + if (isset($this->request->server['HTTP_OC_CHECKSUM'])) { |
|
| 249 | + $checksum = trim($this->request->server['HTTP_OC_CHECKSUM']); |
|
| 250 | + $this->fileView->putFileInfo($this->path, ['checksum' => $checksum]); |
|
| 251 | + $this->refreshInfo(); |
|
| 252 | + } else if ($this->getChecksum() !== null && $this->getChecksum() !== '') { |
|
| 253 | + $this->fileView->putFileInfo($this->path, ['checksum' => '']); |
|
| 254 | + $this->refreshInfo(); |
|
| 255 | + } |
|
| 256 | + |
|
| 257 | + } catch (StorageNotAvailableException $e) { |
|
| 258 | + throw new ServiceUnavailable("Failed to check file size: " . $e->getMessage()); |
|
| 259 | + } |
|
| 260 | + |
|
| 261 | + return '"' . $this->info->getEtag() . '"'; |
|
| 262 | + } |
|
| 263 | + |
|
| 264 | + private function getPartFileBasePath($path) { |
|
| 265 | + $partFileInStorage = \OC::$server->getConfig()->getSystemValue('part_file_in_storage', true); |
|
| 266 | + if ($partFileInStorage) { |
|
| 267 | + return $path; |
|
| 268 | + } else { |
|
| 269 | + return md5($path); // will place it in the root of the view with a unique name |
|
| 270 | + } |
|
| 271 | + } |
|
| 272 | + |
|
| 273 | + /** |
|
| 274 | + * @param string $path |
|
| 275 | + */ |
|
| 276 | + private function emitPreHooks($exists, $path = null) { |
|
| 277 | + if (is_null($path)) { |
|
| 278 | + $path = $this->path; |
|
| 279 | + } |
|
| 280 | + $hookPath = Filesystem::getView()->getRelativePath($this->fileView->getAbsolutePath($path)); |
|
| 281 | + $run = true; |
|
| 282 | + |
|
| 283 | + if (!$exists) { |
|
| 284 | + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_create, array( |
|
| 285 | + \OC\Files\Filesystem::signal_param_path => $hookPath, |
|
| 286 | + \OC\Files\Filesystem::signal_param_run => &$run, |
|
| 287 | + )); |
|
| 288 | + } else { |
|
| 289 | + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_update, array( |
|
| 290 | + \OC\Files\Filesystem::signal_param_path => $hookPath, |
|
| 291 | + \OC\Files\Filesystem::signal_param_run => &$run, |
|
| 292 | + )); |
|
| 293 | + } |
|
| 294 | + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_write, array( |
|
| 295 | + \OC\Files\Filesystem::signal_param_path => $hookPath, |
|
| 296 | + \OC\Files\Filesystem::signal_param_run => &$run, |
|
| 297 | + )); |
|
| 298 | + return $run; |
|
| 299 | + } |
|
| 300 | + |
|
| 301 | + /** |
|
| 302 | + * @param string $path |
|
| 303 | + */ |
|
| 304 | + private function emitPostHooks($exists, $path = null) { |
|
| 305 | + if (is_null($path)) { |
|
| 306 | + $path = $this->path; |
|
| 307 | + } |
|
| 308 | + $hookPath = Filesystem::getView()->getRelativePath($this->fileView->getAbsolutePath($path)); |
|
| 309 | + if (!$exists) { |
|
| 310 | + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_create, array( |
|
| 311 | + \OC\Files\Filesystem::signal_param_path => $hookPath |
|
| 312 | + )); |
|
| 313 | + } else { |
|
| 314 | + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_update, array( |
|
| 315 | + \OC\Files\Filesystem::signal_param_path => $hookPath |
|
| 316 | + )); |
|
| 317 | + } |
|
| 318 | + \OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_post_write, array( |
|
| 319 | + \OC\Files\Filesystem::signal_param_path => $hookPath |
|
| 320 | + )); |
|
| 321 | + } |
|
| 322 | + |
|
| 323 | + /** |
|
| 324 | + * Returns the data |
|
| 325 | + * |
|
| 326 | + * @return resource |
|
| 327 | + * @throws Forbidden |
|
| 328 | + * @throws ServiceUnavailable |
|
| 329 | + */ |
|
| 330 | + public function get() { |
|
| 331 | + //throw exception if encryption is disabled but files are still encrypted |
|
| 332 | + try { |
|
| 333 | + if (!$this->info->isReadable()) { |
|
| 334 | + // do a if the file did not exist |
|
| 335 | + throw new NotFound(); |
|
| 336 | + } |
|
| 337 | + $res = $this->fileView->fopen(ltrim($this->path, '/'), 'rb'); |
|
| 338 | + if ($res === false) { |
|
| 339 | + throw new ServiceUnavailable("Could not open file"); |
|
| 340 | + } |
|
| 341 | + return $res; |
|
| 342 | + } catch (GenericEncryptionException $e) { |
|
| 343 | + // returning 503 will allow retry of the operation at a later point in time |
|
| 344 | + throw new ServiceUnavailable("Encryption not ready: " . $e->getMessage()); |
|
| 345 | + } catch (StorageNotAvailableException $e) { |
|
| 346 | + throw new ServiceUnavailable("Failed to open file: " . $e->getMessage()); |
|
| 347 | + } catch (ForbiddenException $ex) { |
|
| 348 | + throw new DAVForbiddenException($ex->getMessage(), $ex->getRetry()); |
|
| 349 | + } catch (LockedException $e) { |
|
| 350 | + throw new FileLocked($e->getMessage(), $e->getCode(), $e); |
|
| 351 | + } |
|
| 352 | + } |
|
| 353 | + |
|
| 354 | + /** |
|
| 355 | + * Delete the current file |
|
| 356 | + * |
|
| 357 | + * @throws Forbidden |
|
| 358 | + * @throws ServiceUnavailable |
|
| 359 | + */ |
|
| 360 | + public function delete() { |
|
| 361 | + if (!$this->info->isDeletable()) { |
|
| 362 | + throw new Forbidden(); |
|
| 363 | + } |
|
| 364 | + |
|
| 365 | + try { |
|
| 366 | + if (!$this->fileView->unlink($this->path)) { |
|
| 367 | + // assume it wasn't possible to delete due to permissions |
|
| 368 | + throw new Forbidden(); |
|
| 369 | + } |
|
| 370 | + } catch (StorageNotAvailableException $e) { |
|
| 371 | + throw new ServiceUnavailable("Failed to unlink: " . $e->getMessage()); |
|
| 372 | + } catch (ForbiddenException $ex) { |
|
| 373 | + throw new DAVForbiddenException($ex->getMessage(), $ex->getRetry()); |
|
| 374 | + } catch (LockedException $e) { |
|
| 375 | + throw new FileLocked($e->getMessage(), $e->getCode(), $e); |
|
| 376 | + } |
|
| 377 | + } |
|
| 378 | + |
|
| 379 | + /** |
|
| 380 | + * Returns the mime-type for a file |
|
| 381 | + * |
|
| 382 | + * If null is returned, we'll assume application/octet-stream |
|
| 383 | + * |
|
| 384 | + * @return string |
|
| 385 | + */ |
|
| 386 | + public function getContentType() { |
|
| 387 | + $mimeType = $this->info->getMimetype(); |
|
| 388 | + |
|
| 389 | + // PROPFIND needs to return the correct mime type, for consistency with the web UI |
|
| 390 | + if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PROPFIND') { |
|
| 391 | + return $mimeType; |
|
| 392 | + } |
|
| 393 | + return \OC::$server->getMimeTypeDetector()->getSecureMimeType($mimeType); |
|
| 394 | + } |
|
| 395 | + |
|
| 396 | + /** |
|
| 397 | + * @return array|false |
|
| 398 | + */ |
|
| 399 | + public function getDirectDownload() { |
|
| 400 | + if (\OCP\App::isEnabled('encryption')) { |
|
| 401 | + return []; |
|
| 402 | + } |
|
| 403 | + /** @var \OCP\Files\Storage $storage */ |
|
| 404 | + list($storage, $internalPath) = $this->fileView->resolvePath($this->path); |
|
| 405 | + if (is_null($storage)) { |
|
| 406 | + return []; |
|
| 407 | + } |
|
| 408 | + |
|
| 409 | + return $storage->getDirectDownload($internalPath); |
|
| 410 | + } |
|
| 411 | + |
|
| 412 | + /** |
|
| 413 | + * @param resource $data |
|
| 414 | + * @return null|string |
|
| 415 | + * @throws Exception |
|
| 416 | + * @throws BadRequest |
|
| 417 | + * @throws NotImplemented |
|
| 418 | + * @throws ServiceUnavailable |
|
| 419 | + */ |
|
| 420 | + private function createFileChunked($data) { |
|
| 421 | + list($path, $name) = \Sabre\Uri\split($this->path); |
|
| 422 | + |
|
| 423 | + $info = \OC_FileChunking::decodeName($name); |
|
| 424 | + if (empty($info)) { |
|
| 425 | + throw new NotImplemented('Invalid chunk name'); |
|
| 426 | + } |
|
| 427 | + |
|
| 428 | + $chunk_handler = new \OC_FileChunking($info); |
|
| 429 | + $bytesWritten = $chunk_handler->store($info['index'], $data); |
|
| 430 | + |
|
| 431 | + //detect aborted upload |
|
| 432 | + if (isset ($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { |
|
| 433 | + if (isset($_SERVER['CONTENT_LENGTH'])) { |
|
| 434 | + $expected = (int) $_SERVER['CONTENT_LENGTH']; |
|
| 435 | + if ($bytesWritten !== $expected) { |
|
| 436 | + $chunk_handler->remove($info['index']); |
|
| 437 | + throw new BadRequest( |
|
| 438 | + 'expected filesize ' . $expected . ' got ' . $bytesWritten); |
|
| 439 | + } |
|
| 440 | + } |
|
| 441 | + } |
|
| 442 | + |
|
| 443 | + if ($chunk_handler->isComplete()) { |
|
| 444 | + list($storage,) = $this->fileView->resolvePath($path); |
|
| 445 | + $needsPartFile = $this->needsPartFile($storage); |
|
| 446 | + $partFile = null; |
|
| 447 | + |
|
| 448 | + $targetPath = $path . '/' . $info['name']; |
|
| 449 | + /** @var \OC\Files\Storage\Storage $targetStorage */ |
|
| 450 | + list($targetStorage, $targetInternalPath) = $this->fileView->resolvePath($targetPath); |
|
| 451 | + |
|
| 452 | + $exists = $this->fileView->file_exists($targetPath); |
|
| 453 | + |
|
| 454 | + try { |
|
| 455 | + $this->fileView->lockFile($targetPath, ILockingProvider::LOCK_SHARED); |
|
| 456 | + |
|
| 457 | + $this->emitPreHooks($exists, $targetPath); |
|
| 458 | + $this->fileView->changeLock($targetPath, ILockingProvider::LOCK_EXCLUSIVE); |
|
| 459 | + /** @var \OC\Files\Storage\Storage $targetStorage */ |
|
| 460 | + list($targetStorage, $targetInternalPath) = $this->fileView->resolvePath($targetPath); |
|
| 461 | + |
|
| 462 | + if ($needsPartFile) { |
|
| 463 | + // we first assembly the target file as a part file |
|
| 464 | + $partFile = $this->getPartFileBasePath($path . '/' . $info['name']) . '.ocTransferId' . $info['transferid'] . '.part'; |
|
| 465 | + /** @var \OC\Files\Storage\Storage $targetStorage */ |
|
| 466 | + list($partStorage, $partInternalPath) = $this->fileView->resolvePath($partFile); |
|
| 467 | + |
|
| 468 | + |
|
| 469 | + $chunk_handler->file_assemble($partStorage, $partInternalPath); |
|
| 470 | + |
|
| 471 | + // here is the final atomic rename |
|
| 472 | + $renameOkay = $targetStorage->moveFromStorage($partStorage, $partInternalPath, $targetInternalPath); |
|
| 473 | + $fileExists = $targetStorage->file_exists($targetInternalPath); |
|
| 474 | + if ($renameOkay === false || $fileExists === false) { |
|
| 475 | + \OCP\Util::writeLog('webdav', '\OC\Files\Filesystem::rename() failed', \OCP\Util::ERROR); |
|
| 476 | + // only delete if an error occurred and the target file was already created |
|
| 477 | + if ($fileExists) { |
|
| 478 | + // set to null to avoid double-deletion when handling exception |
|
| 479 | + // stray part file |
|
| 480 | + $partFile = null; |
|
| 481 | + $targetStorage->unlink($targetInternalPath); |
|
| 482 | + } |
|
| 483 | + $this->fileView->changeLock($targetPath, ILockingProvider::LOCK_SHARED); |
|
| 484 | + throw new Exception('Could not rename part file assembled from chunks'); |
|
| 485 | + } |
|
| 486 | + } else { |
|
| 487 | + // assemble directly into the final file |
|
| 488 | + $chunk_handler->file_assemble($targetStorage, $targetInternalPath); |
|
| 489 | + } |
|
| 490 | + |
|
| 491 | + // allow sync clients to send the mtime along in a header |
|
| 492 | + if (isset($this->request->server['HTTP_X_OC_MTIME'])) { |
|
| 493 | + $mtime = $this->sanitizeMtime($this->request->server['HTTP_X_OC_MTIME']); |
|
| 494 | + if ($targetStorage->touch($targetInternalPath, $mtime)) { |
|
| 495 | + $this->header('X-OC-MTime: accepted'); |
|
| 496 | + } |
|
| 497 | + } |
|
| 498 | + |
|
| 499 | + // since we skipped the view we need to scan and emit the hooks ourselves |
|
| 500 | + $targetStorage->getUpdater()->update($targetInternalPath); |
|
| 501 | + |
|
| 502 | + $this->fileView->changeLock($targetPath, ILockingProvider::LOCK_SHARED); |
|
| 503 | + |
|
| 504 | + $this->emitPostHooks($exists, $targetPath); |
|
| 505 | + |
|
| 506 | + // FIXME: should call refreshInfo but can't because $this->path is not the of the final file |
|
| 507 | + $info = $this->fileView->getFileInfo($targetPath); |
|
| 508 | + |
|
| 509 | + if (isset($this->request->server['HTTP_OC_CHECKSUM'])) { |
|
| 510 | + $checksum = trim($this->request->server['HTTP_OC_CHECKSUM']); |
|
| 511 | + $this->fileView->putFileInfo($targetPath, ['checksum' => $checksum]); |
|
| 512 | + } else if ($info->getChecksum() !== null && $info->getChecksum() !== '') { |
|
| 513 | + $this->fileView->putFileInfo($this->path, ['checksum' => '']); |
|
| 514 | + } |
|
| 515 | + |
|
| 516 | + $this->fileView->unlockFile($targetPath, ILockingProvider::LOCK_SHARED); |
|
| 517 | + |
|
| 518 | + return $info->getEtag(); |
|
| 519 | + } catch (\Exception $e) { |
|
| 520 | + if ($partFile !== null) { |
|
| 521 | + $targetStorage->unlink($targetInternalPath); |
|
| 522 | + } |
|
| 523 | + $this->convertToSabreException($e); |
|
| 524 | + } |
|
| 525 | + } |
|
| 526 | + |
|
| 527 | + return null; |
|
| 528 | + } |
|
| 529 | + |
|
| 530 | + /** |
|
| 531 | + * Returns whether a part file is needed for the given storage |
|
| 532 | + * or whether the file can be assembled/uploaded directly on the |
|
| 533 | + * target storage. |
|
| 534 | + * |
|
| 535 | + * @param \OCP\Files\Storage $storage |
|
| 536 | + * @return bool true if the storage needs part file handling |
|
| 537 | + */ |
|
| 538 | + private function needsPartFile($storage) { |
|
| 539 | + // TODO: in the future use ChunkHandler provided by storage |
|
| 540 | + return !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') && |
|
| 541 | + !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud') && |
|
| 542 | + $storage->needsPartFile(); |
|
| 543 | + } |
|
| 544 | + |
|
| 545 | + /** |
|
| 546 | + * Convert the given exception to a SabreException instance |
|
| 547 | + * |
|
| 548 | + * @param \Exception $e |
|
| 549 | + * |
|
| 550 | + * @throws \Sabre\DAV\Exception |
|
| 551 | + */ |
|
| 552 | + private function convertToSabreException(\Exception $e) { |
|
| 553 | + if ($e instanceof \Sabre\DAV\Exception) { |
|
| 554 | + throw $e; |
|
| 555 | + } |
|
| 556 | + if ($e instanceof NotPermittedException) { |
|
| 557 | + // a more general case - due to whatever reason the content could not be written |
|
| 558 | + throw new Forbidden($e->getMessage(), 0, $e); |
|
| 559 | + } |
|
| 560 | + if ($e instanceof ForbiddenException) { |
|
| 561 | + // the path for the file was forbidden |
|
| 562 | + throw new DAVForbiddenException($e->getMessage(), $e->getRetry(), $e); |
|
| 563 | + } |
|
| 564 | + if ($e instanceof EntityTooLargeException) { |
|
| 565 | + // the file is too big to be stored |
|
| 566 | + throw new EntityTooLarge($e->getMessage(), 0, $e); |
|
| 567 | + } |
|
| 568 | + if ($e instanceof InvalidContentException) { |
|
| 569 | + // the file content is not permitted |
|
| 570 | + throw new UnsupportedMediaType($e->getMessage(), 0, $e); |
|
| 571 | + } |
|
| 572 | + if ($e instanceof InvalidPathException) { |
|
| 573 | + // the path for the file was not valid |
|
| 574 | + // TODO: find proper http status code for this case |
|
| 575 | + throw new Forbidden($e->getMessage(), 0, $e); |
|
| 576 | + } |
|
| 577 | + if ($e instanceof LockedException || $e instanceof LockNotAcquiredException) { |
|
| 578 | + // the file is currently being written to by another process |
|
| 579 | + throw new FileLocked($e->getMessage(), $e->getCode(), $e); |
|
| 580 | + } |
|
| 581 | + if ($e instanceof GenericEncryptionException) { |
|
| 582 | + // returning 503 will allow retry of the operation at a later point in time |
|
| 583 | + throw new ServiceUnavailable('Encryption not ready: ' . $e->getMessage(), 0, $e); |
|
| 584 | + } |
|
| 585 | + if ($e instanceof StorageNotAvailableException) { |
|
| 586 | + throw new ServiceUnavailable('Failed to write file contents: ' . $e->getMessage(), 0, $e); |
|
| 587 | + } |
|
| 588 | + |
|
| 589 | + throw new \Sabre\DAV\Exception($e->getMessage(), 0, $e); |
|
| 590 | + } |
|
| 591 | + |
|
| 592 | + /** |
|
| 593 | + * Get the checksum for this file |
|
| 594 | + * |
|
| 595 | + * @return string |
|
| 596 | + */ |
|
| 597 | + public function getChecksum() { |
|
| 598 | + return $this->info->getChecksum(); |
|
| 599 | + } |
|
| 600 | + |
|
| 601 | + protected function header($string) { |
|
| 602 | + \header($string); |
|
| 603 | + } |
|
| 604 | 604 | } |
@@ -44,332 +44,332 @@ |
||
| 44 | 44 | |
| 45 | 45 | abstract class Node implements \Sabre\DAV\INode { |
| 46 | 46 | |
| 47 | - /** |
|
| 48 | - * @var \OC\Files\View |
|
| 49 | - */ |
|
| 50 | - protected $fileView; |
|
| 51 | - |
|
| 52 | - /** |
|
| 53 | - * The path to the current node |
|
| 54 | - * |
|
| 55 | - * @var string |
|
| 56 | - */ |
|
| 57 | - protected $path; |
|
| 58 | - |
|
| 59 | - /** |
|
| 60 | - * node properties cache |
|
| 61 | - * |
|
| 62 | - * @var array |
|
| 63 | - */ |
|
| 64 | - protected $property_cache = null; |
|
| 65 | - |
|
| 66 | - /** |
|
| 67 | - * @var \OCP\Files\FileInfo |
|
| 68 | - */ |
|
| 69 | - protected $info; |
|
| 70 | - |
|
| 71 | - /** |
|
| 72 | - * @var IManager |
|
| 73 | - */ |
|
| 74 | - protected $shareManager; |
|
| 75 | - |
|
| 76 | - /** |
|
| 77 | - * Sets up the node, expects a full path name |
|
| 78 | - * |
|
| 79 | - * @param \OC\Files\View $view |
|
| 80 | - * @param \OCP\Files\FileInfo $info |
|
| 81 | - * @param IManager $shareManager |
|
| 82 | - */ |
|
| 83 | - public function __construct(View $view, FileInfo $info, IManager $shareManager = null) { |
|
| 84 | - $this->fileView = $view; |
|
| 85 | - $this->path = $this->fileView->getRelativePath($info->getPath()); |
|
| 86 | - $this->info = $info; |
|
| 87 | - if ($shareManager) { |
|
| 88 | - $this->shareManager = $shareManager; |
|
| 89 | - } else { |
|
| 90 | - $this->shareManager = \OC::$server->getShareManager(); |
|
| 91 | - } |
|
| 92 | - } |
|
| 93 | - |
|
| 94 | - protected function refreshInfo() { |
|
| 95 | - $this->info = $this->fileView->getFileInfo($this->path); |
|
| 96 | - } |
|
| 97 | - |
|
| 98 | - /** |
|
| 99 | - * Returns the name of the node |
|
| 100 | - * |
|
| 101 | - * @return string |
|
| 102 | - */ |
|
| 103 | - public function getName() { |
|
| 104 | - return $this->info->getName(); |
|
| 105 | - } |
|
| 106 | - |
|
| 107 | - /** |
|
| 108 | - * Returns the full path |
|
| 109 | - * |
|
| 110 | - * @return string |
|
| 111 | - */ |
|
| 112 | - public function getPath() { |
|
| 113 | - return $this->path; |
|
| 114 | - } |
|
| 115 | - |
|
| 116 | - /** |
|
| 117 | - * Renames the node |
|
| 118 | - * |
|
| 119 | - * @param string $name The new name |
|
| 120 | - * @throws \Sabre\DAV\Exception\BadRequest |
|
| 121 | - * @throws \Sabre\DAV\Exception\Forbidden |
|
| 122 | - */ |
|
| 123 | - public function setName($name) { |
|
| 124 | - |
|
| 125 | - // rename is only allowed if the update privilege is granted |
|
| 126 | - if (!$this->info->isUpdateable()) { |
|
| 127 | - throw new \Sabre\DAV\Exception\Forbidden(); |
|
| 128 | - } |
|
| 129 | - |
|
| 130 | - list($parentPath,) = \Sabre\Uri\split($this->path); |
|
| 131 | - list(, $newName) = \Sabre\Uri\split($name); |
|
| 132 | - |
|
| 133 | - // verify path of the target |
|
| 134 | - $this->verifyPath(); |
|
| 135 | - |
|
| 136 | - $newPath = $parentPath . '/' . $newName; |
|
| 137 | - |
|
| 138 | - $this->fileView->rename($this->path, $newPath); |
|
| 139 | - |
|
| 140 | - $this->path = $newPath; |
|
| 141 | - |
|
| 142 | - $this->refreshInfo(); |
|
| 143 | - } |
|
| 144 | - |
|
| 145 | - public function setPropertyCache($property_cache) { |
|
| 146 | - $this->property_cache = $property_cache; |
|
| 147 | - } |
|
| 148 | - |
|
| 149 | - /** |
|
| 150 | - * Returns the last modification time, as a unix timestamp |
|
| 151 | - * |
|
| 152 | - * @return int timestamp as integer |
|
| 153 | - */ |
|
| 154 | - public function getLastModified() { |
|
| 155 | - $timestamp = $this->info->getMtime(); |
|
| 156 | - if (!empty($timestamp)) { |
|
| 157 | - return (int)$timestamp; |
|
| 158 | - } |
|
| 159 | - return $timestamp; |
|
| 160 | - } |
|
| 161 | - |
|
| 162 | - /** |
|
| 163 | - * sets the last modification time of the file (mtime) to the value given |
|
| 164 | - * in the second parameter or to now if the second param is empty. |
|
| 165 | - * Even if the modification time is set to a custom value the access time is set to now. |
|
| 166 | - */ |
|
| 167 | - public function touch($mtime) { |
|
| 168 | - $mtime = $this->sanitizeMtime($mtime); |
|
| 169 | - $this->fileView->touch($this->path, $mtime); |
|
| 170 | - $this->refreshInfo(); |
|
| 171 | - } |
|
| 172 | - |
|
| 173 | - /** |
|
| 174 | - * Returns the ETag for a file |
|
| 175 | - * |
|
| 176 | - * An ETag is a unique identifier representing the current version of the |
|
| 177 | - * file. If the file changes, the ETag MUST change. The ETag is an |
|
| 178 | - * arbitrary string, but MUST be surrounded by double-quotes. |
|
| 179 | - * |
|
| 180 | - * Return null if the ETag can not effectively be determined |
|
| 181 | - * |
|
| 182 | - * @return string |
|
| 183 | - */ |
|
| 184 | - public function getETag() { |
|
| 185 | - return '"' . $this->info->getEtag() . '"'; |
|
| 186 | - } |
|
| 187 | - |
|
| 188 | - /** |
|
| 189 | - * Sets the ETag |
|
| 190 | - * |
|
| 191 | - * @param string $etag |
|
| 192 | - * |
|
| 193 | - * @return int file id of updated file or -1 on failure |
|
| 194 | - */ |
|
| 195 | - public function setETag($etag) { |
|
| 196 | - return $this->fileView->putFileInfo($this->path, array('etag' => $etag)); |
|
| 197 | - } |
|
| 198 | - |
|
| 199 | - /** |
|
| 200 | - * Returns the size of the node, in bytes |
|
| 201 | - * |
|
| 202 | - * @return integer |
|
| 203 | - */ |
|
| 204 | - public function getSize() { |
|
| 205 | - return $this->info->getSize(); |
|
| 206 | - } |
|
| 207 | - |
|
| 208 | - /** |
|
| 209 | - * Returns the cache's file id |
|
| 210 | - * |
|
| 211 | - * @return int |
|
| 212 | - */ |
|
| 213 | - public function getId() { |
|
| 214 | - return $this->info->getId(); |
|
| 215 | - } |
|
| 216 | - |
|
| 217 | - /** |
|
| 218 | - * @return string|null |
|
| 219 | - */ |
|
| 220 | - public function getFileId() { |
|
| 221 | - if ($this->info->getId()) { |
|
| 222 | - $instanceId = \OC_Util::getInstanceId(); |
|
| 223 | - $id = sprintf('%08d', $this->info->getId()); |
|
| 224 | - return $id . $instanceId; |
|
| 225 | - } |
|
| 226 | - |
|
| 227 | - return null; |
|
| 228 | - } |
|
| 229 | - |
|
| 230 | - /** |
|
| 231 | - * @return integer |
|
| 232 | - */ |
|
| 233 | - public function getInternalFileId() { |
|
| 234 | - return $this->info->getId(); |
|
| 235 | - } |
|
| 236 | - |
|
| 237 | - /** |
|
| 238 | - * @param string $user |
|
| 239 | - * @return int |
|
| 240 | - */ |
|
| 241 | - public function getSharePermissions($user) { |
|
| 242 | - |
|
| 243 | - // check of we access a federated share |
|
| 244 | - if ($user !== null) { |
|
| 245 | - try { |
|
| 246 | - $share = $this->shareManager->getShareByToken($user); |
|
| 247 | - return $share->getPermissions(); |
|
| 248 | - } catch (ShareNotFound $e) { |
|
| 249 | - // ignore |
|
| 250 | - } |
|
| 251 | - } |
|
| 252 | - |
|
| 253 | - $storage = $this->info->getStorage(); |
|
| 254 | - |
|
| 255 | - $path = $this->info->getInternalPath(); |
|
| 256 | - |
|
| 257 | - if ($storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage')) { |
|
| 258 | - /** @var \OCA\Files_Sharing\SharedStorage $storage */ |
|
| 259 | - $permissions = (int)$storage->getShare()->getPermissions(); |
|
| 260 | - } else { |
|
| 261 | - $permissions = $storage->getPermissions($path); |
|
| 262 | - } |
|
| 263 | - |
|
| 264 | - /* |
|
| 47 | + /** |
|
| 48 | + * @var \OC\Files\View |
|
| 49 | + */ |
|
| 50 | + protected $fileView; |
|
| 51 | + |
|
| 52 | + /** |
|
| 53 | + * The path to the current node |
|
| 54 | + * |
|
| 55 | + * @var string |
|
| 56 | + */ |
|
| 57 | + protected $path; |
|
| 58 | + |
|
| 59 | + /** |
|
| 60 | + * node properties cache |
|
| 61 | + * |
|
| 62 | + * @var array |
|
| 63 | + */ |
|
| 64 | + protected $property_cache = null; |
|
| 65 | + |
|
| 66 | + /** |
|
| 67 | + * @var \OCP\Files\FileInfo |
|
| 68 | + */ |
|
| 69 | + protected $info; |
|
| 70 | + |
|
| 71 | + /** |
|
| 72 | + * @var IManager |
|
| 73 | + */ |
|
| 74 | + protected $shareManager; |
|
| 75 | + |
|
| 76 | + /** |
|
| 77 | + * Sets up the node, expects a full path name |
|
| 78 | + * |
|
| 79 | + * @param \OC\Files\View $view |
|
| 80 | + * @param \OCP\Files\FileInfo $info |
|
| 81 | + * @param IManager $shareManager |
|
| 82 | + */ |
|
| 83 | + public function __construct(View $view, FileInfo $info, IManager $shareManager = null) { |
|
| 84 | + $this->fileView = $view; |
|
| 85 | + $this->path = $this->fileView->getRelativePath($info->getPath()); |
|
| 86 | + $this->info = $info; |
|
| 87 | + if ($shareManager) { |
|
| 88 | + $this->shareManager = $shareManager; |
|
| 89 | + } else { |
|
| 90 | + $this->shareManager = \OC::$server->getShareManager(); |
|
| 91 | + } |
|
| 92 | + } |
|
| 93 | + |
|
| 94 | + protected function refreshInfo() { |
|
| 95 | + $this->info = $this->fileView->getFileInfo($this->path); |
|
| 96 | + } |
|
| 97 | + |
|
| 98 | + /** |
|
| 99 | + * Returns the name of the node |
|
| 100 | + * |
|
| 101 | + * @return string |
|
| 102 | + */ |
|
| 103 | + public function getName() { |
|
| 104 | + return $this->info->getName(); |
|
| 105 | + } |
|
| 106 | + |
|
| 107 | + /** |
|
| 108 | + * Returns the full path |
|
| 109 | + * |
|
| 110 | + * @return string |
|
| 111 | + */ |
|
| 112 | + public function getPath() { |
|
| 113 | + return $this->path; |
|
| 114 | + } |
|
| 115 | + |
|
| 116 | + /** |
|
| 117 | + * Renames the node |
|
| 118 | + * |
|
| 119 | + * @param string $name The new name |
|
| 120 | + * @throws \Sabre\DAV\Exception\BadRequest |
|
| 121 | + * @throws \Sabre\DAV\Exception\Forbidden |
|
| 122 | + */ |
|
| 123 | + public function setName($name) { |
|
| 124 | + |
|
| 125 | + // rename is only allowed if the update privilege is granted |
|
| 126 | + if (!$this->info->isUpdateable()) { |
|
| 127 | + throw new \Sabre\DAV\Exception\Forbidden(); |
|
| 128 | + } |
|
| 129 | + |
|
| 130 | + list($parentPath,) = \Sabre\Uri\split($this->path); |
|
| 131 | + list(, $newName) = \Sabre\Uri\split($name); |
|
| 132 | + |
|
| 133 | + // verify path of the target |
|
| 134 | + $this->verifyPath(); |
|
| 135 | + |
|
| 136 | + $newPath = $parentPath . '/' . $newName; |
|
| 137 | + |
|
| 138 | + $this->fileView->rename($this->path, $newPath); |
|
| 139 | + |
|
| 140 | + $this->path = $newPath; |
|
| 141 | + |
|
| 142 | + $this->refreshInfo(); |
|
| 143 | + } |
|
| 144 | + |
|
| 145 | + public function setPropertyCache($property_cache) { |
|
| 146 | + $this->property_cache = $property_cache; |
|
| 147 | + } |
|
| 148 | + |
|
| 149 | + /** |
|
| 150 | + * Returns the last modification time, as a unix timestamp |
|
| 151 | + * |
|
| 152 | + * @return int timestamp as integer |
|
| 153 | + */ |
|
| 154 | + public function getLastModified() { |
|
| 155 | + $timestamp = $this->info->getMtime(); |
|
| 156 | + if (!empty($timestamp)) { |
|
| 157 | + return (int)$timestamp; |
|
| 158 | + } |
|
| 159 | + return $timestamp; |
|
| 160 | + } |
|
| 161 | + |
|
| 162 | + /** |
|
| 163 | + * sets the last modification time of the file (mtime) to the value given |
|
| 164 | + * in the second parameter or to now if the second param is empty. |
|
| 165 | + * Even if the modification time is set to a custom value the access time is set to now. |
|
| 166 | + */ |
|
| 167 | + public function touch($mtime) { |
|
| 168 | + $mtime = $this->sanitizeMtime($mtime); |
|
| 169 | + $this->fileView->touch($this->path, $mtime); |
|
| 170 | + $this->refreshInfo(); |
|
| 171 | + } |
|
| 172 | + |
|
| 173 | + /** |
|
| 174 | + * Returns the ETag for a file |
|
| 175 | + * |
|
| 176 | + * An ETag is a unique identifier representing the current version of the |
|
| 177 | + * file. If the file changes, the ETag MUST change. The ETag is an |
|
| 178 | + * arbitrary string, but MUST be surrounded by double-quotes. |
|
| 179 | + * |
|
| 180 | + * Return null if the ETag can not effectively be determined |
|
| 181 | + * |
|
| 182 | + * @return string |
|
| 183 | + */ |
|
| 184 | + public function getETag() { |
|
| 185 | + return '"' . $this->info->getEtag() . '"'; |
|
| 186 | + } |
|
| 187 | + |
|
| 188 | + /** |
|
| 189 | + * Sets the ETag |
|
| 190 | + * |
|
| 191 | + * @param string $etag |
|
| 192 | + * |
|
| 193 | + * @return int file id of updated file or -1 on failure |
|
| 194 | + */ |
|
| 195 | + public function setETag($etag) { |
|
| 196 | + return $this->fileView->putFileInfo($this->path, array('etag' => $etag)); |
|
| 197 | + } |
|
| 198 | + |
|
| 199 | + /** |
|
| 200 | + * Returns the size of the node, in bytes |
|
| 201 | + * |
|
| 202 | + * @return integer |
|
| 203 | + */ |
|
| 204 | + public function getSize() { |
|
| 205 | + return $this->info->getSize(); |
|
| 206 | + } |
|
| 207 | + |
|
| 208 | + /** |
|
| 209 | + * Returns the cache's file id |
|
| 210 | + * |
|
| 211 | + * @return int |
|
| 212 | + */ |
|
| 213 | + public function getId() { |
|
| 214 | + return $this->info->getId(); |
|
| 215 | + } |
|
| 216 | + |
|
| 217 | + /** |
|
| 218 | + * @return string|null |
|
| 219 | + */ |
|
| 220 | + public function getFileId() { |
|
| 221 | + if ($this->info->getId()) { |
|
| 222 | + $instanceId = \OC_Util::getInstanceId(); |
|
| 223 | + $id = sprintf('%08d', $this->info->getId()); |
|
| 224 | + return $id . $instanceId; |
|
| 225 | + } |
|
| 226 | + |
|
| 227 | + return null; |
|
| 228 | + } |
|
| 229 | + |
|
| 230 | + /** |
|
| 231 | + * @return integer |
|
| 232 | + */ |
|
| 233 | + public function getInternalFileId() { |
|
| 234 | + return $this->info->getId(); |
|
| 235 | + } |
|
| 236 | + |
|
| 237 | + /** |
|
| 238 | + * @param string $user |
|
| 239 | + * @return int |
|
| 240 | + */ |
|
| 241 | + public function getSharePermissions($user) { |
|
| 242 | + |
|
| 243 | + // check of we access a federated share |
|
| 244 | + if ($user !== null) { |
|
| 245 | + try { |
|
| 246 | + $share = $this->shareManager->getShareByToken($user); |
|
| 247 | + return $share->getPermissions(); |
|
| 248 | + } catch (ShareNotFound $e) { |
|
| 249 | + // ignore |
|
| 250 | + } |
|
| 251 | + } |
|
| 252 | + |
|
| 253 | + $storage = $this->info->getStorage(); |
|
| 254 | + |
|
| 255 | + $path = $this->info->getInternalPath(); |
|
| 256 | + |
|
| 257 | + if ($storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage')) { |
|
| 258 | + /** @var \OCA\Files_Sharing\SharedStorage $storage */ |
|
| 259 | + $permissions = (int)$storage->getShare()->getPermissions(); |
|
| 260 | + } else { |
|
| 261 | + $permissions = $storage->getPermissions($path); |
|
| 262 | + } |
|
| 263 | + |
|
| 264 | + /* |
|
| 265 | 265 | * We can always share non moveable mount points with DELETE and UPDATE |
| 266 | 266 | * Eventually we need to do this properly |
| 267 | 267 | */ |
| 268 | - $mountpoint = $this->info->getMountPoint(); |
|
| 269 | - if (!($mountpoint instanceof MoveableMount)) { |
|
| 270 | - $mountpointpath = $mountpoint->getMountPoint(); |
|
| 271 | - if (substr($mountpointpath, -1) === '/') { |
|
| 272 | - $mountpointpath = substr($mountpointpath, 0, -1); |
|
| 273 | - } |
|
| 274 | - |
|
| 275 | - if ($mountpointpath === $this->info->getPath()) { |
|
| 276 | - $permissions |= \OCP\Constants::PERMISSION_DELETE | \OCP\Constants::PERMISSION_UPDATE; |
|
| 277 | - } |
|
| 278 | - } |
|
| 279 | - |
|
| 280 | - /* |
|
| 268 | + $mountpoint = $this->info->getMountPoint(); |
|
| 269 | + if (!($mountpoint instanceof MoveableMount)) { |
|
| 270 | + $mountpointpath = $mountpoint->getMountPoint(); |
|
| 271 | + if (substr($mountpointpath, -1) === '/') { |
|
| 272 | + $mountpointpath = substr($mountpointpath, 0, -1); |
|
| 273 | + } |
|
| 274 | + |
|
| 275 | + if ($mountpointpath === $this->info->getPath()) { |
|
| 276 | + $permissions |= \OCP\Constants::PERMISSION_DELETE | \OCP\Constants::PERMISSION_UPDATE; |
|
| 277 | + } |
|
| 278 | + } |
|
| 279 | + |
|
| 280 | + /* |
|
| 281 | 281 | * Files can't have create or delete permissions |
| 282 | 282 | */ |
| 283 | - if ($this->info->getType() === \OCP\Files\FileInfo::TYPE_FILE) { |
|
| 284 | - $permissions &= ~(\OCP\Constants::PERMISSION_CREATE | \OCP\Constants::PERMISSION_DELETE); |
|
| 285 | - } |
|
| 286 | - |
|
| 287 | - return $permissions; |
|
| 288 | - } |
|
| 289 | - |
|
| 290 | - /** |
|
| 291 | - * @return string |
|
| 292 | - */ |
|
| 293 | - public function getDavPermissions() { |
|
| 294 | - $p = ''; |
|
| 295 | - if ($this->info->isShared()) { |
|
| 296 | - $p .= 'S'; |
|
| 297 | - } |
|
| 298 | - if ($this->info->isShareable()) { |
|
| 299 | - $p .= 'R'; |
|
| 300 | - } |
|
| 301 | - if ($this->info->isMounted()) { |
|
| 302 | - $p .= 'M'; |
|
| 303 | - } |
|
| 304 | - if ($this->info->isReadable()) { |
|
| 305 | - $p .= 'G'; |
|
| 306 | - } |
|
| 307 | - if ($this->info->isDeletable()) { |
|
| 308 | - $p .= 'D'; |
|
| 309 | - } |
|
| 310 | - if ($this->info->isUpdateable()) { |
|
| 311 | - $p .= 'NV'; // Renameable, Moveable |
|
| 312 | - } |
|
| 313 | - if ($this->info->getType() === \OCP\Files\FileInfo::TYPE_FILE) { |
|
| 314 | - if ($this->info->isUpdateable()) { |
|
| 315 | - $p .= 'W'; |
|
| 316 | - } |
|
| 317 | - } else { |
|
| 318 | - if ($this->info->isCreatable()) { |
|
| 319 | - $p .= 'CK'; |
|
| 320 | - } |
|
| 321 | - } |
|
| 322 | - return $p; |
|
| 323 | - } |
|
| 324 | - |
|
| 325 | - public function getOwner() { |
|
| 326 | - return $this->info->getOwner(); |
|
| 327 | - } |
|
| 328 | - |
|
| 329 | - protected function verifyPath() { |
|
| 330 | - try { |
|
| 331 | - $fileName = basename($this->info->getPath()); |
|
| 332 | - $this->fileView->verifyPath($this->path, $fileName); |
|
| 333 | - } catch (\OCP\Files\InvalidPathException $ex) { |
|
| 334 | - throw new InvalidPath($ex->getMessage()); |
|
| 335 | - } |
|
| 336 | - } |
|
| 337 | - |
|
| 338 | - /** |
|
| 339 | - * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
| 340 | - */ |
|
| 341 | - public function acquireLock($type) { |
|
| 342 | - $this->fileView->lockFile($this->path, $type); |
|
| 343 | - } |
|
| 344 | - |
|
| 345 | - /** |
|
| 346 | - * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
| 347 | - */ |
|
| 348 | - public function releaseLock($type) { |
|
| 349 | - $this->fileView->unlockFile($this->path, $type); |
|
| 350 | - } |
|
| 351 | - |
|
| 352 | - /** |
|
| 353 | - * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
| 354 | - */ |
|
| 355 | - public function changeLock($type) { |
|
| 356 | - $this->fileView->changeLock($this->path, $type); |
|
| 357 | - } |
|
| 358 | - |
|
| 359 | - public function getFileInfo() { |
|
| 360 | - return $this->info; |
|
| 361 | - } |
|
| 362 | - |
|
| 363 | - protected function sanitizeMtime($mtimeFromRequest) { |
|
| 364 | - // In PHP 5.X "is_numeric" returns true for strings in hexadecimal |
|
| 365 | - // notation. This is no longer the case in PHP 7.X, so this check |
|
| 366 | - // ensures that strings with hexadecimal notations fail too in PHP 5.X. |
|
| 367 | - $isHexadecimal = is_string($mtimeFromRequest) && preg_match('/^\s*0[xX]/', $mtimeFromRequest); |
|
| 368 | - if ($isHexadecimal || !is_numeric($mtimeFromRequest)) { |
|
| 369 | - throw new \InvalidArgumentException('X-OC-MTime header must be an integer (unix timestamp).'); |
|
| 370 | - } |
|
| 371 | - |
|
| 372 | - return intval($mtimeFromRequest); |
|
| 373 | - } |
|
| 283 | + if ($this->info->getType() === \OCP\Files\FileInfo::TYPE_FILE) { |
|
| 284 | + $permissions &= ~(\OCP\Constants::PERMISSION_CREATE | \OCP\Constants::PERMISSION_DELETE); |
|
| 285 | + } |
|
| 286 | + |
|
| 287 | + return $permissions; |
|
| 288 | + } |
|
| 289 | + |
|
| 290 | + /** |
|
| 291 | + * @return string |
|
| 292 | + */ |
|
| 293 | + public function getDavPermissions() { |
|
| 294 | + $p = ''; |
|
| 295 | + if ($this->info->isShared()) { |
|
| 296 | + $p .= 'S'; |
|
| 297 | + } |
|
| 298 | + if ($this->info->isShareable()) { |
|
| 299 | + $p .= 'R'; |
|
| 300 | + } |
|
| 301 | + if ($this->info->isMounted()) { |
|
| 302 | + $p .= 'M'; |
|
| 303 | + } |
|
| 304 | + if ($this->info->isReadable()) { |
|
| 305 | + $p .= 'G'; |
|
| 306 | + } |
|
| 307 | + if ($this->info->isDeletable()) { |
|
| 308 | + $p .= 'D'; |
|
| 309 | + } |
|
| 310 | + if ($this->info->isUpdateable()) { |
|
| 311 | + $p .= 'NV'; // Renameable, Moveable |
|
| 312 | + } |
|
| 313 | + if ($this->info->getType() === \OCP\Files\FileInfo::TYPE_FILE) { |
|
| 314 | + if ($this->info->isUpdateable()) { |
|
| 315 | + $p .= 'W'; |
|
| 316 | + } |
|
| 317 | + } else { |
|
| 318 | + if ($this->info->isCreatable()) { |
|
| 319 | + $p .= 'CK'; |
|
| 320 | + } |
|
| 321 | + } |
|
| 322 | + return $p; |
|
| 323 | + } |
|
| 324 | + |
|
| 325 | + public function getOwner() { |
|
| 326 | + return $this->info->getOwner(); |
|
| 327 | + } |
|
| 328 | + |
|
| 329 | + protected function verifyPath() { |
|
| 330 | + try { |
|
| 331 | + $fileName = basename($this->info->getPath()); |
|
| 332 | + $this->fileView->verifyPath($this->path, $fileName); |
|
| 333 | + } catch (\OCP\Files\InvalidPathException $ex) { |
|
| 334 | + throw new InvalidPath($ex->getMessage()); |
|
| 335 | + } |
|
| 336 | + } |
|
| 337 | + |
|
| 338 | + /** |
|
| 339 | + * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
| 340 | + */ |
|
| 341 | + public function acquireLock($type) { |
|
| 342 | + $this->fileView->lockFile($this->path, $type); |
|
| 343 | + } |
|
| 344 | + |
|
| 345 | + /** |
|
| 346 | + * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
| 347 | + */ |
|
| 348 | + public function releaseLock($type) { |
|
| 349 | + $this->fileView->unlockFile($this->path, $type); |
|
| 350 | + } |
|
| 351 | + |
|
| 352 | + /** |
|
| 353 | + * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE |
|
| 354 | + */ |
|
| 355 | + public function changeLock($type) { |
|
| 356 | + $this->fileView->changeLock($this->path, $type); |
|
| 357 | + } |
|
| 358 | + |
|
| 359 | + public function getFileInfo() { |
|
| 360 | + return $this->info; |
|
| 361 | + } |
|
| 362 | + |
|
| 363 | + protected function sanitizeMtime($mtimeFromRequest) { |
|
| 364 | + // In PHP 5.X "is_numeric" returns true for strings in hexadecimal |
|
| 365 | + // notation. This is no longer the case in PHP 7.X, so this check |
|
| 366 | + // ensures that strings with hexadecimal notations fail too in PHP 5.X. |
|
| 367 | + $isHexadecimal = is_string($mtimeFromRequest) && preg_match('/^\s*0[xX]/', $mtimeFromRequest); |
|
| 368 | + if ($isHexadecimal || !is_numeric($mtimeFromRequest)) { |
|
| 369 | + throw new \InvalidArgumentException('X-OC-MTime header must be an integer (unix timestamp).'); |
|
| 370 | + } |
|
| 371 | + |
|
| 372 | + return intval($mtimeFromRequest); |
|
| 373 | + } |
|
| 374 | 374 | |
| 375 | 375 | } |
@@ -50,408 +50,408 @@ |
||
| 50 | 50 | |
| 51 | 51 | class FilesPlugin extends ServerPlugin { |
| 52 | 52 | |
| 53 | - // namespace |
|
| 54 | - const NS_OWNCLOUD = 'http://owncloud.org/ns'; |
|
| 55 | - const NS_NEXTCLOUD = 'http://nextcloud.org/ns'; |
|
| 56 | - const FILEID_PROPERTYNAME = '{http://owncloud.org/ns}id'; |
|
| 57 | - const INTERNAL_FILEID_PROPERTYNAME = '{http://owncloud.org/ns}fileid'; |
|
| 58 | - const PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}permissions'; |
|
| 59 | - const SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-collaboration-services.org/ns}share-permissions'; |
|
| 60 | - const DOWNLOADURL_PROPERTYNAME = '{http://owncloud.org/ns}downloadURL'; |
|
| 61 | - const SIZE_PROPERTYNAME = '{http://owncloud.org/ns}size'; |
|
| 62 | - const GETETAG_PROPERTYNAME = '{DAV:}getetag'; |
|
| 63 | - const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified'; |
|
| 64 | - const OWNER_ID_PROPERTYNAME = '{http://owncloud.org/ns}owner-id'; |
|
| 65 | - const OWNER_DISPLAY_NAME_PROPERTYNAME = '{http://owncloud.org/ns}owner-display-name'; |
|
| 66 | - const CHECKSUMS_PROPERTYNAME = '{http://owncloud.org/ns}checksums'; |
|
| 67 | - const DATA_FINGERPRINT_PROPERTYNAME = '{http://owncloud.org/ns}data-fingerprint'; |
|
| 68 | - const HAS_PREVIEW_PROPERTYNAME = '{http://nextcloud.org/ns}has-preview'; |
|
| 69 | - const MOUNT_TYPE_PROPERTYNAME = '{http://nextcloud.org/ns}mount-type'; |
|
| 70 | - const IS_ENCRYPTED_PROPERTYNAME = '{http://nextcloud.org/ns}is-encrypted'; |
|
| 71 | - |
|
| 72 | - /** |
|
| 73 | - * Reference to main server object |
|
| 74 | - * |
|
| 75 | - * @var \Sabre\DAV\Server |
|
| 76 | - */ |
|
| 77 | - private $server; |
|
| 78 | - |
|
| 79 | - /** |
|
| 80 | - * @var Tree |
|
| 81 | - */ |
|
| 82 | - private $tree; |
|
| 83 | - |
|
| 84 | - /** |
|
| 85 | - * Whether this is public webdav. |
|
| 86 | - * If true, some returned information will be stripped off. |
|
| 87 | - * |
|
| 88 | - * @var bool |
|
| 89 | - */ |
|
| 90 | - private $isPublic; |
|
| 91 | - |
|
| 92 | - /** |
|
| 93 | - * @var bool |
|
| 94 | - */ |
|
| 95 | - private $downloadAttachment; |
|
| 96 | - |
|
| 97 | - /** |
|
| 98 | - * @var IConfig |
|
| 99 | - */ |
|
| 100 | - private $config; |
|
| 101 | - |
|
| 102 | - /** |
|
| 103 | - * @var IRequest |
|
| 104 | - */ |
|
| 105 | - private $request; |
|
| 106 | - |
|
| 107 | - /** |
|
| 108 | - * @var IPreview |
|
| 109 | - */ |
|
| 110 | - private $previewManager; |
|
| 111 | - |
|
| 112 | - /** |
|
| 113 | - * @param Tree $tree |
|
| 114 | - * @param IConfig $config |
|
| 115 | - * @param IRequest $request |
|
| 116 | - * @param IPreview $previewManager |
|
| 117 | - * @param bool $isPublic |
|
| 118 | - * @param bool $downloadAttachment |
|
| 119 | - */ |
|
| 120 | - public function __construct(Tree $tree, |
|
| 121 | - IConfig $config, |
|
| 122 | - IRequest $request, |
|
| 123 | - IPreview $previewManager, |
|
| 124 | - $isPublic = false, |
|
| 125 | - $downloadAttachment = true) { |
|
| 126 | - $this->tree = $tree; |
|
| 127 | - $this->config = $config; |
|
| 128 | - $this->request = $request; |
|
| 129 | - $this->isPublic = $isPublic; |
|
| 130 | - $this->downloadAttachment = $downloadAttachment; |
|
| 131 | - $this->previewManager = $previewManager; |
|
| 132 | - } |
|
| 133 | - |
|
| 134 | - /** |
|
| 135 | - * This initializes the plugin. |
|
| 136 | - * |
|
| 137 | - * This function is called by \Sabre\DAV\Server, after |
|
| 138 | - * addPlugin is called. |
|
| 139 | - * |
|
| 140 | - * This method should set up the required event subscriptions. |
|
| 141 | - * |
|
| 142 | - * @param \Sabre\DAV\Server $server |
|
| 143 | - * @return void |
|
| 144 | - */ |
|
| 145 | - public function initialize(\Sabre\DAV\Server $server) { |
|
| 146 | - $server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc'; |
|
| 147 | - $server->xml->namespaceMap[self::NS_NEXTCLOUD] = 'nc'; |
|
| 148 | - $server->protectedProperties[] = self::FILEID_PROPERTYNAME; |
|
| 149 | - $server->protectedProperties[] = self::INTERNAL_FILEID_PROPERTYNAME; |
|
| 150 | - $server->protectedProperties[] = self::PERMISSIONS_PROPERTYNAME; |
|
| 151 | - $server->protectedProperties[] = self::SHARE_PERMISSIONS_PROPERTYNAME; |
|
| 152 | - $server->protectedProperties[] = self::SIZE_PROPERTYNAME; |
|
| 153 | - $server->protectedProperties[] = self::DOWNLOADURL_PROPERTYNAME; |
|
| 154 | - $server->protectedProperties[] = self::OWNER_ID_PROPERTYNAME; |
|
| 155 | - $server->protectedProperties[] = self::OWNER_DISPLAY_NAME_PROPERTYNAME; |
|
| 156 | - $server->protectedProperties[] = self::CHECKSUMS_PROPERTYNAME; |
|
| 157 | - $server->protectedProperties[] = self::DATA_FINGERPRINT_PROPERTYNAME; |
|
| 158 | - $server->protectedProperties[] = self::HAS_PREVIEW_PROPERTYNAME; |
|
| 159 | - $server->protectedProperties[] = self::MOUNT_TYPE_PROPERTYNAME; |
|
| 160 | - $server->protectedProperties[] = self::IS_ENCRYPTED_PROPERTYNAME; |
|
| 161 | - |
|
| 162 | - // normally these cannot be changed (RFC4918), but we want them modifiable through PROPPATCH |
|
| 163 | - $allowedProperties = ['{DAV:}getetag']; |
|
| 164 | - $server->protectedProperties = array_diff($server->protectedProperties, $allowedProperties); |
|
| 165 | - |
|
| 166 | - $this->server = $server; |
|
| 167 | - $this->server->on('propFind', array($this, 'handleGetProperties')); |
|
| 168 | - $this->server->on('propPatch', array($this, 'handleUpdateProperties')); |
|
| 169 | - $this->server->on('afterBind', array($this, 'sendFileIdHeader')); |
|
| 170 | - $this->server->on('afterWriteContent', array($this, 'sendFileIdHeader')); |
|
| 171 | - $this->server->on('afterMethod:GET', [$this,'httpGet']); |
|
| 172 | - $this->server->on('afterMethod:GET', array($this, 'handleDownloadToken')); |
|
| 173 | - $this->server->on('afterResponse', function($request, ResponseInterface $response) { |
|
| 174 | - $body = $response->getBody(); |
|
| 175 | - if (is_resource($body)) { |
|
| 176 | - fclose($body); |
|
| 177 | - } |
|
| 178 | - }); |
|
| 179 | - $this->server->on('beforeMove', [$this, 'checkMove']); |
|
| 180 | - } |
|
| 181 | - |
|
| 182 | - /** |
|
| 183 | - * Plugin that checks if a move can actually be performed. |
|
| 184 | - * |
|
| 185 | - * @param string $source source path |
|
| 186 | - * @param string $destination destination path |
|
| 187 | - * @throws Forbidden |
|
| 188 | - * @throws NotFound |
|
| 189 | - */ |
|
| 190 | - function checkMove($source, $destination) { |
|
| 191 | - $sourceNode = $this->tree->getNodeForPath($source); |
|
| 192 | - if (!$sourceNode instanceof Node) { |
|
| 193 | - return; |
|
| 194 | - } |
|
| 195 | - list($sourceDir,) = \Sabre\Uri\split($source); |
|
| 196 | - list($destinationDir,) = \Sabre\Uri\split($destination); |
|
| 197 | - |
|
| 198 | - if ($sourceDir !== $destinationDir) { |
|
| 199 | - $sourceNodeFileInfo = $sourceNode->getFileInfo(); |
|
| 200 | - if ($sourceNodeFileInfo === null) { |
|
| 201 | - throw new NotFound($source . ' does not exist'); |
|
| 202 | - } |
|
| 203 | - |
|
| 204 | - if (!$sourceNodeFileInfo->isDeletable()) { |
|
| 205 | - throw new Forbidden($source . " cannot be deleted"); |
|
| 206 | - } |
|
| 207 | - } |
|
| 208 | - } |
|
| 209 | - |
|
| 210 | - /** |
|
| 211 | - * This sets a cookie to be able to recognize the start of the download |
|
| 212 | - * the content must not be longer than 32 characters and must only contain |
|
| 213 | - * alphanumeric characters |
|
| 214 | - * |
|
| 215 | - * @param RequestInterface $request |
|
| 216 | - * @param ResponseInterface $response |
|
| 217 | - */ |
|
| 218 | - function handleDownloadToken(RequestInterface $request, ResponseInterface $response) { |
|
| 219 | - $queryParams = $request->getQueryParameters(); |
|
| 220 | - |
|
| 221 | - /** |
|
| 222 | - * this sets a cookie to be able to recognize the start of the download |
|
| 223 | - * the content must not be longer than 32 characters and must only contain |
|
| 224 | - * alphanumeric characters |
|
| 225 | - */ |
|
| 226 | - if (isset($queryParams['downloadStartSecret'])) { |
|
| 227 | - $token = $queryParams['downloadStartSecret']; |
|
| 228 | - if (!isset($token[32]) |
|
| 229 | - && preg_match('!^[a-zA-Z0-9]+$!', $token) === 1) { |
|
| 230 | - // FIXME: use $response->setHeader() instead |
|
| 231 | - setcookie('ocDownloadStarted', $token, time() + 20, '/'); |
|
| 232 | - } |
|
| 233 | - } |
|
| 234 | - } |
|
| 235 | - |
|
| 236 | - /** |
|
| 237 | - * Add headers to file download |
|
| 238 | - * |
|
| 239 | - * @param RequestInterface $request |
|
| 240 | - * @param ResponseInterface $response |
|
| 241 | - */ |
|
| 242 | - function httpGet(RequestInterface $request, ResponseInterface $response) { |
|
| 243 | - // Only handle valid files |
|
| 244 | - $node = $this->tree->getNodeForPath($request->getPath()); |
|
| 245 | - if (!($node instanceof IFile)) return; |
|
| 246 | - |
|
| 247 | - // adds a 'Content-Disposition: attachment' header in case no disposition |
|
| 248 | - // header has been set before |
|
| 249 | - if ($this->downloadAttachment && |
|
| 250 | - $response->getHeader('Content-Disposition') === null) { |
|
| 251 | - $filename = $node->getName(); |
|
| 252 | - if ($this->request->isUserAgent( |
|
| 253 | - [ |
|
| 254 | - Request::USER_AGENT_IE, |
|
| 255 | - Request::USER_AGENT_ANDROID_MOBILE_CHROME, |
|
| 256 | - Request::USER_AGENT_FREEBOX, |
|
| 257 | - ])) { |
|
| 258 | - $response->addHeader('Content-Disposition', 'attachment; filename="' . rawurlencode($filename) . '"'); |
|
| 259 | - } else { |
|
| 260 | - $response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\'' . rawurlencode($filename) |
|
| 261 | - . '; filename="' . rawurlencode($filename) . '"'); |
|
| 262 | - } |
|
| 263 | - } |
|
| 264 | - |
|
| 265 | - if ($node instanceof \OCA\DAV\Connector\Sabre\File) { |
|
| 266 | - //Add OC-Checksum header |
|
| 267 | - /** @var $node File */ |
|
| 268 | - $checksum = $node->getChecksum(); |
|
| 269 | - if ($checksum !== null && $checksum !== '') { |
|
| 270 | - $response->addHeader('OC-Checksum', $checksum); |
|
| 271 | - } |
|
| 272 | - } |
|
| 273 | - } |
|
| 274 | - |
|
| 275 | - /** |
|
| 276 | - * Adds all ownCloud-specific properties |
|
| 277 | - * |
|
| 278 | - * @param PropFind $propFind |
|
| 279 | - * @param \Sabre\DAV\INode $node |
|
| 280 | - * @return void |
|
| 281 | - */ |
|
| 282 | - public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node) { |
|
| 283 | - |
|
| 284 | - $httpRequest = $this->server->httpRequest; |
|
| 285 | - |
|
| 286 | - if ($node instanceof \OCA\DAV\Connector\Sabre\Node) { |
|
| 287 | - /** |
|
| 288 | - * This was disabled, because it made dir listing throw an exception, |
|
| 289 | - * so users were unable to navigate into folders where one subitem |
|
| 290 | - * is blocked by the files_accesscontrol app, see: |
|
| 291 | - * https://github.com/nextcloud/files_accesscontrol/issues/65 |
|
| 53 | + // namespace |
|
| 54 | + const NS_OWNCLOUD = 'http://owncloud.org/ns'; |
|
| 55 | + const NS_NEXTCLOUD = 'http://nextcloud.org/ns'; |
|
| 56 | + const FILEID_PROPERTYNAME = '{http://owncloud.org/ns}id'; |
|
| 57 | + const INTERNAL_FILEID_PROPERTYNAME = '{http://owncloud.org/ns}fileid'; |
|
| 58 | + const PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}permissions'; |
|
| 59 | + const SHARE_PERMISSIONS_PROPERTYNAME = '{http://open-collaboration-services.org/ns}share-permissions'; |
|
| 60 | + const DOWNLOADURL_PROPERTYNAME = '{http://owncloud.org/ns}downloadURL'; |
|
| 61 | + const SIZE_PROPERTYNAME = '{http://owncloud.org/ns}size'; |
|
| 62 | + const GETETAG_PROPERTYNAME = '{DAV:}getetag'; |
|
| 63 | + const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified'; |
|
| 64 | + const OWNER_ID_PROPERTYNAME = '{http://owncloud.org/ns}owner-id'; |
|
| 65 | + const OWNER_DISPLAY_NAME_PROPERTYNAME = '{http://owncloud.org/ns}owner-display-name'; |
|
| 66 | + const CHECKSUMS_PROPERTYNAME = '{http://owncloud.org/ns}checksums'; |
|
| 67 | + const DATA_FINGERPRINT_PROPERTYNAME = '{http://owncloud.org/ns}data-fingerprint'; |
|
| 68 | + const HAS_PREVIEW_PROPERTYNAME = '{http://nextcloud.org/ns}has-preview'; |
|
| 69 | + const MOUNT_TYPE_PROPERTYNAME = '{http://nextcloud.org/ns}mount-type'; |
|
| 70 | + const IS_ENCRYPTED_PROPERTYNAME = '{http://nextcloud.org/ns}is-encrypted'; |
|
| 71 | + |
|
| 72 | + /** |
|
| 73 | + * Reference to main server object |
|
| 74 | + * |
|
| 75 | + * @var \Sabre\DAV\Server |
|
| 76 | + */ |
|
| 77 | + private $server; |
|
| 78 | + |
|
| 79 | + /** |
|
| 80 | + * @var Tree |
|
| 81 | + */ |
|
| 82 | + private $tree; |
|
| 83 | + |
|
| 84 | + /** |
|
| 85 | + * Whether this is public webdav. |
|
| 86 | + * If true, some returned information will be stripped off. |
|
| 87 | + * |
|
| 88 | + * @var bool |
|
| 89 | + */ |
|
| 90 | + private $isPublic; |
|
| 91 | + |
|
| 92 | + /** |
|
| 93 | + * @var bool |
|
| 94 | + */ |
|
| 95 | + private $downloadAttachment; |
|
| 96 | + |
|
| 97 | + /** |
|
| 98 | + * @var IConfig |
|
| 99 | + */ |
|
| 100 | + private $config; |
|
| 101 | + |
|
| 102 | + /** |
|
| 103 | + * @var IRequest |
|
| 104 | + */ |
|
| 105 | + private $request; |
|
| 106 | + |
|
| 107 | + /** |
|
| 108 | + * @var IPreview |
|
| 109 | + */ |
|
| 110 | + private $previewManager; |
|
| 111 | + |
|
| 112 | + /** |
|
| 113 | + * @param Tree $tree |
|
| 114 | + * @param IConfig $config |
|
| 115 | + * @param IRequest $request |
|
| 116 | + * @param IPreview $previewManager |
|
| 117 | + * @param bool $isPublic |
|
| 118 | + * @param bool $downloadAttachment |
|
| 119 | + */ |
|
| 120 | + public function __construct(Tree $tree, |
|
| 121 | + IConfig $config, |
|
| 122 | + IRequest $request, |
|
| 123 | + IPreview $previewManager, |
|
| 124 | + $isPublic = false, |
|
| 125 | + $downloadAttachment = true) { |
|
| 126 | + $this->tree = $tree; |
|
| 127 | + $this->config = $config; |
|
| 128 | + $this->request = $request; |
|
| 129 | + $this->isPublic = $isPublic; |
|
| 130 | + $this->downloadAttachment = $downloadAttachment; |
|
| 131 | + $this->previewManager = $previewManager; |
|
| 132 | + } |
|
| 133 | + |
|
| 134 | + /** |
|
| 135 | + * This initializes the plugin. |
|
| 136 | + * |
|
| 137 | + * This function is called by \Sabre\DAV\Server, after |
|
| 138 | + * addPlugin is called. |
|
| 139 | + * |
|
| 140 | + * This method should set up the required event subscriptions. |
|
| 141 | + * |
|
| 142 | + * @param \Sabre\DAV\Server $server |
|
| 143 | + * @return void |
|
| 144 | + */ |
|
| 145 | + public function initialize(\Sabre\DAV\Server $server) { |
|
| 146 | + $server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc'; |
|
| 147 | + $server->xml->namespaceMap[self::NS_NEXTCLOUD] = 'nc'; |
|
| 148 | + $server->protectedProperties[] = self::FILEID_PROPERTYNAME; |
|
| 149 | + $server->protectedProperties[] = self::INTERNAL_FILEID_PROPERTYNAME; |
|
| 150 | + $server->protectedProperties[] = self::PERMISSIONS_PROPERTYNAME; |
|
| 151 | + $server->protectedProperties[] = self::SHARE_PERMISSIONS_PROPERTYNAME; |
|
| 152 | + $server->protectedProperties[] = self::SIZE_PROPERTYNAME; |
|
| 153 | + $server->protectedProperties[] = self::DOWNLOADURL_PROPERTYNAME; |
|
| 154 | + $server->protectedProperties[] = self::OWNER_ID_PROPERTYNAME; |
|
| 155 | + $server->protectedProperties[] = self::OWNER_DISPLAY_NAME_PROPERTYNAME; |
|
| 156 | + $server->protectedProperties[] = self::CHECKSUMS_PROPERTYNAME; |
|
| 157 | + $server->protectedProperties[] = self::DATA_FINGERPRINT_PROPERTYNAME; |
|
| 158 | + $server->protectedProperties[] = self::HAS_PREVIEW_PROPERTYNAME; |
|
| 159 | + $server->protectedProperties[] = self::MOUNT_TYPE_PROPERTYNAME; |
|
| 160 | + $server->protectedProperties[] = self::IS_ENCRYPTED_PROPERTYNAME; |
|
| 161 | + |
|
| 162 | + // normally these cannot be changed (RFC4918), but we want them modifiable through PROPPATCH |
|
| 163 | + $allowedProperties = ['{DAV:}getetag']; |
|
| 164 | + $server->protectedProperties = array_diff($server->protectedProperties, $allowedProperties); |
|
| 165 | + |
|
| 166 | + $this->server = $server; |
|
| 167 | + $this->server->on('propFind', array($this, 'handleGetProperties')); |
|
| 168 | + $this->server->on('propPatch', array($this, 'handleUpdateProperties')); |
|
| 169 | + $this->server->on('afterBind', array($this, 'sendFileIdHeader')); |
|
| 170 | + $this->server->on('afterWriteContent', array($this, 'sendFileIdHeader')); |
|
| 171 | + $this->server->on('afterMethod:GET', [$this,'httpGet']); |
|
| 172 | + $this->server->on('afterMethod:GET', array($this, 'handleDownloadToken')); |
|
| 173 | + $this->server->on('afterResponse', function($request, ResponseInterface $response) { |
|
| 174 | + $body = $response->getBody(); |
|
| 175 | + if (is_resource($body)) { |
|
| 176 | + fclose($body); |
|
| 177 | + } |
|
| 178 | + }); |
|
| 179 | + $this->server->on('beforeMove', [$this, 'checkMove']); |
|
| 180 | + } |
|
| 181 | + |
|
| 182 | + /** |
|
| 183 | + * Plugin that checks if a move can actually be performed. |
|
| 184 | + * |
|
| 185 | + * @param string $source source path |
|
| 186 | + * @param string $destination destination path |
|
| 187 | + * @throws Forbidden |
|
| 188 | + * @throws NotFound |
|
| 189 | + */ |
|
| 190 | + function checkMove($source, $destination) { |
|
| 191 | + $sourceNode = $this->tree->getNodeForPath($source); |
|
| 192 | + if (!$sourceNode instanceof Node) { |
|
| 193 | + return; |
|
| 194 | + } |
|
| 195 | + list($sourceDir,) = \Sabre\Uri\split($source); |
|
| 196 | + list($destinationDir,) = \Sabre\Uri\split($destination); |
|
| 197 | + |
|
| 198 | + if ($sourceDir !== $destinationDir) { |
|
| 199 | + $sourceNodeFileInfo = $sourceNode->getFileInfo(); |
|
| 200 | + if ($sourceNodeFileInfo === null) { |
|
| 201 | + throw new NotFound($source . ' does not exist'); |
|
| 202 | + } |
|
| 203 | + |
|
| 204 | + if (!$sourceNodeFileInfo->isDeletable()) { |
|
| 205 | + throw new Forbidden($source . " cannot be deleted"); |
|
| 206 | + } |
|
| 207 | + } |
|
| 208 | + } |
|
| 209 | + |
|
| 210 | + /** |
|
| 211 | + * This sets a cookie to be able to recognize the start of the download |
|
| 212 | + * the content must not be longer than 32 characters and must only contain |
|
| 213 | + * alphanumeric characters |
|
| 214 | + * |
|
| 215 | + * @param RequestInterface $request |
|
| 216 | + * @param ResponseInterface $response |
|
| 217 | + */ |
|
| 218 | + function handleDownloadToken(RequestInterface $request, ResponseInterface $response) { |
|
| 219 | + $queryParams = $request->getQueryParameters(); |
|
| 220 | + |
|
| 221 | + /** |
|
| 222 | + * this sets a cookie to be able to recognize the start of the download |
|
| 223 | + * the content must not be longer than 32 characters and must only contain |
|
| 224 | + * alphanumeric characters |
|
| 225 | + */ |
|
| 226 | + if (isset($queryParams['downloadStartSecret'])) { |
|
| 227 | + $token = $queryParams['downloadStartSecret']; |
|
| 228 | + if (!isset($token[32]) |
|
| 229 | + && preg_match('!^[a-zA-Z0-9]+$!', $token) === 1) { |
|
| 230 | + // FIXME: use $response->setHeader() instead |
|
| 231 | + setcookie('ocDownloadStarted', $token, time() + 20, '/'); |
|
| 232 | + } |
|
| 233 | + } |
|
| 234 | + } |
|
| 235 | + |
|
| 236 | + /** |
|
| 237 | + * Add headers to file download |
|
| 238 | + * |
|
| 239 | + * @param RequestInterface $request |
|
| 240 | + * @param ResponseInterface $response |
|
| 241 | + */ |
|
| 242 | + function httpGet(RequestInterface $request, ResponseInterface $response) { |
|
| 243 | + // Only handle valid files |
|
| 244 | + $node = $this->tree->getNodeForPath($request->getPath()); |
|
| 245 | + if (!($node instanceof IFile)) return; |
|
| 246 | + |
|
| 247 | + // adds a 'Content-Disposition: attachment' header in case no disposition |
|
| 248 | + // header has been set before |
|
| 249 | + if ($this->downloadAttachment && |
|
| 250 | + $response->getHeader('Content-Disposition') === null) { |
|
| 251 | + $filename = $node->getName(); |
|
| 252 | + if ($this->request->isUserAgent( |
|
| 253 | + [ |
|
| 254 | + Request::USER_AGENT_IE, |
|
| 255 | + Request::USER_AGENT_ANDROID_MOBILE_CHROME, |
|
| 256 | + Request::USER_AGENT_FREEBOX, |
|
| 257 | + ])) { |
|
| 258 | + $response->addHeader('Content-Disposition', 'attachment; filename="' . rawurlencode($filename) . '"'); |
|
| 259 | + } else { |
|
| 260 | + $response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\'' . rawurlencode($filename) |
|
| 261 | + . '; filename="' . rawurlencode($filename) . '"'); |
|
| 262 | + } |
|
| 263 | + } |
|
| 264 | + |
|
| 265 | + if ($node instanceof \OCA\DAV\Connector\Sabre\File) { |
|
| 266 | + //Add OC-Checksum header |
|
| 267 | + /** @var $node File */ |
|
| 268 | + $checksum = $node->getChecksum(); |
|
| 269 | + if ($checksum !== null && $checksum !== '') { |
|
| 270 | + $response->addHeader('OC-Checksum', $checksum); |
|
| 271 | + } |
|
| 272 | + } |
|
| 273 | + } |
|
| 274 | + |
|
| 275 | + /** |
|
| 276 | + * Adds all ownCloud-specific properties |
|
| 277 | + * |
|
| 278 | + * @param PropFind $propFind |
|
| 279 | + * @param \Sabre\DAV\INode $node |
|
| 280 | + * @return void |
|
| 281 | + */ |
|
| 282 | + public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node) { |
|
| 283 | + |
|
| 284 | + $httpRequest = $this->server->httpRequest; |
|
| 285 | + |
|
| 286 | + if ($node instanceof \OCA\DAV\Connector\Sabre\Node) { |
|
| 287 | + /** |
|
| 288 | + * This was disabled, because it made dir listing throw an exception, |
|
| 289 | + * so users were unable to navigate into folders where one subitem |
|
| 290 | + * is blocked by the files_accesscontrol app, see: |
|
| 291 | + * https://github.com/nextcloud/files_accesscontrol/issues/65 |
|
| 292 | 292 | if (!$node->getFileInfo()->isReadable()) { |
| 293 | 293 | // avoid detecting files through this means |
| 294 | 294 | throw new NotFound(); |
| 295 | 295 | } |
| 296 | - */ |
|
| 297 | - |
|
| 298 | - $propFind->handle(self::FILEID_PROPERTYNAME, function() use ($node) { |
|
| 299 | - return $node->getFileId(); |
|
| 300 | - }); |
|
| 301 | - |
|
| 302 | - $propFind->handle(self::INTERNAL_FILEID_PROPERTYNAME, function() use ($node) { |
|
| 303 | - return $node->getInternalFileId(); |
|
| 304 | - }); |
|
| 305 | - |
|
| 306 | - $propFind->handle(self::PERMISSIONS_PROPERTYNAME, function() use ($node) { |
|
| 307 | - $perms = $node->getDavPermissions(); |
|
| 308 | - if ($this->isPublic) { |
|
| 309 | - // remove mount information |
|
| 310 | - $perms = str_replace(['S', 'M'], '', $perms); |
|
| 311 | - } |
|
| 312 | - return $perms; |
|
| 313 | - }); |
|
| 314 | - |
|
| 315 | - $propFind->handle(self::SHARE_PERMISSIONS_PROPERTYNAME, function() use ($node, $httpRequest) { |
|
| 316 | - return $node->getSharePermissions( |
|
| 317 | - $httpRequest->getRawServerValue('PHP_AUTH_USER') |
|
| 318 | - ); |
|
| 319 | - }); |
|
| 320 | - |
|
| 321 | - $propFind->handle(self::GETETAG_PROPERTYNAME, function() use ($node) { |
|
| 322 | - return $node->getETag(); |
|
| 323 | - }); |
|
| 324 | - |
|
| 325 | - $propFind->handle(self::OWNER_ID_PROPERTYNAME, function() use ($node) { |
|
| 326 | - $owner = $node->getOwner(); |
|
| 327 | - if (!$owner) { |
|
| 328 | - return null; |
|
| 329 | - } else { |
|
| 330 | - return $owner->getUID(); |
|
| 331 | - } |
|
| 332 | - }); |
|
| 333 | - $propFind->handle(self::OWNER_DISPLAY_NAME_PROPERTYNAME, function() use ($node) { |
|
| 334 | - $owner = $node->getOwner(); |
|
| 335 | - if (!$owner) { |
|
| 336 | - return null; |
|
| 337 | - } else { |
|
| 338 | - return $owner->getDisplayName(); |
|
| 339 | - } |
|
| 340 | - }); |
|
| 341 | - |
|
| 342 | - $propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function() use ($node) { |
|
| 343 | - $result = $node->getFileInfo()->isEncrypted() ? '1' : '0'; |
|
| 344 | - return $result; |
|
| 345 | - }); |
|
| 346 | - |
|
| 347 | - $propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) { |
|
| 348 | - return json_encode($this->previewManager->isAvailable($node->getFileInfo())); |
|
| 349 | - }); |
|
| 350 | - $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) { |
|
| 351 | - return $node->getSize(); |
|
| 352 | - }); |
|
| 353 | - $propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) { |
|
| 354 | - return $node->getFileInfo()->getMountPoint()->getMountType(); |
|
| 355 | - }); |
|
| 356 | - } |
|
| 357 | - |
|
| 358 | - if ($node instanceof \OCA\DAV\Connector\Sabre\Node) { |
|
| 359 | - $propFind->handle(self::DATA_FINGERPRINT_PROPERTYNAME, function() use ($node) { |
|
| 360 | - return $this->config->getSystemValue('data-fingerprint', ''); |
|
| 361 | - }); |
|
| 362 | - } |
|
| 363 | - |
|
| 364 | - if ($node instanceof \OCA\DAV\Connector\Sabre\File) { |
|
| 365 | - $propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function() use ($node) { |
|
| 366 | - /** @var $node \OCA\DAV\Connector\Sabre\File */ |
|
| 367 | - try { |
|
| 368 | - $directDownloadUrl = $node->getDirectDownload(); |
|
| 369 | - if (isset($directDownloadUrl['url'])) { |
|
| 370 | - return $directDownloadUrl['url']; |
|
| 371 | - } |
|
| 372 | - } catch (StorageNotAvailableException $e) { |
|
| 373 | - return false; |
|
| 374 | - } catch (ForbiddenException $e) { |
|
| 375 | - return false; |
|
| 376 | - } |
|
| 377 | - return false; |
|
| 378 | - }); |
|
| 379 | - |
|
| 380 | - $propFind->handle(self::CHECKSUMS_PROPERTYNAME, function() use ($node) { |
|
| 381 | - $checksum = $node->getChecksum(); |
|
| 382 | - if ($checksum === NULL || $checksum === '') { |
|
| 383 | - return null; |
|
| 384 | - } |
|
| 385 | - |
|
| 386 | - return new ChecksumList($checksum); |
|
| 387 | - }); |
|
| 388 | - |
|
| 389 | - } |
|
| 390 | - |
|
| 391 | - if ($node instanceof \OCA\DAV\Connector\Sabre\Directory) { |
|
| 392 | - $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) { |
|
| 393 | - return $node->getSize(); |
|
| 394 | - }); |
|
| 395 | - } |
|
| 396 | - } |
|
| 397 | - |
|
| 398 | - /** |
|
| 399 | - * Update ownCloud-specific properties |
|
| 400 | - * |
|
| 401 | - * @param string $path |
|
| 402 | - * @param PropPatch $propPatch |
|
| 403 | - * |
|
| 404 | - * @return void |
|
| 405 | - */ |
|
| 406 | - public function handleUpdateProperties($path, PropPatch $propPatch) { |
|
| 407 | - $node = $this->tree->getNodeForPath($path); |
|
| 408 | - if (!($node instanceof \OCA\DAV\Connector\Sabre\Node)) { |
|
| 409 | - return; |
|
| 410 | - } |
|
| 411 | - |
|
| 412 | - $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function($time) use ($node) { |
|
| 413 | - if (empty($time)) { |
|
| 414 | - return false; |
|
| 415 | - } |
|
| 416 | - $node->touch($time); |
|
| 417 | - return true; |
|
| 418 | - }); |
|
| 419 | - $propPatch->handle(self::GETETAG_PROPERTYNAME, function($etag) use ($node) { |
|
| 420 | - if (empty($etag)) { |
|
| 421 | - return false; |
|
| 422 | - } |
|
| 423 | - if ($node->setEtag($etag) !== -1) { |
|
| 424 | - return true; |
|
| 425 | - } |
|
| 426 | - return false; |
|
| 427 | - }); |
|
| 428 | - } |
|
| 429 | - |
|
| 430 | - /** |
|
| 431 | - * @param string $filePath |
|
| 432 | - * @param \Sabre\DAV\INode $node |
|
| 433 | - * @throws \Sabre\DAV\Exception\BadRequest |
|
| 434 | - */ |
|
| 435 | - public function sendFileIdHeader($filePath, \Sabre\DAV\INode $node = null) { |
|
| 436 | - // chunked upload handling |
|
| 437 | - if (isset($_SERVER['HTTP_OC_CHUNKED'])) { |
|
| 438 | - list($path, $name) = \Sabre\Uri\split($filePath); |
|
| 439 | - $info = \OC_FileChunking::decodeName($name); |
|
| 440 | - if (!empty($info)) { |
|
| 441 | - $filePath = $path . '/' . $info['name']; |
|
| 442 | - } |
|
| 443 | - } |
|
| 444 | - |
|
| 445 | - // we get the node for the given $filePath here because in case of afterCreateFile $node is the parent folder |
|
| 446 | - if (!$this->server->tree->nodeExists($filePath)) { |
|
| 447 | - return; |
|
| 448 | - } |
|
| 449 | - $node = $this->server->tree->getNodeForPath($filePath); |
|
| 450 | - if ($node instanceof \OCA\DAV\Connector\Sabre\Node) { |
|
| 451 | - $fileId = $node->getFileId(); |
|
| 452 | - if (!is_null($fileId)) { |
|
| 453 | - $this->server->httpResponse->setHeader('OC-FileId', $fileId); |
|
| 454 | - } |
|
| 455 | - } |
|
| 456 | - } |
|
| 296 | + */ |
|
| 297 | + |
|
| 298 | + $propFind->handle(self::FILEID_PROPERTYNAME, function() use ($node) { |
|
| 299 | + return $node->getFileId(); |
|
| 300 | + }); |
|
| 301 | + |
|
| 302 | + $propFind->handle(self::INTERNAL_FILEID_PROPERTYNAME, function() use ($node) { |
|
| 303 | + return $node->getInternalFileId(); |
|
| 304 | + }); |
|
| 305 | + |
|
| 306 | + $propFind->handle(self::PERMISSIONS_PROPERTYNAME, function() use ($node) { |
|
| 307 | + $perms = $node->getDavPermissions(); |
|
| 308 | + if ($this->isPublic) { |
|
| 309 | + // remove mount information |
|
| 310 | + $perms = str_replace(['S', 'M'], '', $perms); |
|
| 311 | + } |
|
| 312 | + return $perms; |
|
| 313 | + }); |
|
| 314 | + |
|
| 315 | + $propFind->handle(self::SHARE_PERMISSIONS_PROPERTYNAME, function() use ($node, $httpRequest) { |
|
| 316 | + return $node->getSharePermissions( |
|
| 317 | + $httpRequest->getRawServerValue('PHP_AUTH_USER') |
|
| 318 | + ); |
|
| 319 | + }); |
|
| 320 | + |
|
| 321 | + $propFind->handle(self::GETETAG_PROPERTYNAME, function() use ($node) { |
|
| 322 | + return $node->getETag(); |
|
| 323 | + }); |
|
| 324 | + |
|
| 325 | + $propFind->handle(self::OWNER_ID_PROPERTYNAME, function() use ($node) { |
|
| 326 | + $owner = $node->getOwner(); |
|
| 327 | + if (!$owner) { |
|
| 328 | + return null; |
|
| 329 | + } else { |
|
| 330 | + return $owner->getUID(); |
|
| 331 | + } |
|
| 332 | + }); |
|
| 333 | + $propFind->handle(self::OWNER_DISPLAY_NAME_PROPERTYNAME, function() use ($node) { |
|
| 334 | + $owner = $node->getOwner(); |
|
| 335 | + if (!$owner) { |
|
| 336 | + return null; |
|
| 337 | + } else { |
|
| 338 | + return $owner->getDisplayName(); |
|
| 339 | + } |
|
| 340 | + }); |
|
| 341 | + |
|
| 342 | + $propFind->handle(self::IS_ENCRYPTED_PROPERTYNAME, function() use ($node) { |
|
| 343 | + $result = $node->getFileInfo()->isEncrypted() ? '1' : '0'; |
|
| 344 | + return $result; |
|
| 345 | + }); |
|
| 346 | + |
|
| 347 | + $propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) { |
|
| 348 | + return json_encode($this->previewManager->isAvailable($node->getFileInfo())); |
|
| 349 | + }); |
|
| 350 | + $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) { |
|
| 351 | + return $node->getSize(); |
|
| 352 | + }); |
|
| 353 | + $propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) { |
|
| 354 | + return $node->getFileInfo()->getMountPoint()->getMountType(); |
|
| 355 | + }); |
|
| 356 | + } |
|
| 357 | + |
|
| 358 | + if ($node instanceof \OCA\DAV\Connector\Sabre\Node) { |
|
| 359 | + $propFind->handle(self::DATA_FINGERPRINT_PROPERTYNAME, function() use ($node) { |
|
| 360 | + return $this->config->getSystemValue('data-fingerprint', ''); |
|
| 361 | + }); |
|
| 362 | + } |
|
| 363 | + |
|
| 364 | + if ($node instanceof \OCA\DAV\Connector\Sabre\File) { |
|
| 365 | + $propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function() use ($node) { |
|
| 366 | + /** @var $node \OCA\DAV\Connector\Sabre\File */ |
|
| 367 | + try { |
|
| 368 | + $directDownloadUrl = $node->getDirectDownload(); |
|
| 369 | + if (isset($directDownloadUrl['url'])) { |
|
| 370 | + return $directDownloadUrl['url']; |
|
| 371 | + } |
|
| 372 | + } catch (StorageNotAvailableException $e) { |
|
| 373 | + return false; |
|
| 374 | + } catch (ForbiddenException $e) { |
|
| 375 | + return false; |
|
| 376 | + } |
|
| 377 | + return false; |
|
| 378 | + }); |
|
| 379 | + |
|
| 380 | + $propFind->handle(self::CHECKSUMS_PROPERTYNAME, function() use ($node) { |
|
| 381 | + $checksum = $node->getChecksum(); |
|
| 382 | + if ($checksum === NULL || $checksum === '') { |
|
| 383 | + return null; |
|
| 384 | + } |
|
| 385 | + |
|
| 386 | + return new ChecksumList($checksum); |
|
| 387 | + }); |
|
| 388 | + |
|
| 389 | + } |
|
| 390 | + |
|
| 391 | + if ($node instanceof \OCA\DAV\Connector\Sabre\Directory) { |
|
| 392 | + $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) { |
|
| 393 | + return $node->getSize(); |
|
| 394 | + }); |
|
| 395 | + } |
|
| 396 | + } |
|
| 397 | + |
|
| 398 | + /** |
|
| 399 | + * Update ownCloud-specific properties |
|
| 400 | + * |
|
| 401 | + * @param string $path |
|
| 402 | + * @param PropPatch $propPatch |
|
| 403 | + * |
|
| 404 | + * @return void |
|
| 405 | + */ |
|
| 406 | + public function handleUpdateProperties($path, PropPatch $propPatch) { |
|
| 407 | + $node = $this->tree->getNodeForPath($path); |
|
| 408 | + if (!($node instanceof \OCA\DAV\Connector\Sabre\Node)) { |
|
| 409 | + return; |
|
| 410 | + } |
|
| 411 | + |
|
| 412 | + $propPatch->handle(self::LASTMODIFIED_PROPERTYNAME, function($time) use ($node) { |
|
| 413 | + if (empty($time)) { |
|
| 414 | + return false; |
|
| 415 | + } |
|
| 416 | + $node->touch($time); |
|
| 417 | + return true; |
|
| 418 | + }); |
|
| 419 | + $propPatch->handle(self::GETETAG_PROPERTYNAME, function($etag) use ($node) { |
|
| 420 | + if (empty($etag)) { |
|
| 421 | + return false; |
|
| 422 | + } |
|
| 423 | + if ($node->setEtag($etag) !== -1) { |
|
| 424 | + return true; |
|
| 425 | + } |
|
| 426 | + return false; |
|
| 427 | + }); |
|
| 428 | + } |
|
| 429 | + |
|
| 430 | + /** |
|
| 431 | + * @param string $filePath |
|
| 432 | + * @param \Sabre\DAV\INode $node |
|
| 433 | + * @throws \Sabre\DAV\Exception\BadRequest |
|
| 434 | + */ |
|
| 435 | + public function sendFileIdHeader($filePath, \Sabre\DAV\INode $node = null) { |
|
| 436 | + // chunked upload handling |
|
| 437 | + if (isset($_SERVER['HTTP_OC_CHUNKED'])) { |
|
| 438 | + list($path, $name) = \Sabre\Uri\split($filePath); |
|
| 439 | + $info = \OC_FileChunking::decodeName($name); |
|
| 440 | + if (!empty($info)) { |
|
| 441 | + $filePath = $path . '/' . $info['name']; |
|
| 442 | + } |
|
| 443 | + } |
|
| 444 | + |
|
| 445 | + // we get the node for the given $filePath here because in case of afterCreateFile $node is the parent folder |
|
| 446 | + if (!$this->server->tree->nodeExists($filePath)) { |
|
| 447 | + return; |
|
| 448 | + } |
|
| 449 | + $node = $this->server->tree->getNodeForPath($filePath); |
|
| 450 | + if ($node instanceof \OCA\DAV\Connector\Sabre\Node) { |
|
| 451 | + $fileId = $node->getFileId(); |
|
| 452 | + if (!is_null($fileId)) { |
|
| 453 | + $this->server->httpResponse->setHeader('OC-FileId', $fileId); |
|
| 454 | + } |
|
| 455 | + } |
|
| 456 | + } |
|
| 457 | 457 | } |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $this->server->on('propPatch', array($this, 'handleUpdateProperties')); |
| 169 | 169 | $this->server->on('afterBind', array($this, 'sendFileIdHeader')); |
| 170 | 170 | $this->server->on('afterWriteContent', array($this, 'sendFileIdHeader')); |
| 171 | - $this->server->on('afterMethod:GET', [$this,'httpGet']); |
|
| 171 | + $this->server->on('afterMethod:GET', [$this, 'httpGet']); |
|
| 172 | 172 | $this->server->on('afterMethod:GET', array($this, 'handleDownloadToken')); |
| 173 | 173 | $this->server->on('afterResponse', function($request, ResponseInterface $response) { |
| 174 | 174 | $body = $response->getBody(); |
@@ -198,11 +198,11 @@ discard block |
||
| 198 | 198 | if ($sourceDir !== $destinationDir) { |
| 199 | 199 | $sourceNodeFileInfo = $sourceNode->getFileInfo(); |
| 200 | 200 | if ($sourceNodeFileInfo === null) { |
| 201 | - throw new NotFound($source . ' does not exist'); |
|
| 201 | + throw new NotFound($source.' does not exist'); |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | if (!$sourceNodeFileInfo->isDeletable()) { |
| 205 | - throw new Forbidden($source . " cannot be deleted"); |
|
| 205 | + throw new Forbidden($source." cannot be deleted"); |
|
| 206 | 206 | } |
| 207 | 207 | } |
| 208 | 208 | } |
@@ -255,10 +255,10 @@ discard block |
||
| 255 | 255 | Request::USER_AGENT_ANDROID_MOBILE_CHROME, |
| 256 | 256 | Request::USER_AGENT_FREEBOX, |
| 257 | 257 | ])) { |
| 258 | - $response->addHeader('Content-Disposition', 'attachment; filename="' . rawurlencode($filename) . '"'); |
|
| 258 | + $response->addHeader('Content-Disposition', 'attachment; filename="'.rawurlencode($filename).'"'); |
|
| 259 | 259 | } else { |
| 260 | - $response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\'' . rawurlencode($filename) |
|
| 261 | - . '; filename="' . rawurlencode($filename) . '"'); |
|
| 260 | + $response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\''.rawurlencode($filename) |
|
| 261 | + . '; filename="'.rawurlencode($filename).'"'); |
|
| 262 | 262 | } |
| 263 | 263 | } |
| 264 | 264 | |
@@ -344,13 +344,13 @@ discard block |
||
| 344 | 344 | return $result; |
| 345 | 345 | }); |
| 346 | 346 | |
| 347 | - $propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) { |
|
| 347 | + $propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function() use ($node) { |
|
| 348 | 348 | return json_encode($this->previewManager->isAvailable($node->getFileInfo())); |
| 349 | 349 | }); |
| 350 | 350 | $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) { |
| 351 | 351 | return $node->getSize(); |
| 352 | 352 | }); |
| 353 | - $propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) { |
|
| 353 | + $propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function() use ($node) { |
|
| 354 | 354 | return $node->getFileInfo()->getMountPoint()->getMountType(); |
| 355 | 355 | }); |
| 356 | 356 | } |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | list($path, $name) = \Sabre\Uri\split($filePath); |
| 439 | 439 | $info = \OC_FileChunking::decodeName($name); |
| 440 | 440 | if (!empty($info)) { |
| 441 | - $filePath = $path . '/' . $info['name']; |
|
| 441 | + $filePath = $path.'/'.$info['name']; |
|
| 442 | 442 | } |
| 443 | 443 | } |
| 444 | 444 | |
@@ -66,220 +66,220 @@ |
||
| 66 | 66 | |
| 67 | 67 | class Server { |
| 68 | 68 | |
| 69 | - /** @var IRequest */ |
|
| 70 | - private $request; |
|
| 69 | + /** @var IRequest */ |
|
| 70 | + private $request; |
|
| 71 | 71 | |
| 72 | - /** @var string */ |
|
| 73 | - private $baseUri; |
|
| 72 | + /** @var string */ |
|
| 73 | + private $baseUri; |
|
| 74 | 74 | |
| 75 | - /** @var Connector\Sabre\Server */ |
|
| 76 | - private $server; |
|
| 75 | + /** @var Connector\Sabre\Server */ |
|
| 76 | + private $server; |
|
| 77 | 77 | |
| 78 | - public function __construct(IRequest $request, $baseUri) { |
|
| 79 | - $this->request = $request; |
|
| 80 | - $this->baseUri = $baseUri; |
|
| 81 | - $logger = \OC::$server->getLogger(); |
|
| 82 | - $dispatcher = \OC::$server->getEventDispatcher(); |
|
| 83 | - $sendInvitations = \OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes'; |
|
| 78 | + public function __construct(IRequest $request, $baseUri) { |
|
| 79 | + $this->request = $request; |
|
| 80 | + $this->baseUri = $baseUri; |
|
| 81 | + $logger = \OC::$server->getLogger(); |
|
| 82 | + $dispatcher = \OC::$server->getEventDispatcher(); |
|
| 83 | + $sendInvitations = \OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes'; |
|
| 84 | 84 | |
| 85 | - $root = new RootCollection(); |
|
| 86 | - $this->server = new \OCA\DAV\Connector\Sabre\Server(new CachingTree($root)); |
|
| 85 | + $root = new RootCollection(); |
|
| 86 | + $this->server = new \OCA\DAV\Connector\Sabre\Server(new CachingTree($root)); |
|
| 87 | 87 | |
| 88 | - // Add maintenance plugin |
|
| 89 | - $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\MaintenancePlugin(\OC::$server->getConfig())); |
|
| 88 | + // Add maintenance plugin |
|
| 89 | + $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\MaintenancePlugin(\OC::$server->getConfig())); |
|
| 90 | 90 | |
| 91 | - // Backends |
|
| 92 | - $authBackend = new Auth( |
|
| 93 | - \OC::$server->getSession(), |
|
| 94 | - \OC::$server->getUserSession(), |
|
| 95 | - \OC::$server->getRequest(), |
|
| 96 | - \OC::$server->getTwoFactorAuthManager(), |
|
| 97 | - \OC::$server->getBruteForceThrottler() |
|
| 98 | - ); |
|
| 91 | + // Backends |
|
| 92 | + $authBackend = new Auth( |
|
| 93 | + \OC::$server->getSession(), |
|
| 94 | + \OC::$server->getUserSession(), |
|
| 95 | + \OC::$server->getRequest(), |
|
| 96 | + \OC::$server->getTwoFactorAuthManager(), |
|
| 97 | + \OC::$server->getBruteForceThrottler() |
|
| 98 | + ); |
|
| 99 | 99 | |
| 100 | - // Set URL explicitly due to reverse-proxy situations |
|
| 101 | - $this->server->httpRequest->setUrl($this->request->getRequestUri()); |
|
| 102 | - $this->server->setBaseUri($this->baseUri); |
|
| 100 | + // Set URL explicitly due to reverse-proxy situations |
|
| 101 | + $this->server->httpRequest->setUrl($this->request->getRequestUri()); |
|
| 102 | + $this->server->setBaseUri($this->baseUri); |
|
| 103 | 103 | |
| 104 | - $this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig())); |
|
| 105 | - $authPlugin = new Plugin(); |
|
| 106 | - $authPlugin->addBackend(new PublicAuth()); |
|
| 107 | - $this->server->addPlugin($authPlugin); |
|
| 104 | + $this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig())); |
|
| 105 | + $authPlugin = new Plugin(); |
|
| 106 | + $authPlugin->addBackend(new PublicAuth()); |
|
| 107 | + $this->server->addPlugin($authPlugin); |
|
| 108 | 108 | |
| 109 | - // allow setup of additional auth backends |
|
| 110 | - $event = new SabrePluginEvent($this->server); |
|
| 111 | - $dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event); |
|
| 109 | + // allow setup of additional auth backends |
|
| 110 | + $event = new SabrePluginEvent($this->server); |
|
| 111 | + $dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event); |
|
| 112 | 112 | |
| 113 | - $bearerAuthBackend = new BearerAuth( |
|
| 114 | - \OC::$server->getUserSession(), |
|
| 115 | - \OC::$server->getSession(), |
|
| 116 | - \OC::$server->getRequest() |
|
| 117 | - ); |
|
| 118 | - $authPlugin->addBackend($bearerAuthBackend); |
|
| 119 | - // because we are throwing exceptions this plugin has to be the last one |
|
| 120 | - $authPlugin->addBackend($authBackend); |
|
| 113 | + $bearerAuthBackend = new BearerAuth( |
|
| 114 | + \OC::$server->getUserSession(), |
|
| 115 | + \OC::$server->getSession(), |
|
| 116 | + \OC::$server->getRequest() |
|
| 117 | + ); |
|
| 118 | + $authPlugin->addBackend($bearerAuthBackend); |
|
| 119 | + // because we are throwing exceptions this plugin has to be the last one |
|
| 120 | + $authPlugin->addBackend($authBackend); |
|
| 121 | 121 | |
| 122 | - // debugging |
|
| 123 | - if(\OC::$server->getConfig()->getSystemValue('debug', false)) { |
|
| 124 | - $this->server->addPlugin(new \Sabre\DAV\Browser\Plugin()); |
|
| 125 | - } else { |
|
| 126 | - $this->server->addPlugin(new DummyGetResponsePlugin()); |
|
| 127 | - } |
|
| 122 | + // debugging |
|
| 123 | + if(\OC::$server->getConfig()->getSystemValue('debug', false)) { |
|
| 124 | + $this->server->addPlugin(new \Sabre\DAV\Browser\Plugin()); |
|
| 125 | + } else { |
|
| 126 | + $this->server->addPlugin(new DummyGetResponsePlugin()); |
|
| 127 | + } |
|
| 128 | 128 | |
| 129 | - $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $logger)); |
|
| 130 | - $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin()); |
|
| 131 | - $this->server->addPlugin(new \Sabre\DAV\Sync\Plugin()); |
|
| 129 | + $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $logger)); |
|
| 130 | + $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin()); |
|
| 131 | + $this->server->addPlugin(new \Sabre\DAV\Sync\Plugin()); |
|
| 132 | 132 | |
| 133 | - // acl |
|
| 134 | - $acl = new DavAclPlugin(); |
|
| 135 | - $acl->principalCollectionSet = [ |
|
| 136 | - 'principals/users', 'principals/groups' |
|
| 137 | - ]; |
|
| 138 | - $acl->defaultUsernamePath = 'principals/users'; |
|
| 139 | - $this->server->addPlugin($acl); |
|
| 133 | + // acl |
|
| 134 | + $acl = new DavAclPlugin(); |
|
| 135 | + $acl->principalCollectionSet = [ |
|
| 136 | + 'principals/users', 'principals/groups' |
|
| 137 | + ]; |
|
| 138 | + $acl->defaultUsernamePath = 'principals/users'; |
|
| 139 | + $this->server->addPlugin($acl); |
|
| 140 | 140 | |
| 141 | - // calendar plugins |
|
| 142 | - $this->server->addPlugin(new \OCA\DAV\CalDAV\Plugin()); |
|
| 143 | - $this->server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin()); |
|
| 144 | - $this->server->addPlugin(new \OCA\DAV\CalDAV\Schedule\Plugin()); |
|
| 145 | - if ($sendInvitations) { |
|
| 146 | - $this->server->addPlugin(\OC::$server->query(\OCA\DAV\CalDAV\Schedule\IMipPlugin::class)); |
|
| 147 | - } |
|
| 148 | - $this->server->addPlugin(new \Sabre\CalDAV\Subscriptions\Plugin()); |
|
| 149 | - $this->server->addPlugin(new \Sabre\CalDAV\Notifications\Plugin()); |
|
| 150 | - $this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest())); |
|
| 151 | - $this->server->addPlugin(new \OCA\DAV\CalDAV\Publishing\PublishPlugin( |
|
| 152 | - \OC::$server->getConfig(), |
|
| 153 | - \OC::$server->getURLGenerator() |
|
| 154 | - )); |
|
| 141 | + // calendar plugins |
|
| 142 | + $this->server->addPlugin(new \OCA\DAV\CalDAV\Plugin()); |
|
| 143 | + $this->server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin()); |
|
| 144 | + $this->server->addPlugin(new \OCA\DAV\CalDAV\Schedule\Plugin()); |
|
| 145 | + if ($sendInvitations) { |
|
| 146 | + $this->server->addPlugin(\OC::$server->query(\OCA\DAV\CalDAV\Schedule\IMipPlugin::class)); |
|
| 147 | + } |
|
| 148 | + $this->server->addPlugin(new \Sabre\CalDAV\Subscriptions\Plugin()); |
|
| 149 | + $this->server->addPlugin(new \Sabre\CalDAV\Notifications\Plugin()); |
|
| 150 | + $this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest())); |
|
| 151 | + $this->server->addPlugin(new \OCA\DAV\CalDAV\Publishing\PublishPlugin( |
|
| 152 | + \OC::$server->getConfig(), |
|
| 153 | + \OC::$server->getURLGenerator() |
|
| 154 | + )); |
|
| 155 | 155 | |
| 156 | - // addressbook plugins |
|
| 157 | - $this->server->addPlugin(new \OCA\DAV\CardDAV\Plugin()); |
|
| 158 | - $this->server->addPlugin(new VCFExportPlugin()); |
|
| 159 | - $this->server->addPlugin(new ImageExportPlugin(new PhotoCache(\OC::$server->getAppDataDir('dav-photocache')))); |
|
| 156 | + // addressbook plugins |
|
| 157 | + $this->server->addPlugin(new \OCA\DAV\CardDAV\Plugin()); |
|
| 158 | + $this->server->addPlugin(new VCFExportPlugin()); |
|
| 159 | + $this->server->addPlugin(new ImageExportPlugin(new PhotoCache(\OC::$server->getAppDataDir('dav-photocache')))); |
|
| 160 | 160 | |
| 161 | - // system tags plugins |
|
| 162 | - $this->server->addPlugin(new SystemTagPlugin( |
|
| 163 | - \OC::$server->getSystemTagManager(), |
|
| 164 | - \OC::$server->getGroupManager(), |
|
| 165 | - \OC::$server->getUserSession() |
|
| 166 | - )); |
|
| 161 | + // system tags plugins |
|
| 162 | + $this->server->addPlugin(new SystemTagPlugin( |
|
| 163 | + \OC::$server->getSystemTagManager(), |
|
| 164 | + \OC::$server->getGroupManager(), |
|
| 165 | + \OC::$server->getUserSession() |
|
| 166 | + )); |
|
| 167 | 167 | |
| 168 | - // comments plugin |
|
| 169 | - $this->server->addPlugin(new CommentsPlugin( |
|
| 170 | - \OC::$server->getCommentsManager(), |
|
| 171 | - \OC::$server->getUserSession() |
|
| 172 | - )); |
|
| 168 | + // comments plugin |
|
| 169 | + $this->server->addPlugin(new CommentsPlugin( |
|
| 170 | + \OC::$server->getCommentsManager(), |
|
| 171 | + \OC::$server->getUserSession() |
|
| 172 | + )); |
|
| 173 | 173 | |
| 174 | - $this->server->addPlugin(new CopyEtagHeaderPlugin()); |
|
| 175 | - $this->server->addPlugin(new ChunkingPlugin()); |
|
| 174 | + $this->server->addPlugin(new CopyEtagHeaderPlugin()); |
|
| 175 | + $this->server->addPlugin(new ChunkingPlugin()); |
|
| 176 | 176 | |
| 177 | - // allow setup of additional plugins |
|
| 178 | - $dispatcher->dispatch('OCA\DAV\Connector\Sabre::addPlugin', $event); |
|
| 177 | + // allow setup of additional plugins |
|
| 178 | + $dispatcher->dispatch('OCA\DAV\Connector\Sabre::addPlugin', $event); |
|
| 179 | 179 | |
| 180 | - // Some WebDAV clients do require Class 2 WebDAV support (locking), since |
|
| 181 | - // we do not provide locking we emulate it using a fake locking plugin. |
|
| 182 | - if($request->isUserAgent([ |
|
| 183 | - '/WebDAVFS/', |
|
| 184 | - '/Microsoft Office OneNote 2013/', |
|
| 185 | - '/^Microsoft-WebDAV/',// Microsoft-WebDAV-MiniRedir/6.1.7601 |
|
| 186 | - ])) { |
|
| 187 | - $this->server->addPlugin(new FakeLockerPlugin()); |
|
| 188 | - } |
|
| 180 | + // Some WebDAV clients do require Class 2 WebDAV support (locking), since |
|
| 181 | + // we do not provide locking we emulate it using a fake locking plugin. |
|
| 182 | + if($request->isUserAgent([ |
|
| 183 | + '/WebDAVFS/', |
|
| 184 | + '/Microsoft Office OneNote 2013/', |
|
| 185 | + '/^Microsoft-WebDAV/',// Microsoft-WebDAV-MiniRedir/6.1.7601 |
|
| 186 | + ])) { |
|
| 187 | + $this->server->addPlugin(new FakeLockerPlugin()); |
|
| 188 | + } |
|
| 189 | 189 | |
| 190 | - if (BrowserErrorPagePlugin::isBrowserRequest($request)) { |
|
| 191 | - $this->server->addPlugin(new BrowserErrorPagePlugin()); |
|
| 192 | - } |
|
| 190 | + if (BrowserErrorPagePlugin::isBrowserRequest($request)) { |
|
| 191 | + $this->server->addPlugin(new BrowserErrorPagePlugin()); |
|
| 192 | + } |
|
| 193 | 193 | |
| 194 | - // wait with registering these until auth is handled and the filesystem is setup |
|
| 195 | - $this->server->on('beforeMethod', function () use ($root) { |
|
| 196 | - // custom properties plugin must be the last one |
|
| 197 | - $userSession = \OC::$server->getUserSession(); |
|
| 198 | - $user = $userSession->getUser(); |
|
| 199 | - if ($user !== null) { |
|
| 200 | - $view = \OC\Files\Filesystem::getView(); |
|
| 201 | - $this->server->addPlugin( |
|
| 202 | - new FilesPlugin( |
|
| 203 | - $this->server->tree, |
|
| 204 | - \OC::$server->getConfig(), |
|
| 205 | - $this->request, |
|
| 206 | - \OC::$server->getPreviewManager(), |
|
| 207 | - false, |
|
| 208 | - !\OC::$server->getConfig()->getSystemValue('debug', false) |
|
| 209 | - ) |
|
| 210 | - ); |
|
| 194 | + // wait with registering these until auth is handled and the filesystem is setup |
|
| 195 | + $this->server->on('beforeMethod', function () use ($root) { |
|
| 196 | + // custom properties plugin must be the last one |
|
| 197 | + $userSession = \OC::$server->getUserSession(); |
|
| 198 | + $user = $userSession->getUser(); |
|
| 199 | + if ($user !== null) { |
|
| 200 | + $view = \OC\Files\Filesystem::getView(); |
|
| 201 | + $this->server->addPlugin( |
|
| 202 | + new FilesPlugin( |
|
| 203 | + $this->server->tree, |
|
| 204 | + \OC::$server->getConfig(), |
|
| 205 | + $this->request, |
|
| 206 | + \OC::$server->getPreviewManager(), |
|
| 207 | + false, |
|
| 208 | + !\OC::$server->getConfig()->getSystemValue('debug', false) |
|
| 209 | + ) |
|
| 210 | + ); |
|
| 211 | 211 | |
| 212 | - $this->server->addPlugin( |
|
| 213 | - new \Sabre\DAV\PropertyStorage\Plugin( |
|
| 214 | - new CustomPropertiesBackend( |
|
| 215 | - $this->server->tree, |
|
| 216 | - \OC::$server->getDatabaseConnection(), |
|
| 217 | - \OC::$server->getUserSession()->getUser() |
|
| 218 | - ) |
|
| 219 | - ) |
|
| 220 | - ); |
|
| 221 | - if ($view !== null) { |
|
| 222 | - $this->server->addPlugin( |
|
| 223 | - new QuotaPlugin($view, false)); |
|
| 224 | - } |
|
| 225 | - $this->server->addPlugin( |
|
| 226 | - new TagsPlugin( |
|
| 227 | - $this->server->tree, \OC::$server->getTagManager() |
|
| 228 | - ) |
|
| 229 | - ); |
|
| 230 | - // TODO: switch to LazyUserFolder |
|
| 231 | - $userFolder = \OC::$server->getUserFolder(); |
|
| 232 | - $this->server->addPlugin(new SharesPlugin( |
|
| 233 | - $this->server->tree, |
|
| 234 | - $userSession, |
|
| 235 | - $userFolder, |
|
| 236 | - \OC::$server->getShareManager() |
|
| 237 | - )); |
|
| 238 | - $this->server->addPlugin(new CommentPropertiesPlugin( |
|
| 239 | - \OC::$server->getCommentsManager(), |
|
| 240 | - $userSession |
|
| 241 | - )); |
|
| 242 | - $this->server->addPlugin(new \OCA\DAV\CalDAV\Search\SearchPlugin()); |
|
| 243 | - if ($view !== null) { |
|
| 244 | - $this->server->addPlugin(new FilesReportPlugin( |
|
| 245 | - $this->server->tree, |
|
| 246 | - $view, |
|
| 247 | - \OC::$server->getSystemTagManager(), |
|
| 248 | - \OC::$server->getSystemTagObjectMapper(), |
|
| 249 | - \OC::$server->getTagManager(), |
|
| 250 | - $userSession, |
|
| 251 | - \OC::$server->getGroupManager(), |
|
| 252 | - $userFolder |
|
| 253 | - )); |
|
| 254 | - $this->server->addPlugin(new SearchPlugin(new \OCA\DAV\Files\FileSearchBackend( |
|
| 255 | - $this->server->tree, |
|
| 256 | - $user, |
|
| 257 | - \OC::$server->getRootFolder(), |
|
| 258 | - \OC::$server->getShareManager(), |
|
| 259 | - $view |
|
| 260 | - ))); |
|
| 261 | - } |
|
| 262 | - $this->server->addPlugin(new \OCA\DAV\CalDAV\BirthdayCalendar\EnablePlugin( |
|
| 263 | - \OC::$server->getConfig(), |
|
| 264 | - \OC::$server->query(BirthdayService::class) |
|
| 265 | - )); |
|
| 266 | - } |
|
| 212 | + $this->server->addPlugin( |
|
| 213 | + new \Sabre\DAV\PropertyStorage\Plugin( |
|
| 214 | + new CustomPropertiesBackend( |
|
| 215 | + $this->server->tree, |
|
| 216 | + \OC::$server->getDatabaseConnection(), |
|
| 217 | + \OC::$server->getUserSession()->getUser() |
|
| 218 | + ) |
|
| 219 | + ) |
|
| 220 | + ); |
|
| 221 | + if ($view !== null) { |
|
| 222 | + $this->server->addPlugin( |
|
| 223 | + new QuotaPlugin($view, false)); |
|
| 224 | + } |
|
| 225 | + $this->server->addPlugin( |
|
| 226 | + new TagsPlugin( |
|
| 227 | + $this->server->tree, \OC::$server->getTagManager() |
|
| 228 | + ) |
|
| 229 | + ); |
|
| 230 | + // TODO: switch to LazyUserFolder |
|
| 231 | + $userFolder = \OC::$server->getUserFolder(); |
|
| 232 | + $this->server->addPlugin(new SharesPlugin( |
|
| 233 | + $this->server->tree, |
|
| 234 | + $userSession, |
|
| 235 | + $userFolder, |
|
| 236 | + \OC::$server->getShareManager() |
|
| 237 | + )); |
|
| 238 | + $this->server->addPlugin(new CommentPropertiesPlugin( |
|
| 239 | + \OC::$server->getCommentsManager(), |
|
| 240 | + $userSession |
|
| 241 | + )); |
|
| 242 | + $this->server->addPlugin(new \OCA\DAV\CalDAV\Search\SearchPlugin()); |
|
| 243 | + if ($view !== null) { |
|
| 244 | + $this->server->addPlugin(new FilesReportPlugin( |
|
| 245 | + $this->server->tree, |
|
| 246 | + $view, |
|
| 247 | + \OC::$server->getSystemTagManager(), |
|
| 248 | + \OC::$server->getSystemTagObjectMapper(), |
|
| 249 | + \OC::$server->getTagManager(), |
|
| 250 | + $userSession, |
|
| 251 | + \OC::$server->getGroupManager(), |
|
| 252 | + $userFolder |
|
| 253 | + )); |
|
| 254 | + $this->server->addPlugin(new SearchPlugin(new \OCA\DAV\Files\FileSearchBackend( |
|
| 255 | + $this->server->tree, |
|
| 256 | + $user, |
|
| 257 | + \OC::$server->getRootFolder(), |
|
| 258 | + \OC::$server->getShareManager(), |
|
| 259 | + $view |
|
| 260 | + ))); |
|
| 261 | + } |
|
| 262 | + $this->server->addPlugin(new \OCA\DAV\CalDAV\BirthdayCalendar\EnablePlugin( |
|
| 263 | + \OC::$server->getConfig(), |
|
| 264 | + \OC::$server->query(BirthdayService::class) |
|
| 265 | + )); |
|
| 266 | + } |
|
| 267 | 267 | |
| 268 | - // register plugins from apps |
|
| 269 | - $pluginManager = new PluginManager( |
|
| 270 | - \OC::$server, |
|
| 271 | - \OC::$server->getAppManager() |
|
| 272 | - ); |
|
| 273 | - foreach ($pluginManager->getAppPlugins() as $appPlugin) { |
|
| 274 | - $this->server->addPlugin($appPlugin); |
|
| 275 | - } |
|
| 276 | - foreach ($pluginManager->getAppCollections() as $appCollection) { |
|
| 277 | - $root->addChild($appCollection); |
|
| 278 | - } |
|
| 279 | - }); |
|
| 280 | - } |
|
| 268 | + // register plugins from apps |
|
| 269 | + $pluginManager = new PluginManager( |
|
| 270 | + \OC::$server, |
|
| 271 | + \OC::$server->getAppManager() |
|
| 272 | + ); |
|
| 273 | + foreach ($pluginManager->getAppPlugins() as $appPlugin) { |
|
| 274 | + $this->server->addPlugin($appPlugin); |
|
| 275 | + } |
|
| 276 | + foreach ($pluginManager->getAppCollections() as $appCollection) { |
|
| 277 | + $root->addChild($appCollection); |
|
| 278 | + } |
|
| 279 | + }); |
|
| 280 | + } |
|
| 281 | 281 | |
| 282 | - public function exec() { |
|
| 283 | - $this->server->exec(); |
|
| 284 | - } |
|
| 282 | + public function exec() { |
|
| 283 | + $this->server->exec(); |
|
| 284 | + } |
|
| 285 | 285 | } |
@@ -6,147 +6,147 @@ |
||
| 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\\GenerateBirthdayCalendarBackgroundJob' => $baseDir . '/../lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php', |
|
| 15 | - 'OCA\\DAV\\CalDAV\\Activity\\Backend' => $baseDir . '/../lib/CalDAV/Activity/Backend.php', |
|
| 16 | - 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Calendar' => $baseDir . '/../lib/CalDAV/Activity/Filter/Calendar.php', |
|
| 17 | - 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Todo' => $baseDir . '/../lib/CalDAV/Activity/Filter/Todo.php', |
|
| 18 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Base' => $baseDir . '/../lib/CalDAV/Activity/Provider/Base.php', |
|
| 19 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => $baseDir . '/../lib/CalDAV/Activity/Provider/Calendar.php', |
|
| 20 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => $baseDir . '/../lib/CalDAV/Activity/Provider/Event.php', |
|
| 21 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => $baseDir . '/../lib/CalDAV/Activity/Provider/Todo.php', |
|
| 22 | - 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => $baseDir . '/../lib/CalDAV/Activity/Setting/Calendar.php', |
|
| 23 | - 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => $baseDir . '/../lib/CalDAV/Activity/Setting/Event.php', |
|
| 24 | - 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => $baseDir . '/../lib/CalDAV/Activity/Setting/Todo.php', |
|
| 25 | - 'OCA\\DAV\\CalDAV\\BirthdayCalendar\\EnablePlugin' => $baseDir . '/../lib/CalDAV/BirthdayCalendar/EnablePlugin.php', |
|
| 26 | - 'OCA\\DAV\\CalDAV\\BirthdayService' => $baseDir . '/../lib/CalDAV/BirthdayService.php', |
|
| 27 | - 'OCA\\DAV\\CalDAV\\CalDavBackend' => $baseDir . '/../lib/CalDAV/CalDavBackend.php', |
|
| 28 | - 'OCA\\DAV\\CalDAV\\Calendar' => $baseDir . '/../lib/CalDAV/Calendar.php', |
|
| 29 | - 'OCA\\DAV\\CalDAV\\CalendarHome' => $baseDir . '/../lib/CalDAV/CalendarHome.php', |
|
| 30 | - 'OCA\\DAV\\CalDAV\\CalendarImpl' => $baseDir . '/../lib/CalDAV/CalendarImpl.php', |
|
| 31 | - 'OCA\\DAV\\CalDAV\\CalendarManager' => $baseDir . '/../lib/CalDAV/CalendarManager.php', |
|
| 32 | - 'OCA\\DAV\\CalDAV\\CalendarObject' => $baseDir . '/../lib/CalDAV/CalendarObject.php', |
|
| 33 | - 'OCA\\DAV\\CalDAV\\CalendarRoot' => $baseDir . '/../lib/CalDAV/CalendarRoot.php', |
|
| 34 | - 'OCA\\DAV\\CalDAV\\Plugin' => $baseDir . '/../lib/CalDAV/Plugin.php', |
|
| 35 | - 'OCA\\DAV\\CalDAV\\Principal\\Collection' => $baseDir . '/../lib/CalDAV/Principal/Collection.php', |
|
| 36 | - 'OCA\\DAV\\CalDAV\\Principal\\User' => $baseDir . '/../lib/CalDAV/Principal/User.php', |
|
| 37 | - 'OCA\\DAV\\CalDAV\\PublicCalendar' => $baseDir . '/../lib/CalDAV/PublicCalendar.php', |
|
| 38 | - 'OCA\\DAV\\CalDAV\\PublicCalendarObject' => $baseDir . '/../lib/CalDAV/PublicCalendarObject.php', |
|
| 39 | - 'OCA\\DAV\\CalDAV\\PublicCalendarRoot' => $baseDir . '/../lib/CalDAV/PublicCalendarRoot.php', |
|
| 40 | - 'OCA\\DAV\\CalDAV\\Publishing\\PublishPlugin' => $baseDir . '/../lib/CalDAV/Publishing/PublishPlugin.php', |
|
| 41 | - 'OCA\\DAV\\CalDAV\\Publishing\\Xml\\Publisher' => $baseDir . '/../lib/CalDAV/Publishing/Xml/Publisher.php', |
|
| 42 | - 'OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin' => $baseDir . '/../lib/CalDAV/Schedule/IMipPlugin.php', |
|
| 43 | - 'OCA\\DAV\\CalDAV\\Schedule\\Plugin' => $baseDir . '/../lib/CalDAV/Schedule/Plugin.php', |
|
| 44 | - 'OCA\\DAV\\CalDAV\\Search\\SearchPlugin' => $baseDir . '/../lib/CalDAV/Search/SearchPlugin.php', |
|
| 45 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/CompFilter.php', |
|
| 46 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/LimitFilter.php', |
|
| 47 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/OffsetFilter.php', |
|
| 48 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/ParamFilter.php', |
|
| 49 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/PropFilter.php', |
|
| 50 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter' => $baseDir . '/../lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php', |
|
| 51 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport' => $baseDir . '/../lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php', |
|
| 52 | - 'OCA\\DAV\\Capabilities' => $baseDir . '/../lib/Capabilities.php', |
|
| 53 | - 'OCA\\DAV\\CardDAV\\AddressBook' => $baseDir . '/../lib/CardDAV/AddressBook.php', |
|
| 54 | - 'OCA\\DAV\\CardDAV\\AddressBookImpl' => $baseDir . '/../lib/CardDAV/AddressBookImpl.php', |
|
| 55 | - 'OCA\\DAV\\CardDAV\\AddressBookRoot' => $baseDir . '/../lib/CardDAV/AddressBookRoot.php', |
|
| 56 | - 'OCA\\DAV\\CardDAV\\CardDavBackend' => $baseDir . '/../lib/CardDAV/CardDavBackend.php', |
|
| 57 | - 'OCA\\DAV\\CardDAV\\ContactsManager' => $baseDir . '/../lib/CardDAV/ContactsManager.php', |
|
| 58 | - 'OCA\\DAV\\CardDAV\\Converter' => $baseDir . '/../lib/CardDAV/Converter.php', |
|
| 59 | - 'OCA\\DAV\\CardDAV\\ImageExportPlugin' => $baseDir . '/../lib/CardDAV/ImageExportPlugin.php', |
|
| 60 | - 'OCA\\DAV\\CardDAV\\PhotoCache' => $baseDir . '/../lib/CardDAV/PhotoCache.php', |
|
| 61 | - 'OCA\\DAV\\CardDAV\\Plugin' => $baseDir . '/../lib/CardDAV/Plugin.php', |
|
| 62 | - 'OCA\\DAV\\CardDAV\\SyncService' => $baseDir . '/../lib/CardDAV/SyncService.php', |
|
| 63 | - 'OCA\\DAV\\CardDAV\\UserAddressBooks' => $baseDir . '/../lib/CardDAV/UserAddressBooks.php', |
|
| 64 | - 'OCA\\DAV\\CardDAV\\Xml\\Groups' => $baseDir . '/../lib/CardDAV/Xml/Groups.php', |
|
| 65 | - 'OCA\\DAV\\Command\\CreateAddressBook' => $baseDir . '/../lib/Command/CreateAddressBook.php', |
|
| 66 | - 'OCA\\DAV\\Command\\CreateCalendar' => $baseDir . '/../lib/Command/CreateCalendar.php', |
|
| 67 | - 'OCA\\DAV\\Command\\SyncBirthdayCalendar' => $baseDir . '/../lib/Command/SyncBirthdayCalendar.php', |
|
| 68 | - 'OCA\\DAV\\Command\\SyncSystemAddressBook' => $baseDir . '/../lib/Command/SyncSystemAddressBook.php', |
|
| 69 | - 'OCA\\DAV\\Comments\\CommentNode' => $baseDir . '/../lib/Comments/CommentNode.php', |
|
| 70 | - 'OCA\\DAV\\Comments\\CommentsPlugin' => $baseDir . '/../lib/Comments/CommentsPlugin.php', |
|
| 71 | - 'OCA\\DAV\\Comments\\EntityCollection' => $baseDir . '/../lib/Comments/EntityCollection.php', |
|
| 72 | - 'OCA\\DAV\\Comments\\EntityTypeCollection' => $baseDir . '/../lib/Comments/EntityTypeCollection.php', |
|
| 73 | - 'OCA\\DAV\\Comments\\RootCollection' => $baseDir . '/../lib/Comments/RootCollection.php', |
|
| 74 | - 'OCA\\DAV\\Connector\\LegacyDAVACL' => $baseDir . '/../lib/Connector/LegacyDAVACL.php', |
|
| 75 | - 'OCA\\DAV\\Connector\\PublicAuth' => $baseDir . '/../lib/Connector/PublicAuth.php', |
|
| 76 | - 'OCA\\DAV\\Connector\\Sabre\\AppEnabledPlugin' => $baseDir . '/../lib/Connector/Sabre/AppEnabledPlugin.php', |
|
| 77 | - 'OCA\\DAV\\Connector\\Sabre\\Auth' => $baseDir . '/../lib/Connector/Sabre/Auth.php', |
|
| 78 | - 'OCA\\DAV\\Connector\\Sabre\\BearerAuth' => $baseDir . '/../lib/Connector/Sabre/BearerAuth.php', |
|
| 79 | - 'OCA\\DAV\\Connector\\Sabre\\BlockLegacyClientPlugin' => $baseDir . '/../lib/Connector/Sabre/BlockLegacyClientPlugin.php', |
|
| 80 | - 'OCA\\DAV\\Connector\\Sabre\\CachingTree' => $baseDir . '/../lib/Connector/Sabre/CachingTree.php', |
|
| 81 | - 'OCA\\DAV\\Connector\\Sabre\\ChecksumList' => $baseDir . '/../lib/Connector/Sabre/ChecksumList.php', |
|
| 82 | - 'OCA\\DAV\\Connector\\Sabre\\CommentPropertiesPlugin' => $baseDir . '/../lib/Connector/Sabre/CommentPropertiesPlugin.php', |
|
| 83 | - 'OCA\\DAV\\Connector\\Sabre\\CopyEtagHeaderPlugin' => $baseDir . '/../lib/Connector/Sabre/CopyEtagHeaderPlugin.php', |
|
| 84 | - 'OCA\\DAV\\Connector\\Sabre\\CustomPropertiesBackend' => $baseDir . '/../lib/Connector/Sabre/CustomPropertiesBackend.php', |
|
| 85 | - 'OCA\\DAV\\Connector\\Sabre\\DavAclPlugin' => $baseDir . '/../lib/Connector/Sabre/DavAclPlugin.php', |
|
| 86 | - 'OCA\\DAV\\Connector\\Sabre\\Directory' => $baseDir . '/../lib/Connector/Sabre/Directory.php', |
|
| 87 | - 'OCA\\DAV\\Connector\\Sabre\\DummyGetResponsePlugin' => $baseDir . '/../lib/Connector/Sabre/DummyGetResponsePlugin.php', |
|
| 88 | - 'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' => $baseDir . '/../lib/Connector/Sabre/ExceptionLoggerPlugin.php', |
|
| 89 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\EntityTooLarge' => $baseDir . '/../lib/Connector/Sabre/Exception/EntityTooLarge.php', |
|
| 90 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked' => $baseDir . '/../lib/Connector/Sabre/Exception/FileLocked.php', |
|
| 91 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden' => $baseDir . '/../lib/Connector/Sabre/Exception/Forbidden.php', |
|
| 92 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\InvalidPath' => $baseDir . '/../lib/Connector/Sabre/Exception/InvalidPath.php', |
|
| 93 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden' => $baseDir . '/../lib/Connector/Sabre/Exception/PasswordLoginForbidden.php', |
|
| 94 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\UnsupportedMediaType' => $baseDir . '/../lib/Connector/Sabre/Exception/UnsupportedMediaType.php', |
|
| 95 | - 'OCA\\DAV\\Connector\\Sabre\\FakeLockerPlugin' => $baseDir . '/../lib/Connector/Sabre/FakeLockerPlugin.php', |
|
| 96 | - 'OCA\\DAV\\Connector\\Sabre\\File' => $baseDir . '/../lib/Connector/Sabre/File.php', |
|
| 97 | - 'OCA\\DAV\\Connector\\Sabre\\FilesPlugin' => $baseDir . '/../lib/Connector/Sabre/FilesPlugin.php', |
|
| 98 | - 'OCA\\DAV\\Connector\\Sabre\\FilesReportPlugin' => $baseDir . '/../lib/Connector/Sabre/FilesReportPlugin.php', |
|
| 99 | - 'OCA\\DAV\\Connector\\Sabre\\LockPlugin' => $baseDir . '/../lib/Connector/Sabre/LockPlugin.php', |
|
| 100 | - 'OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin' => $baseDir . '/../lib/Connector/Sabre/MaintenancePlugin.php', |
|
| 101 | - 'OCA\\DAV\\Connector\\Sabre\\Node' => $baseDir . '/../lib/Connector/Sabre/Node.php', |
|
| 102 | - 'OCA\\DAV\\Connector\\Sabre\\ObjectTree' => $baseDir . '/../lib/Connector/Sabre/ObjectTree.php', |
|
| 103 | - 'OCA\\DAV\\Connector\\Sabre\\Principal' => $baseDir . '/../lib/Connector/Sabre/Principal.php', |
|
| 104 | - 'OCA\\DAV\\Connector\\Sabre\\QuotaPlugin' => $baseDir . '/../lib/Connector/Sabre/QuotaPlugin.php', |
|
| 105 | - 'OCA\\DAV\\Connector\\Sabre\\Server' => $baseDir . '/../lib/Connector/Sabre/Server.php', |
|
| 106 | - 'OCA\\DAV\\Connector\\Sabre\\ServerFactory' => $baseDir . '/../lib/Connector/Sabre/ServerFactory.php', |
|
| 107 | - 'OCA\\DAV\\Connector\\Sabre\\ShareTypeList' => $baseDir . '/../lib/Connector/Sabre/ShareTypeList.php', |
|
| 108 | - 'OCA\\DAV\\Connector\\Sabre\\SharesPlugin' => $baseDir . '/../lib/Connector/Sabre/SharesPlugin.php', |
|
| 109 | - 'OCA\\DAV\\Connector\\Sabre\\TagList' => $baseDir . '/../lib/Connector/Sabre/TagList.php', |
|
| 110 | - 'OCA\\DAV\\Connector\\Sabre\\TagsPlugin' => $baseDir . '/../lib/Connector/Sabre/TagsPlugin.php', |
|
| 111 | - 'OCA\\DAV\\Controller\\BirthdayCalendarController' => $baseDir . '/../lib/Controller/BirthdayCalendarController.php', |
|
| 112 | - 'OCA\\DAV\\DAV\\CustomPropertiesBackend' => $baseDir . '/../lib/DAV/CustomPropertiesBackend.php', |
|
| 113 | - 'OCA\\DAV\\DAV\\GroupPrincipalBackend' => $baseDir . '/../lib/DAV/GroupPrincipalBackend.php', |
|
| 114 | - 'OCA\\DAV\\DAV\\PublicAuth' => $baseDir . '/../lib/DAV/PublicAuth.php', |
|
| 115 | - 'OCA\\DAV\\DAV\\Sharing\\Backend' => $baseDir . '/../lib/DAV/Sharing/Backend.php', |
|
| 116 | - 'OCA\\DAV\\DAV\\Sharing\\IShareable' => $baseDir . '/../lib/DAV/Sharing/IShareable.php', |
|
| 117 | - 'OCA\\DAV\\DAV\\Sharing\\Plugin' => $baseDir . '/../lib/DAV/Sharing/Plugin.php', |
|
| 118 | - 'OCA\\DAV\\DAV\\Sharing\\Xml\\Invite' => $baseDir . '/../lib/DAV/Sharing/Xml/Invite.php', |
|
| 119 | - 'OCA\\DAV\\DAV\\Sharing\\Xml\\ShareRequest' => $baseDir . '/../lib/DAV/Sharing/Xml/ShareRequest.php', |
|
| 120 | - 'OCA\\DAV\\DAV\\SystemPrincipalBackend' => $baseDir . '/../lib/DAV/SystemPrincipalBackend.php', |
|
| 121 | - 'OCA\\DAV\\Files\\BrowserErrorPagePlugin' => $baseDir . '/../lib/Files/BrowserErrorPagePlugin.php', |
|
| 122 | - 'OCA\\DAV\\Files\\FileSearchBackend' => $baseDir . '/../lib/Files/FileSearchBackend.php', |
|
| 123 | - 'OCA\\DAV\\Files\\FilesHome' => $baseDir . '/../lib/Files/FilesHome.php', |
|
| 124 | - 'OCA\\DAV\\Files\\RootCollection' => $baseDir . '/../lib/Files/RootCollection.php', |
|
| 125 | - 'OCA\\DAV\\Files\\Sharing\\FilesDropPlugin' => $baseDir . '/../lib/Files/Sharing/FilesDropPlugin.php', |
|
| 126 | - 'OCA\\DAV\\Files\\Sharing\\PublicLinkCheckPlugin' => $baseDir . '/../lib/Files/Sharing/PublicLinkCheckPlugin.php', |
|
| 127 | - 'OCA\\DAV\\HookManager' => $baseDir . '/../lib/HookManager.php', |
|
| 128 | - 'OCA\\DAV\\Migration\\BuildCalendarSearchIndex' => $baseDir . '/../lib/Migration/BuildCalendarSearchIndex.php', |
|
| 129 | - 'OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob' => $baseDir . '/../lib/Migration/BuildCalendarSearchIndexBackgroundJob.php', |
|
| 130 | - 'OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue' => $baseDir . '/../lib/Migration/CalDAVRemoveEmptyValue.php', |
|
| 131 | - 'OCA\\DAV\\Migration\\FixBirthdayCalendarComponent' => $baseDir . '/../lib/Migration/FixBirthdayCalendarComponent.php', |
|
| 132 | - 'OCA\\DAV\\Migration\\Version1004Date20170825134824' => $baseDir . '/../lib/Migration/Version1004Date20170825134824.php', |
|
| 133 | - 'OCA\\DAV\\Migration\\Version1004Date20170919104507' => $baseDir . '/../lib/Migration/Version1004Date20170919104507.php', |
|
| 134 | - 'OCA\\DAV\\Migration\\Version1004Date20170924124212' => $baseDir . '/../lib/Migration/Version1004Date20170924124212.php', |
|
| 135 | - 'OCA\\DAV\\Migration\\Version1004Date20170926103422' => $baseDir . '/../lib/Migration/Version1004Date20170926103422.php', |
|
| 136 | - 'OCA\\DAV\\RootCollection' => $baseDir . '/../lib/RootCollection.php', |
|
| 137 | - 'OCA\\DAV\\Server' => $baseDir . '/../lib/Server.php', |
|
| 138 | - 'OCA\\DAV\\Settings\\CalDAVSettings' => $baseDir . '/../lib/Settings/CalDAVSettings.php', |
|
| 139 | - 'OCA\\DAV\\SystemTag\\SystemTagMappingNode' => $baseDir . '/../lib/SystemTag/SystemTagMappingNode.php', |
|
| 140 | - 'OCA\\DAV\\SystemTag\\SystemTagNode' => $baseDir . '/../lib/SystemTag/SystemTagNode.php', |
|
| 141 | - 'OCA\\DAV\\SystemTag\\SystemTagPlugin' => $baseDir . '/../lib/SystemTag/SystemTagPlugin.php', |
|
| 142 | - 'OCA\\DAV\\SystemTag\\SystemTagsByIdCollection' => $baseDir . '/../lib/SystemTag/SystemTagsByIdCollection.php', |
|
| 143 | - 'OCA\\DAV\\SystemTag\\SystemTagsObjectMappingCollection' => $baseDir . '/../lib/SystemTag/SystemTagsObjectMappingCollection.php', |
|
| 144 | - 'OCA\\DAV\\SystemTag\\SystemTagsObjectTypeCollection' => $baseDir . '/../lib/SystemTag/SystemTagsObjectTypeCollection.php', |
|
| 145 | - 'OCA\\DAV\\SystemTag\\SystemTagsRelationsCollection' => $baseDir . '/../lib/SystemTag/SystemTagsRelationsCollection.php', |
|
| 146 | - 'OCA\\DAV\\Upload\\AssemblyStream' => $baseDir . '/../lib/Upload/AssemblyStream.php', |
|
| 147 | - 'OCA\\DAV\\Upload\\ChunkingPlugin' => $baseDir . '/../lib/Upload/ChunkingPlugin.php', |
|
| 148 | - 'OCA\\DAV\\Upload\\FutureFile' => $baseDir . '/../lib/Upload/FutureFile.php', |
|
| 149 | - 'OCA\\DAV\\Upload\\RootCollection' => $baseDir . '/../lib/Upload/RootCollection.php', |
|
| 150 | - 'OCA\\DAV\\Upload\\UploadFolder' => $baseDir . '/../lib/Upload/UploadFolder.php', |
|
| 151 | - '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\\GenerateBirthdayCalendarBackgroundJob' => $baseDir.'/../lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php', |
|
| 15 | + 'OCA\\DAV\\CalDAV\\Activity\\Backend' => $baseDir.'/../lib/CalDAV/Activity/Backend.php', |
|
| 16 | + 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Calendar' => $baseDir.'/../lib/CalDAV/Activity/Filter/Calendar.php', |
|
| 17 | + 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Todo' => $baseDir.'/../lib/CalDAV/Activity/Filter/Todo.php', |
|
| 18 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Base' => $baseDir.'/../lib/CalDAV/Activity/Provider/Base.php', |
|
| 19 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => $baseDir.'/../lib/CalDAV/Activity/Provider/Calendar.php', |
|
| 20 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => $baseDir.'/../lib/CalDAV/Activity/Provider/Event.php', |
|
| 21 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => $baseDir.'/../lib/CalDAV/Activity/Provider/Todo.php', |
|
| 22 | + 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => $baseDir.'/../lib/CalDAV/Activity/Setting/Calendar.php', |
|
| 23 | + 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => $baseDir.'/../lib/CalDAV/Activity/Setting/Event.php', |
|
| 24 | + 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => $baseDir.'/../lib/CalDAV/Activity/Setting/Todo.php', |
|
| 25 | + 'OCA\\DAV\\CalDAV\\BirthdayCalendar\\EnablePlugin' => $baseDir.'/../lib/CalDAV/BirthdayCalendar/EnablePlugin.php', |
|
| 26 | + 'OCA\\DAV\\CalDAV\\BirthdayService' => $baseDir.'/../lib/CalDAV/BirthdayService.php', |
|
| 27 | + 'OCA\\DAV\\CalDAV\\CalDavBackend' => $baseDir.'/../lib/CalDAV/CalDavBackend.php', |
|
| 28 | + 'OCA\\DAV\\CalDAV\\Calendar' => $baseDir.'/../lib/CalDAV/Calendar.php', |
|
| 29 | + 'OCA\\DAV\\CalDAV\\CalendarHome' => $baseDir.'/../lib/CalDAV/CalendarHome.php', |
|
| 30 | + 'OCA\\DAV\\CalDAV\\CalendarImpl' => $baseDir.'/../lib/CalDAV/CalendarImpl.php', |
|
| 31 | + 'OCA\\DAV\\CalDAV\\CalendarManager' => $baseDir.'/../lib/CalDAV/CalendarManager.php', |
|
| 32 | + 'OCA\\DAV\\CalDAV\\CalendarObject' => $baseDir.'/../lib/CalDAV/CalendarObject.php', |
|
| 33 | + 'OCA\\DAV\\CalDAV\\CalendarRoot' => $baseDir.'/../lib/CalDAV/CalendarRoot.php', |
|
| 34 | + 'OCA\\DAV\\CalDAV\\Plugin' => $baseDir.'/../lib/CalDAV/Plugin.php', |
|
| 35 | + 'OCA\\DAV\\CalDAV\\Principal\\Collection' => $baseDir.'/../lib/CalDAV/Principal/Collection.php', |
|
| 36 | + 'OCA\\DAV\\CalDAV\\Principal\\User' => $baseDir.'/../lib/CalDAV/Principal/User.php', |
|
| 37 | + 'OCA\\DAV\\CalDAV\\PublicCalendar' => $baseDir.'/../lib/CalDAV/PublicCalendar.php', |
|
| 38 | + 'OCA\\DAV\\CalDAV\\PublicCalendarObject' => $baseDir.'/../lib/CalDAV/PublicCalendarObject.php', |
|
| 39 | + 'OCA\\DAV\\CalDAV\\PublicCalendarRoot' => $baseDir.'/../lib/CalDAV/PublicCalendarRoot.php', |
|
| 40 | + 'OCA\\DAV\\CalDAV\\Publishing\\PublishPlugin' => $baseDir.'/../lib/CalDAV/Publishing/PublishPlugin.php', |
|
| 41 | + 'OCA\\DAV\\CalDAV\\Publishing\\Xml\\Publisher' => $baseDir.'/../lib/CalDAV/Publishing/Xml/Publisher.php', |
|
| 42 | + 'OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin' => $baseDir.'/../lib/CalDAV/Schedule/IMipPlugin.php', |
|
| 43 | + 'OCA\\DAV\\CalDAV\\Schedule\\Plugin' => $baseDir.'/../lib/CalDAV/Schedule/Plugin.php', |
|
| 44 | + 'OCA\\DAV\\CalDAV\\Search\\SearchPlugin' => $baseDir.'/../lib/CalDAV/Search/SearchPlugin.php', |
|
| 45 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/CompFilter.php', |
|
| 46 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/LimitFilter.php', |
|
| 47 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/OffsetFilter.php', |
|
| 48 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/ParamFilter.php', |
|
| 49 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/PropFilter.php', |
|
| 50 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter' => $baseDir.'/../lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php', |
|
| 51 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport' => $baseDir.'/../lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php', |
|
| 52 | + 'OCA\\DAV\\Capabilities' => $baseDir.'/../lib/Capabilities.php', |
|
| 53 | + 'OCA\\DAV\\CardDAV\\AddressBook' => $baseDir.'/../lib/CardDAV/AddressBook.php', |
|
| 54 | + 'OCA\\DAV\\CardDAV\\AddressBookImpl' => $baseDir.'/../lib/CardDAV/AddressBookImpl.php', |
|
| 55 | + 'OCA\\DAV\\CardDAV\\AddressBookRoot' => $baseDir.'/../lib/CardDAV/AddressBookRoot.php', |
|
| 56 | + 'OCA\\DAV\\CardDAV\\CardDavBackend' => $baseDir.'/../lib/CardDAV/CardDavBackend.php', |
|
| 57 | + 'OCA\\DAV\\CardDAV\\ContactsManager' => $baseDir.'/../lib/CardDAV/ContactsManager.php', |
|
| 58 | + 'OCA\\DAV\\CardDAV\\Converter' => $baseDir.'/../lib/CardDAV/Converter.php', |
|
| 59 | + 'OCA\\DAV\\CardDAV\\ImageExportPlugin' => $baseDir.'/../lib/CardDAV/ImageExportPlugin.php', |
|
| 60 | + 'OCA\\DAV\\CardDAV\\PhotoCache' => $baseDir.'/../lib/CardDAV/PhotoCache.php', |
|
| 61 | + 'OCA\\DAV\\CardDAV\\Plugin' => $baseDir.'/../lib/CardDAV/Plugin.php', |
|
| 62 | + 'OCA\\DAV\\CardDAV\\SyncService' => $baseDir.'/../lib/CardDAV/SyncService.php', |
|
| 63 | + 'OCA\\DAV\\CardDAV\\UserAddressBooks' => $baseDir.'/../lib/CardDAV/UserAddressBooks.php', |
|
| 64 | + 'OCA\\DAV\\CardDAV\\Xml\\Groups' => $baseDir.'/../lib/CardDAV/Xml/Groups.php', |
|
| 65 | + 'OCA\\DAV\\Command\\CreateAddressBook' => $baseDir.'/../lib/Command/CreateAddressBook.php', |
|
| 66 | + 'OCA\\DAV\\Command\\CreateCalendar' => $baseDir.'/../lib/Command/CreateCalendar.php', |
|
| 67 | + 'OCA\\DAV\\Command\\SyncBirthdayCalendar' => $baseDir.'/../lib/Command/SyncBirthdayCalendar.php', |
|
| 68 | + 'OCA\\DAV\\Command\\SyncSystemAddressBook' => $baseDir.'/../lib/Command/SyncSystemAddressBook.php', |
|
| 69 | + 'OCA\\DAV\\Comments\\CommentNode' => $baseDir.'/../lib/Comments/CommentNode.php', |
|
| 70 | + 'OCA\\DAV\\Comments\\CommentsPlugin' => $baseDir.'/../lib/Comments/CommentsPlugin.php', |
|
| 71 | + 'OCA\\DAV\\Comments\\EntityCollection' => $baseDir.'/../lib/Comments/EntityCollection.php', |
|
| 72 | + 'OCA\\DAV\\Comments\\EntityTypeCollection' => $baseDir.'/../lib/Comments/EntityTypeCollection.php', |
|
| 73 | + 'OCA\\DAV\\Comments\\RootCollection' => $baseDir.'/../lib/Comments/RootCollection.php', |
|
| 74 | + 'OCA\\DAV\\Connector\\LegacyDAVACL' => $baseDir.'/../lib/Connector/LegacyDAVACL.php', |
|
| 75 | + 'OCA\\DAV\\Connector\\PublicAuth' => $baseDir.'/../lib/Connector/PublicAuth.php', |
|
| 76 | + 'OCA\\DAV\\Connector\\Sabre\\AppEnabledPlugin' => $baseDir.'/../lib/Connector/Sabre/AppEnabledPlugin.php', |
|
| 77 | + 'OCA\\DAV\\Connector\\Sabre\\Auth' => $baseDir.'/../lib/Connector/Sabre/Auth.php', |
|
| 78 | + 'OCA\\DAV\\Connector\\Sabre\\BearerAuth' => $baseDir.'/../lib/Connector/Sabre/BearerAuth.php', |
|
| 79 | + 'OCA\\DAV\\Connector\\Sabre\\BlockLegacyClientPlugin' => $baseDir.'/../lib/Connector/Sabre/BlockLegacyClientPlugin.php', |
|
| 80 | + 'OCA\\DAV\\Connector\\Sabre\\CachingTree' => $baseDir.'/../lib/Connector/Sabre/CachingTree.php', |
|
| 81 | + 'OCA\\DAV\\Connector\\Sabre\\ChecksumList' => $baseDir.'/../lib/Connector/Sabre/ChecksumList.php', |
|
| 82 | + 'OCA\\DAV\\Connector\\Sabre\\CommentPropertiesPlugin' => $baseDir.'/../lib/Connector/Sabre/CommentPropertiesPlugin.php', |
|
| 83 | + 'OCA\\DAV\\Connector\\Sabre\\CopyEtagHeaderPlugin' => $baseDir.'/../lib/Connector/Sabre/CopyEtagHeaderPlugin.php', |
|
| 84 | + 'OCA\\DAV\\Connector\\Sabre\\CustomPropertiesBackend' => $baseDir.'/../lib/Connector/Sabre/CustomPropertiesBackend.php', |
|
| 85 | + 'OCA\\DAV\\Connector\\Sabre\\DavAclPlugin' => $baseDir.'/../lib/Connector/Sabre/DavAclPlugin.php', |
|
| 86 | + 'OCA\\DAV\\Connector\\Sabre\\Directory' => $baseDir.'/../lib/Connector/Sabre/Directory.php', |
|
| 87 | + 'OCA\\DAV\\Connector\\Sabre\\DummyGetResponsePlugin' => $baseDir.'/../lib/Connector/Sabre/DummyGetResponsePlugin.php', |
|
| 88 | + 'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' => $baseDir.'/../lib/Connector/Sabre/ExceptionLoggerPlugin.php', |
|
| 89 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\EntityTooLarge' => $baseDir.'/../lib/Connector/Sabre/Exception/EntityTooLarge.php', |
|
| 90 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked' => $baseDir.'/../lib/Connector/Sabre/Exception/FileLocked.php', |
|
| 91 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden' => $baseDir.'/../lib/Connector/Sabre/Exception/Forbidden.php', |
|
| 92 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\InvalidPath' => $baseDir.'/../lib/Connector/Sabre/Exception/InvalidPath.php', |
|
| 93 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden' => $baseDir.'/../lib/Connector/Sabre/Exception/PasswordLoginForbidden.php', |
|
| 94 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\UnsupportedMediaType' => $baseDir.'/../lib/Connector/Sabre/Exception/UnsupportedMediaType.php', |
|
| 95 | + 'OCA\\DAV\\Connector\\Sabre\\FakeLockerPlugin' => $baseDir.'/../lib/Connector/Sabre/FakeLockerPlugin.php', |
|
| 96 | + 'OCA\\DAV\\Connector\\Sabre\\File' => $baseDir.'/../lib/Connector/Sabre/File.php', |
|
| 97 | + 'OCA\\DAV\\Connector\\Sabre\\FilesPlugin' => $baseDir.'/../lib/Connector/Sabre/FilesPlugin.php', |
|
| 98 | + 'OCA\\DAV\\Connector\\Sabre\\FilesReportPlugin' => $baseDir.'/../lib/Connector/Sabre/FilesReportPlugin.php', |
|
| 99 | + 'OCA\\DAV\\Connector\\Sabre\\LockPlugin' => $baseDir.'/../lib/Connector/Sabre/LockPlugin.php', |
|
| 100 | + 'OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin' => $baseDir.'/../lib/Connector/Sabre/MaintenancePlugin.php', |
|
| 101 | + 'OCA\\DAV\\Connector\\Sabre\\Node' => $baseDir.'/../lib/Connector/Sabre/Node.php', |
|
| 102 | + 'OCA\\DAV\\Connector\\Sabre\\ObjectTree' => $baseDir.'/../lib/Connector/Sabre/ObjectTree.php', |
|
| 103 | + 'OCA\\DAV\\Connector\\Sabre\\Principal' => $baseDir.'/../lib/Connector/Sabre/Principal.php', |
|
| 104 | + 'OCA\\DAV\\Connector\\Sabre\\QuotaPlugin' => $baseDir.'/../lib/Connector/Sabre/QuotaPlugin.php', |
|
| 105 | + 'OCA\\DAV\\Connector\\Sabre\\Server' => $baseDir.'/../lib/Connector/Sabre/Server.php', |
|
| 106 | + 'OCA\\DAV\\Connector\\Sabre\\ServerFactory' => $baseDir.'/../lib/Connector/Sabre/ServerFactory.php', |
|
| 107 | + 'OCA\\DAV\\Connector\\Sabre\\ShareTypeList' => $baseDir.'/../lib/Connector/Sabre/ShareTypeList.php', |
|
| 108 | + 'OCA\\DAV\\Connector\\Sabre\\SharesPlugin' => $baseDir.'/../lib/Connector/Sabre/SharesPlugin.php', |
|
| 109 | + 'OCA\\DAV\\Connector\\Sabre\\TagList' => $baseDir.'/../lib/Connector/Sabre/TagList.php', |
|
| 110 | + 'OCA\\DAV\\Connector\\Sabre\\TagsPlugin' => $baseDir.'/../lib/Connector/Sabre/TagsPlugin.php', |
|
| 111 | + 'OCA\\DAV\\Controller\\BirthdayCalendarController' => $baseDir.'/../lib/Controller/BirthdayCalendarController.php', |
|
| 112 | + 'OCA\\DAV\\DAV\\CustomPropertiesBackend' => $baseDir.'/../lib/DAV/CustomPropertiesBackend.php', |
|
| 113 | + 'OCA\\DAV\\DAV\\GroupPrincipalBackend' => $baseDir.'/../lib/DAV/GroupPrincipalBackend.php', |
|
| 114 | + 'OCA\\DAV\\DAV\\PublicAuth' => $baseDir.'/../lib/DAV/PublicAuth.php', |
|
| 115 | + 'OCA\\DAV\\DAV\\Sharing\\Backend' => $baseDir.'/../lib/DAV/Sharing/Backend.php', |
|
| 116 | + 'OCA\\DAV\\DAV\\Sharing\\IShareable' => $baseDir.'/../lib/DAV/Sharing/IShareable.php', |
|
| 117 | + 'OCA\\DAV\\DAV\\Sharing\\Plugin' => $baseDir.'/../lib/DAV/Sharing/Plugin.php', |
|
| 118 | + 'OCA\\DAV\\DAV\\Sharing\\Xml\\Invite' => $baseDir.'/../lib/DAV/Sharing/Xml/Invite.php', |
|
| 119 | + 'OCA\\DAV\\DAV\\Sharing\\Xml\\ShareRequest' => $baseDir.'/../lib/DAV/Sharing/Xml/ShareRequest.php', |
|
| 120 | + 'OCA\\DAV\\DAV\\SystemPrincipalBackend' => $baseDir.'/../lib/DAV/SystemPrincipalBackend.php', |
|
| 121 | + 'OCA\\DAV\\Files\\BrowserErrorPagePlugin' => $baseDir.'/../lib/Files/BrowserErrorPagePlugin.php', |
|
| 122 | + 'OCA\\DAV\\Files\\FileSearchBackend' => $baseDir.'/../lib/Files/FileSearchBackend.php', |
|
| 123 | + 'OCA\\DAV\\Files\\FilesHome' => $baseDir.'/../lib/Files/FilesHome.php', |
|
| 124 | + 'OCA\\DAV\\Files\\RootCollection' => $baseDir.'/../lib/Files/RootCollection.php', |
|
| 125 | + 'OCA\\DAV\\Files\\Sharing\\FilesDropPlugin' => $baseDir.'/../lib/Files/Sharing/FilesDropPlugin.php', |
|
| 126 | + 'OCA\\DAV\\Files\\Sharing\\PublicLinkCheckPlugin' => $baseDir.'/../lib/Files/Sharing/PublicLinkCheckPlugin.php', |
|
| 127 | + 'OCA\\DAV\\HookManager' => $baseDir.'/../lib/HookManager.php', |
|
| 128 | + 'OCA\\DAV\\Migration\\BuildCalendarSearchIndex' => $baseDir.'/../lib/Migration/BuildCalendarSearchIndex.php', |
|
| 129 | + 'OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob' => $baseDir.'/../lib/Migration/BuildCalendarSearchIndexBackgroundJob.php', |
|
| 130 | + 'OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue' => $baseDir.'/../lib/Migration/CalDAVRemoveEmptyValue.php', |
|
| 131 | + 'OCA\\DAV\\Migration\\FixBirthdayCalendarComponent' => $baseDir.'/../lib/Migration/FixBirthdayCalendarComponent.php', |
|
| 132 | + 'OCA\\DAV\\Migration\\Version1004Date20170825134824' => $baseDir.'/../lib/Migration/Version1004Date20170825134824.php', |
|
| 133 | + 'OCA\\DAV\\Migration\\Version1004Date20170919104507' => $baseDir.'/../lib/Migration/Version1004Date20170919104507.php', |
|
| 134 | + 'OCA\\DAV\\Migration\\Version1004Date20170924124212' => $baseDir.'/../lib/Migration/Version1004Date20170924124212.php', |
|
| 135 | + 'OCA\\DAV\\Migration\\Version1004Date20170926103422' => $baseDir.'/../lib/Migration/Version1004Date20170926103422.php', |
|
| 136 | + 'OCA\\DAV\\RootCollection' => $baseDir.'/../lib/RootCollection.php', |
|
| 137 | + 'OCA\\DAV\\Server' => $baseDir.'/../lib/Server.php', |
|
| 138 | + 'OCA\\DAV\\Settings\\CalDAVSettings' => $baseDir.'/../lib/Settings/CalDAVSettings.php', |
|
| 139 | + 'OCA\\DAV\\SystemTag\\SystemTagMappingNode' => $baseDir.'/../lib/SystemTag/SystemTagMappingNode.php', |
|
| 140 | + 'OCA\\DAV\\SystemTag\\SystemTagNode' => $baseDir.'/../lib/SystemTag/SystemTagNode.php', |
|
| 141 | + 'OCA\\DAV\\SystemTag\\SystemTagPlugin' => $baseDir.'/../lib/SystemTag/SystemTagPlugin.php', |
|
| 142 | + 'OCA\\DAV\\SystemTag\\SystemTagsByIdCollection' => $baseDir.'/../lib/SystemTag/SystemTagsByIdCollection.php', |
|
| 143 | + 'OCA\\DAV\\SystemTag\\SystemTagsObjectMappingCollection' => $baseDir.'/../lib/SystemTag/SystemTagsObjectMappingCollection.php', |
|
| 144 | + 'OCA\\DAV\\SystemTag\\SystemTagsObjectTypeCollection' => $baseDir.'/../lib/SystemTag/SystemTagsObjectTypeCollection.php', |
|
| 145 | + 'OCA\\DAV\\SystemTag\\SystemTagsRelationsCollection' => $baseDir.'/../lib/SystemTag/SystemTagsRelationsCollection.php', |
|
| 146 | + 'OCA\\DAV\\Upload\\AssemblyStream' => $baseDir.'/../lib/Upload/AssemblyStream.php', |
|
| 147 | + 'OCA\\DAV\\Upload\\ChunkingPlugin' => $baseDir.'/../lib/Upload/ChunkingPlugin.php', |
|
| 148 | + 'OCA\\DAV\\Upload\\FutureFile' => $baseDir.'/../lib/Upload/FutureFile.php', |
|
| 149 | + 'OCA\\DAV\\Upload\\RootCollection' => $baseDir.'/../lib/Upload/RootCollection.php', |
|
| 150 | + 'OCA\\DAV\\Upload\\UploadFolder' => $baseDir.'/../lib/Upload/UploadFolder.php', |
|
| 151 | + 'OCA\\DAV\\Upload\\UploadHome' => $baseDir.'/../lib/Upload/UploadHome.php', |
|
| 152 | 152 | ); |
@@ -6,169 +6,169 @@ |
||
| 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\\GenerateBirthdayCalendarBackgroundJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php', |
|
| 30 | - 'OCA\\DAV\\CalDAV\\Activity\\Backend' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Backend.php', |
|
| 31 | - 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Calendar' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Filter/Calendar.php', |
|
| 32 | - 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Todo' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Filter/Todo.php', |
|
| 33 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Base' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Provider/Base.php', |
|
| 34 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Provider/Calendar.php', |
|
| 35 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Provider/Event.php', |
|
| 36 | - 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Provider/Todo.php', |
|
| 37 | - 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Setting/Calendar.php', |
|
| 38 | - 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Setting/Event.php', |
|
| 39 | - 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => __DIR__ . '/..' . '/../lib/CalDAV/Activity/Setting/Todo.php', |
|
| 40 | - 'OCA\\DAV\\CalDAV\\BirthdayCalendar\\EnablePlugin' => __DIR__ . '/..' . '/../lib/CalDAV/BirthdayCalendar/EnablePlugin.php', |
|
| 41 | - 'OCA\\DAV\\CalDAV\\BirthdayService' => __DIR__ . '/..' . '/../lib/CalDAV/BirthdayService.php', |
|
| 42 | - 'OCA\\DAV\\CalDAV\\CalDavBackend' => __DIR__ . '/..' . '/../lib/CalDAV/CalDavBackend.php', |
|
| 43 | - 'OCA\\DAV\\CalDAV\\Calendar' => __DIR__ . '/..' . '/../lib/CalDAV/Calendar.php', |
|
| 44 | - 'OCA\\DAV\\CalDAV\\CalendarHome' => __DIR__ . '/..' . '/../lib/CalDAV/CalendarHome.php', |
|
| 45 | - 'OCA\\DAV\\CalDAV\\CalendarImpl' => __DIR__ . '/..' . '/../lib/CalDAV/CalendarImpl.php', |
|
| 46 | - 'OCA\\DAV\\CalDAV\\CalendarManager' => __DIR__ . '/..' . '/../lib/CalDAV/CalendarManager.php', |
|
| 47 | - 'OCA\\DAV\\CalDAV\\CalendarObject' => __DIR__ . '/..' . '/../lib/CalDAV/CalendarObject.php', |
|
| 48 | - 'OCA\\DAV\\CalDAV\\CalendarRoot' => __DIR__ . '/..' . '/../lib/CalDAV/CalendarRoot.php', |
|
| 49 | - 'OCA\\DAV\\CalDAV\\Plugin' => __DIR__ . '/..' . '/../lib/CalDAV/Plugin.php', |
|
| 50 | - 'OCA\\DAV\\CalDAV\\Principal\\Collection' => __DIR__ . '/..' . '/../lib/CalDAV/Principal/Collection.php', |
|
| 51 | - 'OCA\\DAV\\CalDAV\\Principal\\User' => __DIR__ . '/..' . '/../lib/CalDAV/Principal/User.php', |
|
| 52 | - 'OCA\\DAV\\CalDAV\\PublicCalendar' => __DIR__ . '/..' . '/../lib/CalDAV/PublicCalendar.php', |
|
| 53 | - 'OCA\\DAV\\CalDAV\\PublicCalendarObject' => __DIR__ . '/..' . '/../lib/CalDAV/PublicCalendarObject.php', |
|
| 54 | - 'OCA\\DAV\\CalDAV\\PublicCalendarRoot' => __DIR__ . '/..' . '/../lib/CalDAV/PublicCalendarRoot.php', |
|
| 55 | - 'OCA\\DAV\\CalDAV\\Publishing\\PublishPlugin' => __DIR__ . '/..' . '/../lib/CalDAV/Publishing/PublishPlugin.php', |
|
| 56 | - 'OCA\\DAV\\CalDAV\\Publishing\\Xml\\Publisher' => __DIR__ . '/..' . '/../lib/CalDAV/Publishing/Xml/Publisher.php', |
|
| 57 | - 'OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin' => __DIR__ . '/..' . '/../lib/CalDAV/Schedule/IMipPlugin.php', |
|
| 58 | - 'OCA\\DAV\\CalDAV\\Schedule\\Plugin' => __DIR__ . '/..' . '/../lib/CalDAV/Schedule/Plugin.php', |
|
| 59 | - 'OCA\\DAV\\CalDAV\\Search\\SearchPlugin' => __DIR__ . '/..' . '/../lib/CalDAV/Search/SearchPlugin.php', |
|
| 60 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/CompFilter.php', |
|
| 61 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/LimitFilter.php', |
|
| 62 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/OffsetFilter.php', |
|
| 63 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/ParamFilter.php', |
|
| 64 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/PropFilter.php', |
|
| 65 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php', |
|
| 66 | - 'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport' => __DIR__ . '/..' . '/../lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php', |
|
| 67 | - 'OCA\\DAV\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php', |
|
| 68 | - 'OCA\\DAV\\CardDAV\\AddressBook' => __DIR__ . '/..' . '/../lib/CardDAV/AddressBook.php', |
|
| 69 | - 'OCA\\DAV\\CardDAV\\AddressBookImpl' => __DIR__ . '/..' . '/../lib/CardDAV/AddressBookImpl.php', |
|
| 70 | - 'OCA\\DAV\\CardDAV\\AddressBookRoot' => __DIR__ . '/..' . '/../lib/CardDAV/AddressBookRoot.php', |
|
| 71 | - 'OCA\\DAV\\CardDAV\\CardDavBackend' => __DIR__ . '/..' . '/../lib/CardDAV/CardDavBackend.php', |
|
| 72 | - 'OCA\\DAV\\CardDAV\\ContactsManager' => __DIR__ . '/..' . '/../lib/CardDAV/ContactsManager.php', |
|
| 73 | - 'OCA\\DAV\\CardDAV\\Converter' => __DIR__ . '/..' . '/../lib/CardDAV/Converter.php', |
|
| 74 | - 'OCA\\DAV\\CardDAV\\ImageExportPlugin' => __DIR__ . '/..' . '/../lib/CardDAV/ImageExportPlugin.php', |
|
| 75 | - 'OCA\\DAV\\CardDAV\\PhotoCache' => __DIR__ . '/..' . '/../lib/CardDAV/PhotoCache.php', |
|
| 76 | - 'OCA\\DAV\\CardDAV\\Plugin' => __DIR__ . '/..' . '/../lib/CardDAV/Plugin.php', |
|
| 77 | - 'OCA\\DAV\\CardDAV\\SyncService' => __DIR__ . '/..' . '/../lib/CardDAV/SyncService.php', |
|
| 78 | - 'OCA\\DAV\\CardDAV\\UserAddressBooks' => __DIR__ . '/..' . '/../lib/CardDAV/UserAddressBooks.php', |
|
| 79 | - 'OCA\\DAV\\CardDAV\\Xml\\Groups' => __DIR__ . '/..' . '/../lib/CardDAV/Xml/Groups.php', |
|
| 80 | - 'OCA\\DAV\\Command\\CreateAddressBook' => __DIR__ . '/..' . '/../lib/Command/CreateAddressBook.php', |
|
| 81 | - 'OCA\\DAV\\Command\\CreateCalendar' => __DIR__ . '/..' . '/../lib/Command/CreateCalendar.php', |
|
| 82 | - 'OCA\\DAV\\Command\\SyncBirthdayCalendar' => __DIR__ . '/..' . '/../lib/Command/SyncBirthdayCalendar.php', |
|
| 83 | - 'OCA\\DAV\\Command\\SyncSystemAddressBook' => __DIR__ . '/..' . '/../lib/Command/SyncSystemAddressBook.php', |
|
| 84 | - 'OCA\\DAV\\Comments\\CommentNode' => __DIR__ . '/..' . '/../lib/Comments/CommentNode.php', |
|
| 85 | - 'OCA\\DAV\\Comments\\CommentsPlugin' => __DIR__ . '/..' . '/../lib/Comments/CommentsPlugin.php', |
|
| 86 | - 'OCA\\DAV\\Comments\\EntityCollection' => __DIR__ . '/..' . '/../lib/Comments/EntityCollection.php', |
|
| 87 | - 'OCA\\DAV\\Comments\\EntityTypeCollection' => __DIR__ . '/..' . '/../lib/Comments/EntityTypeCollection.php', |
|
| 88 | - 'OCA\\DAV\\Comments\\RootCollection' => __DIR__ . '/..' . '/../lib/Comments/RootCollection.php', |
|
| 89 | - 'OCA\\DAV\\Connector\\LegacyDAVACL' => __DIR__ . '/..' . '/../lib/Connector/LegacyDAVACL.php', |
|
| 90 | - 'OCA\\DAV\\Connector\\PublicAuth' => __DIR__ . '/..' . '/../lib/Connector/PublicAuth.php', |
|
| 91 | - 'OCA\\DAV\\Connector\\Sabre\\AppEnabledPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/AppEnabledPlugin.php', |
|
| 92 | - 'OCA\\DAV\\Connector\\Sabre\\Auth' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Auth.php', |
|
| 93 | - 'OCA\\DAV\\Connector\\Sabre\\BearerAuth' => __DIR__ . '/..' . '/../lib/Connector/Sabre/BearerAuth.php', |
|
| 94 | - 'OCA\\DAV\\Connector\\Sabre\\BlockLegacyClientPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/BlockLegacyClientPlugin.php', |
|
| 95 | - 'OCA\\DAV\\Connector\\Sabre\\CachingTree' => __DIR__ . '/..' . '/../lib/Connector/Sabre/CachingTree.php', |
|
| 96 | - 'OCA\\DAV\\Connector\\Sabre\\ChecksumList' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ChecksumList.php', |
|
| 97 | - 'OCA\\DAV\\Connector\\Sabre\\CommentPropertiesPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/CommentPropertiesPlugin.php', |
|
| 98 | - 'OCA\\DAV\\Connector\\Sabre\\CopyEtagHeaderPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/CopyEtagHeaderPlugin.php', |
|
| 99 | - 'OCA\\DAV\\Connector\\Sabre\\CustomPropertiesBackend' => __DIR__ . '/..' . '/../lib/Connector/Sabre/CustomPropertiesBackend.php', |
|
| 100 | - 'OCA\\DAV\\Connector\\Sabre\\DavAclPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/DavAclPlugin.php', |
|
| 101 | - 'OCA\\DAV\\Connector\\Sabre\\Directory' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Directory.php', |
|
| 102 | - 'OCA\\DAV\\Connector\\Sabre\\DummyGetResponsePlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/DummyGetResponsePlugin.php', |
|
| 103 | - 'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ExceptionLoggerPlugin.php', |
|
| 104 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\EntityTooLarge' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/EntityTooLarge.php', |
|
| 105 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/FileLocked.php', |
|
| 106 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/Forbidden.php', |
|
| 107 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\InvalidPath' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/InvalidPath.php', |
|
| 108 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/PasswordLoginForbidden.php', |
|
| 109 | - 'OCA\\DAV\\Connector\\Sabre\\Exception\\UnsupportedMediaType' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Exception/UnsupportedMediaType.php', |
|
| 110 | - 'OCA\\DAV\\Connector\\Sabre\\FakeLockerPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/FakeLockerPlugin.php', |
|
| 111 | - 'OCA\\DAV\\Connector\\Sabre\\File' => __DIR__ . '/..' . '/../lib/Connector/Sabre/File.php', |
|
| 112 | - 'OCA\\DAV\\Connector\\Sabre\\FilesPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/FilesPlugin.php', |
|
| 113 | - 'OCA\\DAV\\Connector\\Sabre\\FilesReportPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/FilesReportPlugin.php', |
|
| 114 | - 'OCA\\DAV\\Connector\\Sabre\\LockPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/LockPlugin.php', |
|
| 115 | - 'OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/MaintenancePlugin.php', |
|
| 116 | - 'OCA\\DAV\\Connector\\Sabre\\Node' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Node.php', |
|
| 117 | - 'OCA\\DAV\\Connector\\Sabre\\ObjectTree' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ObjectTree.php', |
|
| 118 | - 'OCA\\DAV\\Connector\\Sabre\\Principal' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Principal.php', |
|
| 119 | - 'OCA\\DAV\\Connector\\Sabre\\QuotaPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/QuotaPlugin.php', |
|
| 120 | - 'OCA\\DAV\\Connector\\Sabre\\Server' => __DIR__ . '/..' . '/../lib/Connector/Sabre/Server.php', |
|
| 121 | - 'OCA\\DAV\\Connector\\Sabre\\ServerFactory' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ServerFactory.php', |
|
| 122 | - 'OCA\\DAV\\Connector\\Sabre\\ShareTypeList' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ShareTypeList.php', |
|
| 123 | - 'OCA\\DAV\\Connector\\Sabre\\SharesPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/SharesPlugin.php', |
|
| 124 | - 'OCA\\DAV\\Connector\\Sabre\\TagList' => __DIR__ . '/..' . '/../lib/Connector/Sabre/TagList.php', |
|
| 125 | - 'OCA\\DAV\\Connector\\Sabre\\TagsPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/TagsPlugin.php', |
|
| 126 | - 'OCA\\DAV\\Controller\\BirthdayCalendarController' => __DIR__ . '/..' . '/../lib/Controller/BirthdayCalendarController.php', |
|
| 127 | - 'OCA\\DAV\\DAV\\CustomPropertiesBackend' => __DIR__ . '/..' . '/../lib/DAV/CustomPropertiesBackend.php', |
|
| 128 | - 'OCA\\DAV\\DAV\\GroupPrincipalBackend' => __DIR__ . '/..' . '/../lib/DAV/GroupPrincipalBackend.php', |
|
| 129 | - 'OCA\\DAV\\DAV\\PublicAuth' => __DIR__ . '/..' . '/../lib/DAV/PublicAuth.php', |
|
| 130 | - 'OCA\\DAV\\DAV\\Sharing\\Backend' => __DIR__ . '/..' . '/../lib/DAV/Sharing/Backend.php', |
|
| 131 | - 'OCA\\DAV\\DAV\\Sharing\\IShareable' => __DIR__ . '/..' . '/../lib/DAV/Sharing/IShareable.php', |
|
| 132 | - 'OCA\\DAV\\DAV\\Sharing\\Plugin' => __DIR__ . '/..' . '/../lib/DAV/Sharing/Plugin.php', |
|
| 133 | - 'OCA\\DAV\\DAV\\Sharing\\Xml\\Invite' => __DIR__ . '/..' . '/../lib/DAV/Sharing/Xml/Invite.php', |
|
| 134 | - 'OCA\\DAV\\DAV\\Sharing\\Xml\\ShareRequest' => __DIR__ . '/..' . '/../lib/DAV/Sharing/Xml/ShareRequest.php', |
|
| 135 | - 'OCA\\DAV\\DAV\\SystemPrincipalBackend' => __DIR__ . '/..' . '/../lib/DAV/SystemPrincipalBackend.php', |
|
| 136 | - 'OCA\\DAV\\Files\\BrowserErrorPagePlugin' => __DIR__ . '/..' . '/../lib/Files/BrowserErrorPagePlugin.php', |
|
| 137 | - 'OCA\\DAV\\Files\\FileSearchBackend' => __DIR__ . '/..' . '/../lib/Files/FileSearchBackend.php', |
|
| 138 | - 'OCA\\DAV\\Files\\FilesHome' => __DIR__ . '/..' . '/../lib/Files/FilesHome.php', |
|
| 139 | - 'OCA\\DAV\\Files\\RootCollection' => __DIR__ . '/..' . '/../lib/Files/RootCollection.php', |
|
| 140 | - 'OCA\\DAV\\Files\\Sharing\\FilesDropPlugin' => __DIR__ . '/..' . '/../lib/Files/Sharing/FilesDropPlugin.php', |
|
| 141 | - 'OCA\\DAV\\Files\\Sharing\\PublicLinkCheckPlugin' => __DIR__ . '/..' . '/../lib/Files/Sharing/PublicLinkCheckPlugin.php', |
|
| 142 | - 'OCA\\DAV\\HookManager' => __DIR__ . '/..' . '/../lib/HookManager.php', |
|
| 143 | - 'OCA\\DAV\\Migration\\BuildCalendarSearchIndex' => __DIR__ . '/..' . '/../lib/Migration/BuildCalendarSearchIndex.php', |
|
| 144 | - 'OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob' => __DIR__ . '/..' . '/../lib/Migration/BuildCalendarSearchIndexBackgroundJob.php', |
|
| 145 | - 'OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue' => __DIR__ . '/..' . '/../lib/Migration/CalDAVRemoveEmptyValue.php', |
|
| 146 | - 'OCA\\DAV\\Migration\\FixBirthdayCalendarComponent' => __DIR__ . '/..' . '/../lib/Migration/FixBirthdayCalendarComponent.php', |
|
| 147 | - 'OCA\\DAV\\Migration\\Version1004Date20170825134824' => __DIR__ . '/..' . '/../lib/Migration/Version1004Date20170825134824.php', |
|
| 148 | - 'OCA\\DAV\\Migration\\Version1004Date20170919104507' => __DIR__ . '/..' . '/../lib/Migration/Version1004Date20170919104507.php', |
|
| 149 | - 'OCA\\DAV\\Migration\\Version1004Date20170924124212' => __DIR__ . '/..' . '/../lib/Migration/Version1004Date20170924124212.php', |
|
| 150 | - 'OCA\\DAV\\Migration\\Version1004Date20170926103422' => __DIR__ . '/..' . '/../lib/Migration/Version1004Date20170926103422.php', |
|
| 151 | - 'OCA\\DAV\\RootCollection' => __DIR__ . '/..' . '/../lib/RootCollection.php', |
|
| 152 | - 'OCA\\DAV\\Server' => __DIR__ . '/..' . '/../lib/Server.php', |
|
| 153 | - 'OCA\\DAV\\Settings\\CalDAVSettings' => __DIR__ . '/..' . '/../lib/Settings/CalDAVSettings.php', |
|
| 154 | - 'OCA\\DAV\\SystemTag\\SystemTagMappingNode' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagMappingNode.php', |
|
| 155 | - 'OCA\\DAV\\SystemTag\\SystemTagNode' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagNode.php', |
|
| 156 | - 'OCA\\DAV\\SystemTag\\SystemTagPlugin' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagPlugin.php', |
|
| 157 | - 'OCA\\DAV\\SystemTag\\SystemTagsByIdCollection' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagsByIdCollection.php', |
|
| 158 | - 'OCA\\DAV\\SystemTag\\SystemTagsObjectMappingCollection' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagsObjectMappingCollection.php', |
|
| 159 | - 'OCA\\DAV\\SystemTag\\SystemTagsObjectTypeCollection' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagsObjectTypeCollection.php', |
|
| 160 | - 'OCA\\DAV\\SystemTag\\SystemTagsRelationsCollection' => __DIR__ . '/..' . '/../lib/SystemTag/SystemTagsRelationsCollection.php', |
|
| 161 | - 'OCA\\DAV\\Upload\\AssemblyStream' => __DIR__ . '/..' . '/../lib/Upload/AssemblyStream.php', |
|
| 162 | - 'OCA\\DAV\\Upload\\ChunkingPlugin' => __DIR__ . '/..' . '/../lib/Upload/ChunkingPlugin.php', |
|
| 163 | - 'OCA\\DAV\\Upload\\FutureFile' => __DIR__ . '/..' . '/../lib/Upload/FutureFile.php', |
|
| 164 | - 'OCA\\DAV\\Upload\\RootCollection' => __DIR__ . '/..' . '/../lib/Upload/RootCollection.php', |
|
| 165 | - 'OCA\\DAV\\Upload\\UploadFolder' => __DIR__ . '/..' . '/../lib/Upload/UploadFolder.php', |
|
| 166 | - '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\\GenerateBirthdayCalendarBackgroundJob' => __DIR__.'/..'.'/../lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php', |
|
| 30 | + 'OCA\\DAV\\CalDAV\\Activity\\Backend' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Backend.php', |
|
| 31 | + 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Calendar' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Filter/Calendar.php', |
|
| 32 | + 'OCA\\DAV\\CalDAV\\Activity\\Filter\\Todo' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Filter/Todo.php', |
|
| 33 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Base' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Provider/Base.php', |
|
| 34 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Calendar' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Provider/Calendar.php', |
|
| 35 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Event' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Provider/Event.php', |
|
| 36 | + 'OCA\\DAV\\CalDAV\\Activity\\Provider\\Todo' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Provider/Todo.php', |
|
| 37 | + 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Calendar' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Setting/Calendar.php', |
|
| 38 | + 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Event' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Setting/Event.php', |
|
| 39 | + 'OCA\\DAV\\CalDAV\\Activity\\Setting\\Todo' => __DIR__.'/..'.'/../lib/CalDAV/Activity/Setting/Todo.php', |
|
| 40 | + 'OCA\\DAV\\CalDAV\\BirthdayCalendar\\EnablePlugin' => __DIR__.'/..'.'/../lib/CalDAV/BirthdayCalendar/EnablePlugin.php', |
|
| 41 | + 'OCA\\DAV\\CalDAV\\BirthdayService' => __DIR__.'/..'.'/../lib/CalDAV/BirthdayService.php', |
|
| 42 | + 'OCA\\DAV\\CalDAV\\CalDavBackend' => __DIR__.'/..'.'/../lib/CalDAV/CalDavBackend.php', |
|
| 43 | + 'OCA\\DAV\\CalDAV\\Calendar' => __DIR__.'/..'.'/../lib/CalDAV/Calendar.php', |
|
| 44 | + 'OCA\\DAV\\CalDAV\\CalendarHome' => __DIR__.'/..'.'/../lib/CalDAV/CalendarHome.php', |
|
| 45 | + 'OCA\\DAV\\CalDAV\\CalendarImpl' => __DIR__.'/..'.'/../lib/CalDAV/CalendarImpl.php', |
|
| 46 | + 'OCA\\DAV\\CalDAV\\CalendarManager' => __DIR__.'/..'.'/../lib/CalDAV/CalendarManager.php', |
|
| 47 | + 'OCA\\DAV\\CalDAV\\CalendarObject' => __DIR__.'/..'.'/../lib/CalDAV/CalendarObject.php', |
|
| 48 | + 'OCA\\DAV\\CalDAV\\CalendarRoot' => __DIR__.'/..'.'/../lib/CalDAV/CalendarRoot.php', |
|
| 49 | + 'OCA\\DAV\\CalDAV\\Plugin' => __DIR__.'/..'.'/../lib/CalDAV/Plugin.php', |
|
| 50 | + 'OCA\\DAV\\CalDAV\\Principal\\Collection' => __DIR__.'/..'.'/../lib/CalDAV/Principal/Collection.php', |
|
| 51 | + 'OCA\\DAV\\CalDAV\\Principal\\User' => __DIR__.'/..'.'/../lib/CalDAV/Principal/User.php', |
|
| 52 | + 'OCA\\DAV\\CalDAV\\PublicCalendar' => __DIR__.'/..'.'/../lib/CalDAV/PublicCalendar.php', |
|
| 53 | + 'OCA\\DAV\\CalDAV\\PublicCalendarObject' => __DIR__.'/..'.'/../lib/CalDAV/PublicCalendarObject.php', |
|
| 54 | + 'OCA\\DAV\\CalDAV\\PublicCalendarRoot' => __DIR__.'/..'.'/../lib/CalDAV/PublicCalendarRoot.php', |
|
| 55 | + 'OCA\\DAV\\CalDAV\\Publishing\\PublishPlugin' => __DIR__.'/..'.'/../lib/CalDAV/Publishing/PublishPlugin.php', |
|
| 56 | + 'OCA\\DAV\\CalDAV\\Publishing\\Xml\\Publisher' => __DIR__.'/..'.'/../lib/CalDAV/Publishing/Xml/Publisher.php', |
|
| 57 | + 'OCA\\DAV\\CalDAV\\Schedule\\IMipPlugin' => __DIR__.'/..'.'/../lib/CalDAV/Schedule/IMipPlugin.php', |
|
| 58 | + 'OCA\\DAV\\CalDAV\\Schedule\\Plugin' => __DIR__.'/..'.'/../lib/CalDAV/Schedule/Plugin.php', |
|
| 59 | + 'OCA\\DAV\\CalDAV\\Search\\SearchPlugin' => __DIR__.'/..'.'/../lib/CalDAV/Search/SearchPlugin.php', |
|
| 60 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/CompFilter.php', |
|
| 61 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/LimitFilter.php', |
|
| 62 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/OffsetFilter.php', |
|
| 63 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/ParamFilter.php', |
|
| 64 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/PropFilter.php', |
|
| 65 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php', |
|
| 66 | + 'OCA\\DAV\\CalDAV\\Search\\Xml\\Request\\CalendarSearchReport' => __DIR__.'/..'.'/../lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php', |
|
| 67 | + 'OCA\\DAV\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php', |
|
| 68 | + 'OCA\\DAV\\CardDAV\\AddressBook' => __DIR__.'/..'.'/../lib/CardDAV/AddressBook.php', |
|
| 69 | + 'OCA\\DAV\\CardDAV\\AddressBookImpl' => __DIR__.'/..'.'/../lib/CardDAV/AddressBookImpl.php', |
|
| 70 | + 'OCA\\DAV\\CardDAV\\AddressBookRoot' => __DIR__.'/..'.'/../lib/CardDAV/AddressBookRoot.php', |
|
| 71 | + 'OCA\\DAV\\CardDAV\\CardDavBackend' => __DIR__.'/..'.'/../lib/CardDAV/CardDavBackend.php', |
|
| 72 | + 'OCA\\DAV\\CardDAV\\ContactsManager' => __DIR__.'/..'.'/../lib/CardDAV/ContactsManager.php', |
|
| 73 | + 'OCA\\DAV\\CardDAV\\Converter' => __DIR__.'/..'.'/../lib/CardDAV/Converter.php', |
|
| 74 | + 'OCA\\DAV\\CardDAV\\ImageExportPlugin' => __DIR__.'/..'.'/../lib/CardDAV/ImageExportPlugin.php', |
|
| 75 | + 'OCA\\DAV\\CardDAV\\PhotoCache' => __DIR__.'/..'.'/../lib/CardDAV/PhotoCache.php', |
|
| 76 | + 'OCA\\DAV\\CardDAV\\Plugin' => __DIR__.'/..'.'/../lib/CardDAV/Plugin.php', |
|
| 77 | + 'OCA\\DAV\\CardDAV\\SyncService' => __DIR__.'/..'.'/../lib/CardDAV/SyncService.php', |
|
| 78 | + 'OCA\\DAV\\CardDAV\\UserAddressBooks' => __DIR__.'/..'.'/../lib/CardDAV/UserAddressBooks.php', |
|
| 79 | + 'OCA\\DAV\\CardDAV\\Xml\\Groups' => __DIR__.'/..'.'/../lib/CardDAV/Xml/Groups.php', |
|
| 80 | + 'OCA\\DAV\\Command\\CreateAddressBook' => __DIR__.'/..'.'/../lib/Command/CreateAddressBook.php', |
|
| 81 | + 'OCA\\DAV\\Command\\CreateCalendar' => __DIR__.'/..'.'/../lib/Command/CreateCalendar.php', |
|
| 82 | + 'OCA\\DAV\\Command\\SyncBirthdayCalendar' => __DIR__.'/..'.'/../lib/Command/SyncBirthdayCalendar.php', |
|
| 83 | + 'OCA\\DAV\\Command\\SyncSystemAddressBook' => __DIR__.'/..'.'/../lib/Command/SyncSystemAddressBook.php', |
|
| 84 | + 'OCA\\DAV\\Comments\\CommentNode' => __DIR__.'/..'.'/../lib/Comments/CommentNode.php', |
|
| 85 | + 'OCA\\DAV\\Comments\\CommentsPlugin' => __DIR__.'/..'.'/../lib/Comments/CommentsPlugin.php', |
|
| 86 | + 'OCA\\DAV\\Comments\\EntityCollection' => __DIR__.'/..'.'/../lib/Comments/EntityCollection.php', |
|
| 87 | + 'OCA\\DAV\\Comments\\EntityTypeCollection' => __DIR__.'/..'.'/../lib/Comments/EntityTypeCollection.php', |
|
| 88 | + 'OCA\\DAV\\Comments\\RootCollection' => __DIR__.'/..'.'/../lib/Comments/RootCollection.php', |
|
| 89 | + 'OCA\\DAV\\Connector\\LegacyDAVACL' => __DIR__.'/..'.'/../lib/Connector/LegacyDAVACL.php', |
|
| 90 | + 'OCA\\DAV\\Connector\\PublicAuth' => __DIR__.'/..'.'/../lib/Connector/PublicAuth.php', |
|
| 91 | + 'OCA\\DAV\\Connector\\Sabre\\AppEnabledPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/AppEnabledPlugin.php', |
|
| 92 | + 'OCA\\DAV\\Connector\\Sabre\\Auth' => __DIR__.'/..'.'/../lib/Connector/Sabre/Auth.php', |
|
| 93 | + 'OCA\\DAV\\Connector\\Sabre\\BearerAuth' => __DIR__.'/..'.'/../lib/Connector/Sabre/BearerAuth.php', |
|
| 94 | + 'OCA\\DAV\\Connector\\Sabre\\BlockLegacyClientPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/BlockLegacyClientPlugin.php', |
|
| 95 | + 'OCA\\DAV\\Connector\\Sabre\\CachingTree' => __DIR__.'/..'.'/../lib/Connector/Sabre/CachingTree.php', |
|
| 96 | + 'OCA\\DAV\\Connector\\Sabre\\ChecksumList' => __DIR__.'/..'.'/../lib/Connector/Sabre/ChecksumList.php', |
|
| 97 | + 'OCA\\DAV\\Connector\\Sabre\\CommentPropertiesPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/CommentPropertiesPlugin.php', |
|
| 98 | + 'OCA\\DAV\\Connector\\Sabre\\CopyEtagHeaderPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/CopyEtagHeaderPlugin.php', |
|
| 99 | + 'OCA\\DAV\\Connector\\Sabre\\CustomPropertiesBackend' => __DIR__.'/..'.'/../lib/Connector/Sabre/CustomPropertiesBackend.php', |
|
| 100 | + 'OCA\\DAV\\Connector\\Sabre\\DavAclPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/DavAclPlugin.php', |
|
| 101 | + 'OCA\\DAV\\Connector\\Sabre\\Directory' => __DIR__.'/..'.'/../lib/Connector/Sabre/Directory.php', |
|
| 102 | + 'OCA\\DAV\\Connector\\Sabre\\DummyGetResponsePlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/DummyGetResponsePlugin.php', |
|
| 103 | + 'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/ExceptionLoggerPlugin.php', |
|
| 104 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\EntityTooLarge' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/EntityTooLarge.php', |
|
| 105 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/FileLocked.php', |
|
| 106 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\Forbidden' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/Forbidden.php', |
|
| 107 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\InvalidPath' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/InvalidPath.php', |
|
| 108 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/PasswordLoginForbidden.php', |
|
| 109 | + 'OCA\\DAV\\Connector\\Sabre\\Exception\\UnsupportedMediaType' => __DIR__.'/..'.'/../lib/Connector/Sabre/Exception/UnsupportedMediaType.php', |
|
| 110 | + 'OCA\\DAV\\Connector\\Sabre\\FakeLockerPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/FakeLockerPlugin.php', |
|
| 111 | + 'OCA\\DAV\\Connector\\Sabre\\File' => __DIR__.'/..'.'/../lib/Connector/Sabre/File.php', |
|
| 112 | + 'OCA\\DAV\\Connector\\Sabre\\FilesPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/FilesPlugin.php', |
|
| 113 | + 'OCA\\DAV\\Connector\\Sabre\\FilesReportPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/FilesReportPlugin.php', |
|
| 114 | + 'OCA\\DAV\\Connector\\Sabre\\LockPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/LockPlugin.php', |
|
| 115 | + 'OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/MaintenancePlugin.php', |
|
| 116 | + 'OCA\\DAV\\Connector\\Sabre\\Node' => __DIR__.'/..'.'/../lib/Connector/Sabre/Node.php', |
|
| 117 | + 'OCA\\DAV\\Connector\\Sabre\\ObjectTree' => __DIR__.'/..'.'/../lib/Connector/Sabre/ObjectTree.php', |
|
| 118 | + 'OCA\\DAV\\Connector\\Sabre\\Principal' => __DIR__.'/..'.'/../lib/Connector/Sabre/Principal.php', |
|
| 119 | + 'OCA\\DAV\\Connector\\Sabre\\QuotaPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/QuotaPlugin.php', |
|
| 120 | + 'OCA\\DAV\\Connector\\Sabre\\Server' => __DIR__.'/..'.'/../lib/Connector/Sabre/Server.php', |
|
| 121 | + 'OCA\\DAV\\Connector\\Sabre\\ServerFactory' => __DIR__.'/..'.'/../lib/Connector/Sabre/ServerFactory.php', |
|
| 122 | + 'OCA\\DAV\\Connector\\Sabre\\ShareTypeList' => __DIR__.'/..'.'/../lib/Connector/Sabre/ShareTypeList.php', |
|
| 123 | + 'OCA\\DAV\\Connector\\Sabre\\SharesPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/SharesPlugin.php', |
|
| 124 | + 'OCA\\DAV\\Connector\\Sabre\\TagList' => __DIR__.'/..'.'/../lib/Connector/Sabre/TagList.php', |
|
| 125 | + 'OCA\\DAV\\Connector\\Sabre\\TagsPlugin' => __DIR__.'/..'.'/../lib/Connector/Sabre/TagsPlugin.php', |
|
| 126 | + 'OCA\\DAV\\Controller\\BirthdayCalendarController' => __DIR__.'/..'.'/../lib/Controller/BirthdayCalendarController.php', |
|
| 127 | + 'OCA\\DAV\\DAV\\CustomPropertiesBackend' => __DIR__.'/..'.'/../lib/DAV/CustomPropertiesBackend.php', |
|
| 128 | + 'OCA\\DAV\\DAV\\GroupPrincipalBackend' => __DIR__.'/..'.'/../lib/DAV/GroupPrincipalBackend.php', |
|
| 129 | + 'OCA\\DAV\\DAV\\PublicAuth' => __DIR__.'/..'.'/../lib/DAV/PublicAuth.php', |
|
| 130 | + 'OCA\\DAV\\DAV\\Sharing\\Backend' => __DIR__.'/..'.'/../lib/DAV/Sharing/Backend.php', |
|
| 131 | + 'OCA\\DAV\\DAV\\Sharing\\IShareable' => __DIR__.'/..'.'/../lib/DAV/Sharing/IShareable.php', |
|
| 132 | + 'OCA\\DAV\\DAV\\Sharing\\Plugin' => __DIR__.'/..'.'/../lib/DAV/Sharing/Plugin.php', |
|
| 133 | + 'OCA\\DAV\\DAV\\Sharing\\Xml\\Invite' => __DIR__.'/..'.'/../lib/DAV/Sharing/Xml/Invite.php', |
|
| 134 | + 'OCA\\DAV\\DAV\\Sharing\\Xml\\ShareRequest' => __DIR__.'/..'.'/../lib/DAV/Sharing/Xml/ShareRequest.php', |
|
| 135 | + 'OCA\\DAV\\DAV\\SystemPrincipalBackend' => __DIR__.'/..'.'/../lib/DAV/SystemPrincipalBackend.php', |
|
| 136 | + 'OCA\\DAV\\Files\\BrowserErrorPagePlugin' => __DIR__.'/..'.'/../lib/Files/BrowserErrorPagePlugin.php', |
|
| 137 | + 'OCA\\DAV\\Files\\FileSearchBackend' => __DIR__.'/..'.'/../lib/Files/FileSearchBackend.php', |
|
| 138 | + 'OCA\\DAV\\Files\\FilesHome' => __DIR__.'/..'.'/../lib/Files/FilesHome.php', |
|
| 139 | + 'OCA\\DAV\\Files\\RootCollection' => __DIR__.'/..'.'/../lib/Files/RootCollection.php', |
|
| 140 | + 'OCA\\DAV\\Files\\Sharing\\FilesDropPlugin' => __DIR__.'/..'.'/../lib/Files/Sharing/FilesDropPlugin.php', |
|
| 141 | + 'OCA\\DAV\\Files\\Sharing\\PublicLinkCheckPlugin' => __DIR__.'/..'.'/../lib/Files/Sharing/PublicLinkCheckPlugin.php', |
|
| 142 | + 'OCA\\DAV\\HookManager' => __DIR__.'/..'.'/../lib/HookManager.php', |
|
| 143 | + 'OCA\\DAV\\Migration\\BuildCalendarSearchIndex' => __DIR__.'/..'.'/../lib/Migration/BuildCalendarSearchIndex.php', |
|
| 144 | + 'OCA\\DAV\\Migration\\BuildCalendarSearchIndexBackgroundJob' => __DIR__.'/..'.'/../lib/Migration/BuildCalendarSearchIndexBackgroundJob.php', |
|
| 145 | + 'OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue' => __DIR__.'/..'.'/../lib/Migration/CalDAVRemoveEmptyValue.php', |
|
| 146 | + 'OCA\\DAV\\Migration\\FixBirthdayCalendarComponent' => __DIR__.'/..'.'/../lib/Migration/FixBirthdayCalendarComponent.php', |
|
| 147 | + 'OCA\\DAV\\Migration\\Version1004Date20170825134824' => __DIR__.'/..'.'/../lib/Migration/Version1004Date20170825134824.php', |
|
| 148 | + 'OCA\\DAV\\Migration\\Version1004Date20170919104507' => __DIR__.'/..'.'/../lib/Migration/Version1004Date20170919104507.php', |
|
| 149 | + 'OCA\\DAV\\Migration\\Version1004Date20170924124212' => __DIR__.'/..'.'/../lib/Migration/Version1004Date20170924124212.php', |
|
| 150 | + 'OCA\\DAV\\Migration\\Version1004Date20170926103422' => __DIR__.'/..'.'/../lib/Migration/Version1004Date20170926103422.php', |
|
| 151 | + 'OCA\\DAV\\RootCollection' => __DIR__.'/..'.'/../lib/RootCollection.php', |
|
| 152 | + 'OCA\\DAV\\Server' => __DIR__.'/..'.'/../lib/Server.php', |
|
| 153 | + 'OCA\\DAV\\Settings\\CalDAVSettings' => __DIR__.'/..'.'/../lib/Settings/CalDAVSettings.php', |
|
| 154 | + 'OCA\\DAV\\SystemTag\\SystemTagMappingNode' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagMappingNode.php', |
|
| 155 | + 'OCA\\DAV\\SystemTag\\SystemTagNode' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagNode.php', |
|
| 156 | + 'OCA\\DAV\\SystemTag\\SystemTagPlugin' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagPlugin.php', |
|
| 157 | + 'OCA\\DAV\\SystemTag\\SystemTagsByIdCollection' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagsByIdCollection.php', |
|
| 158 | + 'OCA\\DAV\\SystemTag\\SystemTagsObjectMappingCollection' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagsObjectMappingCollection.php', |
|
| 159 | + 'OCA\\DAV\\SystemTag\\SystemTagsObjectTypeCollection' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagsObjectTypeCollection.php', |
|
| 160 | + 'OCA\\DAV\\SystemTag\\SystemTagsRelationsCollection' => __DIR__.'/..'.'/../lib/SystemTag/SystemTagsRelationsCollection.php', |
|
| 161 | + 'OCA\\DAV\\Upload\\AssemblyStream' => __DIR__.'/..'.'/../lib/Upload/AssemblyStream.php', |
|
| 162 | + 'OCA\\DAV\\Upload\\ChunkingPlugin' => __DIR__.'/..'.'/../lib/Upload/ChunkingPlugin.php', |
|
| 163 | + 'OCA\\DAV\\Upload\\FutureFile' => __DIR__.'/..'.'/../lib/Upload/FutureFile.php', |
|
| 164 | + 'OCA\\DAV\\Upload\\RootCollection' => __DIR__.'/..'.'/../lib/Upload/RootCollection.php', |
|
| 165 | + 'OCA\\DAV\\Upload\\UploadFolder' => __DIR__.'/..'.'/../lib/Upload/UploadFolder.php', |
|
| 166 | + 'OCA\\DAV\\Upload\\UploadHome' => __DIR__.'/..'.'/../lib/Upload/UploadHome.php', |
|
| 167 | 167 | ); |
| 168 | 168 | |
| 169 | 169 | public static function getInitializer(ClassLoader $loader) |
| 170 | 170 | { |
| 171 | - return \Closure::bind(function () use ($loader) { |
|
| 171 | + return \Closure::bind(function() use ($loader) { |
|
| 172 | 172 | $loader->prefixLengthsPsr4 = ComposerStaticInitDAV::$prefixLengthsPsr4; |
| 173 | 173 | $loader->prefixDirsPsr4 = ComposerStaticInitDAV::$prefixDirsPsr4; |
| 174 | 174 | $loader->classMap = ComposerStaticInitDAV::$classMap; |