Differential D12255 Diff 29455 src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php
| Show First 20 Lines • Show All 321 Lines • ▼ Show 20 Lines | abstract class PhabricatorMailReplyHandler { | ||||
| final protected function enhanceBodyWithAttachments( | final protected function enhanceBodyWithAttachments( | ||||
| $body, | $body, | ||||
| array $attachments) { | array $attachments) { | ||||
| if (!$attachments) { | if (!$attachments) { | ||||
| return $body; | return $body; | ||||
| } | } | ||||
| // NOTE: This is safe, but not entirely correct. Clean it up after | |||||
| // T7712. These files have the install-default policy right now, which | |||||
| // may or may not be permissive. | |||||
| $files = id(new PhabricatorFileQuery()) | $files = id(new PhabricatorFileQuery()) | ||||
| ->setViewer(PhabricatorUser::getOmnipotentUser()) | ->setViewer($this->getActor()) | ||||
| ->withPHIDs($attachments) | ->withPHIDs($attachments) | ||||
| ->execute(); | ->execute(); | ||||
| $output = array(); | $output = array(); | ||||
| $output[] = $body; | $output[] = $body; | ||||
| // We're going to put all the non-images first in a list, then embed | // We're going to put all the non-images first in a list, then embed | ||||
| // the images. | // the images. | ||||
| ▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines | |||||