Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/editor/PhabricatorAuditEditor.php
Show First 20 Lines • Show All 490 Lines • ▼ Show 20 Lines | final class PhabricatorAuditEditor | ||||
protected function getMailTo(PhabricatorLiskDAO $object) { | protected function getMailTo(PhabricatorLiskDAO $object) { | ||||
$phids = array(); | $phids = array(); | ||||
if ($object->getAuthorPHID()) { | if ($object->getAuthorPHID()) { | ||||
$phids[] = $object->getAuthorPHID(); | $phids[] = $object->getAuthorPHID(); | ||||
} | } | ||||
$status_resigned = PhabricatorAuditStatusConstants::RESIGNED; | |||||
foreach ($object->getAudits() as $audit) { | foreach ($object->getAudits() as $audit) { | ||||
if (!$audit->isInteresting()) { | if (!$audit->isInteresting()) { | ||||
// Don't send mail to uninteresting auditors, like packages which | // Don't send mail to uninteresting auditors, like packages which | ||||
// own this code but which audits have not triggered for. | // own this code but which audits have not triggered for. | ||||
continue; | continue; | ||||
} | } | ||||
if ($audit->getAuditStatus() != $status_resigned) { | if (!$audit->isResigned()) { | ||||
$phids[] = $audit->getAuditorPHID(); | $phids[] = $audit->getAuditorPHID(); | ||||
} | } | ||||
} | } | ||||
$phids[] = $this->getActingAsPHID(); | $phids[] = $this->getActingAsPHID(); | ||||
return $phids; | return $phids; | ||||
} | } | ||||
protected function newMailUnexpandablePHIDs(PhabricatorLiskDAO $object) { | |||||
$phids = array(); | |||||
foreach ($object->getAudits() as $auditor) { | |||||
if ($auditor->isResigned()) { | |||||
$phids[] = $auditor->getAuditorPHID(); | |||||
} | |||||
} | |||||
return $phids; | |||||
} | |||||
protected function buildMailBody( | protected function buildMailBody( | ||||
PhabricatorLiskDAO $object, | PhabricatorLiskDAO $object, | ||||
array $xactions) { | array $xactions) { | ||||
$body = parent::buildMailBody($object, $xactions); | $body = parent::buildMailBody($object, $xactions); | ||||
$type_inline = PhabricatorAuditActionConstants::INLINE; | $type_inline = PhabricatorAuditActionConstants::INLINE; | ||||
$type_push = PhabricatorAuditTransaction::TYPE_COMMIT; | $type_push = PhabricatorAuditTransaction::TYPE_COMMIT; | ||||
▲ Show 20 Lines • Show All 324 Lines • Show Last 20 Lines |