@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | |
| 485 | 485 | $this->identity = $user; |
| 486 | 486 | $user->updateIdentity($identity) |
| 487 | - ->updateShares(); |
|
| 487 | + ->updateShares(); |
|
| 488 | 488 | $this->hook->run('postServerIdentity', [$user]); |
| 489 | 489 | |
| 490 | 490 | return true; |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | public function getGroupByName(string $name): Group |
| 573 | 573 | { |
| 574 | 574 | $attributes = $this->db->group->findOne([ |
| 575 | - 'name' => $name, |
|
| 575 | + 'name' => $name, |
|
| 576 | 576 | ]); |
| 577 | 577 | |
| 578 | 578 | if (null === $attributes) { |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | public function getGroupById(ObjectId $id): Group |
| 593 | 593 | { |
| 594 | 594 | $attributes = $this->db->group->findOne([ |
| 595 | - '_id' => $id, |
|
| 595 | + '_id' => $id, |
|
| 596 | 596 | ]); |
| 597 | 597 | |
| 598 | 598 | if (null === $attributes) { |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $this->db->storage->updateOne( |
| 49 | 49 | ['_id' => $object['_id']], |
| 50 | 50 | [ |
| 51 | - '$set' => ['share_name' => $object['name']], |
|
| 51 | + '$set' => ['share_name' => $object['name']], |
|
| 52 | 52 | ] |
| 53 | 53 | ); |
| 54 | 54 | } |
@@ -113,9 +113,9 @@ |
||
| 113 | 113 | $body->addPart($html); |
| 114 | 114 | |
| 115 | 115 | $mail = (new Message()) |
| 116 | - ->setSubject($message->getSubject($receiver)) |
|
| 117 | - ->setBody($body) |
|
| 118 | - ->setTo($address); |
|
| 116 | + ->setSubject($message->getSubject($receiver)) |
|
| 117 | + ->setBody($body) |
|
| 118 | + ->setTo($address); |
|
| 119 | 119 | |
| 120 | 120 | if (null === $sender) { |
| 121 | 121 | $mail->setFrom($this->sender_address, $this->sender_name); |
@@ -221,10 +221,10 @@ |
||
| 221 | 221 | { |
| 222 | 222 | $mail = new Message(); |
| 223 | 223 | $mail->setBody($body) |
| 224 | - ->setFrom($this->user->getAttributes()['mail'], $this->user->getAttributes()['username']) |
|
| 225 | - ->setSubject($subject) |
|
| 226 | - ->setTo($this->user->getAttributes()['mail'], 'Undisclosed Recipients') |
|
| 227 | - ->setBcc($receiver); |
|
| 224 | + ->setFrom($this->user->getAttributes()['mail'], $this->user->getAttributes()['username']) |
|
| 225 | + ->setSubject($subject) |
|
| 226 | + ->setTo($this->user->getAttributes()['mail'], 'Undisclosed Recipients') |
|
| 227 | + ->setBcc($receiver); |
|
| 228 | 228 | $this->async->addJob(Mail::class, $mail->toString()); |
| 229 | 229 | |
| 230 | 230 | return (new Response())->setCode(202); |
@@ -320,50 +320,50 @@ discard block |
||
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | return (new Response()) |
| 323 | - ->setOutputFormat(null) |
|
| 324 | - ->setBody(function () use ($node, $encode, $offset, $length) { |
|
| 325 | - $mime = $node->getContentType(); |
|
| 326 | - $stream = $node->get(); |
|
| 327 | - $name = $node->getName(); |
|
| 328 | - |
|
| 329 | - if (null === $stream) { |
|
| 330 | - return; |
|
| 331 | - } |
|
| 332 | - |
|
| 333 | - if (0 !== $offset) { |
|
| 334 | - if (fseek($stream, $offset) === -1) { |
|
| 335 | - throw new Exception\Conflict( |
|
| 323 | + ->setOutputFormat(null) |
|
| 324 | + ->setBody(function () use ($node, $encode, $offset, $length) { |
|
| 325 | + $mime = $node->getContentType(); |
|
| 326 | + $stream = $node->get(); |
|
| 327 | + $name = $node->getName(); |
|
| 328 | + |
|
| 329 | + if (null === $stream) { |
|
| 330 | + return; |
|
| 331 | + } |
|
| 332 | + |
|
| 333 | + if (0 !== $offset) { |
|
| 334 | + if (fseek($stream, $offset) === -1) { |
|
| 335 | + throw new Exception\Conflict( |
|
| 336 | 336 | 'invalid offset requested', |
| 337 | 337 | Exception\Conflict::INVALID_OFFSET |
| 338 | 338 | ); |
| 339 | - } |
|
| 340 | - } |
|
| 341 | - |
|
| 342 | - $read = 0; |
|
| 343 | - header('Content-Type: '.$mime.''); |
|
| 344 | - if ('base64' === $encode) { |
|
| 345 | - header('Content-Encoding: base64'); |
|
| 346 | - while (!feof($stream)) { |
|
| 347 | - if (0 !== $length && $read + 8192 > $length) { |
|
| 348 | - echo base64_encode(fread($stream, $length - $read)); |
|
| 349 | - exit(); |
|
| 350 | - } |
|
| 351 | - |
|
| 352 | - echo base64_encode(fread($stream, 8192)); |
|
| 353 | - $read += 8192; |
|
| 354 | - } |
|
| 355 | - } else { |
|
| 356 | - while (!feof($stream)) { |
|
| 357 | - if (0 !== $length && $read + 8192 > $length) { |
|
| 358 | - echo fread($stream, $length - $read); |
|
| 359 | - exit(); |
|
| 360 | - } |
|
| 361 | - |
|
| 362 | - echo fread($stream, 8192); |
|
| 363 | - $read += 8192; |
|
| 364 | - } |
|
| 365 | - } |
|
| 366 | - }); |
|
| 339 | + } |
|
| 340 | + } |
|
| 341 | + |
|
| 342 | + $read = 0; |
|
| 343 | + header('Content-Type: '.$mime.''); |
|
| 344 | + if ('base64' === $encode) { |
|
| 345 | + header('Content-Encoding: base64'); |
|
| 346 | + while (!feof($stream)) { |
|
| 347 | + if (0 !== $length && $read + 8192 > $length) { |
|
| 348 | + echo base64_encode(fread($stream, $length - $read)); |
|
| 349 | + exit(); |
|
| 350 | + } |
|
| 351 | + |
|
| 352 | + echo base64_encode(fread($stream, 8192)); |
|
| 353 | + $read += 8192; |
|
| 354 | + } |
|
| 355 | + } else { |
|
| 356 | + while (!feof($stream)) { |
|
| 357 | + if (0 !== $length && $read + 8192 > $length) { |
|
| 358 | + echo fread($stream, $length - $read); |
|
| 359 | + exit(); |
|
| 360 | + } |
|
| 361 | + |
|
| 362 | + echo fread($stream, 8192); |
|
| 363 | + $read += 8192; |
|
| 364 | + } |
|
| 365 | + } |
|
| 366 | + }); |
|
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | /** |
@@ -1502,9 +1502,9 @@ discard block |
||
| 1502 | 1502 | $node->zip($archive); |
| 1503 | 1503 | } catch (\Exception $e) { |
| 1504 | 1504 | $this->logger->debug('failed zip node in multi node request ['.$node->getId().']', [ |
| 1505 | - 'category' => get_class($this), |
|
| 1506 | - 'exception' => $e, |
|
| 1507 | - ]); |
|
| 1505 | + 'category' => get_class($this), |
|
| 1506 | + 'exception' => $e, |
|
| 1507 | + ]); |
|
| 1508 | 1508 | } |
| 1509 | 1509 | } |
| 1510 | 1510 | |