1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-05 04:11:01 +01:00

Don't send a blank "COMMITS" field for mark-committed revisions.

This commit is contained in:
epriestley 2011-04-10 14:36:04 -07:00
parent 24d01d39c6
commit 689eb11ff3

View file

@ -111,13 +111,14 @@ class DifferentialCommentMail extends DifferentialMail {
$revision = $this->getRevision(); $revision = $this->getRevision();
if ($revision->getStatus() == DifferentialRevisionStatus::COMMITTED) { if ($revision->getStatus() == DifferentialRevisionStatus::COMMITTED) {
$phids = $revision->loadCommitPHIDs(); $phids = $revision->loadCommitPHIDs();
if ($phids) {
$handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();
if (count($handles) == 1) { if (count($handles) == 1) {
$body[] = "COMMIT"; $body[] = "COMMIT";
} else { } else {
// This is unlikely to ever happen since we'll send this mail the first // This is unlikely to ever happen since we'll send this mail the
// time we discover a commit, but it's not impossible if data was // first time we discover a commit, but it's not impossible if data
// migrated, etc. // was migrated, etc.
$body[] = "COMMITS"; $body[] = "COMMITS";
} }
@ -126,6 +127,7 @@ class DifferentialCommentMail extends DifferentialMail {
} }
$body[] = null; $body[] = null;
} }
}
return implode("\n", $body); return implode("\n", $body);
} }