Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/query/PhabricatorFileQuery.php
Show First 20 Lines • Show All 368 Lines • ▼ Show 20 Lines | if ($this->transforms) { | ||||
$conn, | $conn, | ||||
'JOIN %T t ON t.transformedPHID = f.phid', | 'JOIN %T t ON t.transformedPHID = f.phid', | ||||
id(new PhabricatorTransformedFile())->getTableName()); | id(new PhabricatorTransformedFile())->getTableName()); | ||||
} | } | ||||
if ($this->shouldJoinAttachmentsTable()) { | if ($this->shouldJoinAttachmentsTable()) { | ||||
$joins[] = qsprintf( | $joins[] = qsprintf( | ||||
$conn, | $conn, | ||||
'JOIN %R attachments ON attachments.filePHID = f.phid', | 'JOIN %R attachments ON attachments.filePHID = f.phid | ||||
new PhabricatorFileAttachment()); | AND attachmentMode IN (%Ls)', | ||||
new PhabricatorFileAttachment(), | |||||
array( | |||||
PhabricatorFileAttachment::MODE_ATTACH, | |||||
)); | |||||
} | } | ||||
return $joins; | return $joins; | ||||
} | } | ||||
private function shouldJoinAttachmentsTable() { | private function shouldJoinAttachmentsTable() { | ||||
return ($this->attachedObjectPHIDs !== null); | return ($this->attachedObjectPHIDs !== null); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 152 Lines • Show Last 20 Lines |