Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/engine/HarbormasterBuildEngine.php
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | $editor = $build->getApplicationTransactionEditor() | ||||
->setActor($viewer) | ->setActor($viewer) | ||||
->setActingAsPHID($acting_phid) | ->setActingAsPHID($acting_phid) | ||||
->setContentSource($content_source) | ->setContentSource($content_source) | ||||
->setContinueOnNoEffect(true) | ->setContinueOnNoEffect(true) | ||||
->setContinueOnMissingFields(true); | ->setContinueOnMissingFields(true); | ||||
$xactions = array(); | $xactions = array(); | ||||
$message_xaction = HarbormasterBuildMessageTransaction::TRANSACTIONTYPE; | |||||
$messages = $build->getUnprocessedMessagesForApply(); | $messages = $build->getUnprocessedMessagesForApply(); | ||||
foreach ($messages as $message) { | foreach ($messages as $message) { | ||||
$message_type = $message->getType(); | $message_type = $message->getType(); | ||||
$message_xaction = | |||||
HarbormasterBuildMessageTransaction::getTransactionTypeForMessageType( | |||||
$message_type); | |||||
if (!$message_xaction) { | |||||
continue; | |||||
} | |||||
$xactions[] = $build->getApplicationTransactionTemplate() | $xactions[] = $build->getApplicationTransactionTemplate() | ||||
->setAuthorPHID($message->getAuthorPHID()) | ->setAuthorPHID($message->getAuthorPHID()) | ||||
->setTransactionType($message_xaction) | ->setTransactionType($message_xaction) | ||||
->setNewValue($message_type); | ->setNewValue($message_type); | ||||
} | } | ||||
if (!$xactions) { | if (!$xactions) { | ||||
if ($build->isPending()) { | if ($build->isPending()) { | ||||
▲ Show 20 Lines • Show All 471 Lines • Show Last 20 Lines |