@@ -296,7 +296,7 @@ |
||
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | $this->logger->debug('elasticsarch blob document ['.$result['_id'].'] has no references left, remove completely', [ |
| 299 | - 'category' => static::class, |
|
| 299 | + 'category' => static::class, |
|
| 300 | 300 | ]); |
| 301 | 301 | |
| 302 | 302 | return $this->deleteBlob($result['_id']); |
@@ -293,46 +293,46 @@ discard block |
||
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | return $response->setOutputFormat(null) |
| 296 | - ->setBody(function () use ($node, $encode, $offset, $length) { |
|
| 297 | - $mime = $node->getContentType(); |
|
| 298 | - $stream = $node->get(); |
|
| 299 | - $name = $node->getName(); |
|
| 300 | - |
|
| 301 | - if (null === $stream) { |
|
| 302 | - return; |
|
| 303 | - } |
|
| 304 | - |
|
| 305 | - if (0 !== $offset) { |
|
| 306 | - if (fseek($stream, $offset) === -1) { |
|
| 307 | - throw new Exception\Conflict('invalid offset requested', Exception\Conflict::INVALID_OFFSET); |
|
| 308 | - } |
|
| 309 | - } |
|
| 310 | - |
|
| 311 | - $read = 0; |
|
| 312 | - header('Content-Type: '.$mime.''); |
|
| 313 | - if ('base64' === $encode) { |
|
| 314 | - header('Content-Encoding: base64'); |
|
| 315 | - while (!feof($stream)) { |
|
| 316 | - if (0 !== $length && $read + 8192 > $length) { |
|
| 317 | - echo base64_encode(fread($stream, $length - $read)); |
|
| 318 | - exit(); |
|
| 319 | - } |
|
| 320 | - |
|
| 321 | - echo base64_encode(fread($stream, 8192)); |
|
| 322 | - $read += 8192; |
|
| 323 | - } |
|
| 324 | - } else { |
|
| 325 | - while (!feof($stream)) { |
|
| 326 | - if (0 !== $length && $read + 8192 > $length) { |
|
| 327 | - echo fread($stream, $length - $read); |
|
| 328 | - exit(); |
|
| 329 | - } |
|
| 330 | - |
|
| 331 | - echo fread($stream, 8192); |
|
| 332 | - $read += 8192; |
|
| 333 | - } |
|
| 334 | - } |
|
| 335 | - }); |
|
| 296 | + ->setBody(function () use ($node, $encode, $offset, $length) { |
|
| 297 | + $mime = $node->getContentType(); |
|
| 298 | + $stream = $node->get(); |
|
| 299 | + $name = $node->getName(); |
|
| 300 | + |
|
| 301 | + if (null === $stream) { |
|
| 302 | + return; |
|
| 303 | + } |
|
| 304 | + |
|
| 305 | + if (0 !== $offset) { |
|
| 306 | + if (fseek($stream, $offset) === -1) { |
|
| 307 | + throw new Exception\Conflict('invalid offset requested', Exception\Conflict::INVALID_OFFSET); |
|
| 308 | + } |
|
| 309 | + } |
|
| 310 | + |
|
| 311 | + $read = 0; |
|
| 312 | + header('Content-Type: '.$mime.''); |
|
| 313 | + if ('base64' === $encode) { |
|
| 314 | + header('Content-Encoding: base64'); |
|
| 315 | + while (!feof($stream)) { |
|
| 316 | + if (0 !== $length && $read + 8192 > $length) { |
|
| 317 | + echo base64_encode(fread($stream, $length - $read)); |
|
| 318 | + exit(); |
|
| 319 | + } |
|
| 320 | + |
|
| 321 | + echo base64_encode(fread($stream, 8192)); |
|
| 322 | + $read += 8192; |
|
| 323 | + } |
|
| 324 | + } else { |
|
| 325 | + while (!feof($stream)) { |
|
| 326 | + if (0 !== $length && $read + 8192 > $length) { |
|
| 327 | + echo fread($stream, $length - $read); |
|
| 328 | + exit(); |
|
| 329 | + } |
|
| 330 | + |
|
| 331 | + echo fread($stream, 8192); |
|
| 332 | + $read += 8192; |
|
| 333 | + } |
|
| 334 | + } |
|
| 335 | + }); |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | /** |
@@ -1327,9 +1327,9 @@ discard block |
||
| 1327 | 1327 | $node->zip($archive); |
| 1328 | 1328 | } catch (\Exception $e) { |
| 1329 | 1329 | $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [ |
| 1330 | - 'category' => static::class, |
|
| 1331 | - 'exception' => $e, |
|
| 1332 | - ]); |
|
| 1330 | + 'category' => static::class, |
|
| 1331 | + 'exception' => $e, |
|
| 1332 | + ]); |
|
| 1333 | 1333 | } |
| 1334 | 1334 | } |
| 1335 | 1335 | |
@@ -457,9 +457,9 @@ |
||
| 457 | 457 | $node->zip($archive); |
| 458 | 458 | } catch (\Exception $e) { |
| 459 | 459 | $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [ |
| 460 | - 'category' => static::class, |
|
| 461 | - 'exception' => $e, |
|
| 462 | - ]); |
|
| 460 | + 'category' => static::class, |
|
| 461 | + 'exception' => $e, |
|
| 462 | + ]); |
|
| 463 | 463 | } |
| 464 | 464 | } |
| 465 | 465 | |
@@ -239,8 +239,8 @@ discard block |
||
| 239 | 239 | $share = $node->getFilesystem()->findRawNode($node->getReference()); |
| 240 | 240 | } catch (\Exception $e) { |
| 241 | 241 | $this->logger->error('could not find share node ['.$node->getReference().'] for reference ['.$node->getId().'], dead reference?', [ |
| 242 | - 'category' => static::class, |
|
| 243 | - 'exception' => $e, |
|
| 242 | + 'category' => static::class, |
|
| 243 | + 'exception' => $e, |
|
| 244 | 244 | ]); |
| 245 | 245 | |
| 246 | 246 | return self::PRIVILEGE_DENY; |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | if ($share['deleted'] instanceof UTCDateTime || true !== $share['shared']) { |
| 250 | 250 | $this->logger->error('share node ['.$share['_id'].'] has been deleted, dead reference?', [ |
| 251 | - 'category' => static::class, |
|
| 251 | + 'category' => static::class, |
|
| 252 | 252 | ]); |
| 253 | 253 | |
| 254 | 254 | return self::PRIVILEGE_DENY; |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | $this->logger->info('found first time username ['.$identity->getIdentifier().'], auto-create user', [ |
| 87 | - 'category' => static::class, |
|
| 87 | + 'category' => static::class, |
|
| 88 | 88 | ]); |
| 89 | 89 | |
| 90 | 90 | $attributes = []; |