Differential D19859 Diff 47438 src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Show First 20 Lines • Show All 4,652 Lines • ▼ Show 20 Lines | protected function newInlineStateTransaction( | ||||
} | } | ||||
$old_value = mpull($inlines, 'getFixedState', 'getPHID'); | $old_value = mpull($inlines, 'getFixedState', 'getPHID'); | ||||
$new_value = array(); | $new_value = array(); | ||||
foreach ($old_value as $key => $state) { | foreach ($old_value as $key => $state) { | ||||
$new_value[$key] = $state_map[$state]; | $new_value[$key] = $state_map[$state]; | ||||
} | } | ||||
// See PHI995. Copy some information about the inlines into the transaction | |||||
// so we can tailor rendering behavior. In particular, we don't want to | |||||
// render transactions about users marking their own inlines as "Done". | |||||
$inline_details = array(); | |||||
foreach ($inlines as $inline) { | |||||
$inline_details[$inline->getPHID()] = array( | |||||
'authorPHID' => $inline->getAuthorPHID(), | |||||
); | |||||
} | |||||
return $object->getApplicationTransactionTemplate() | return $object->getApplicationTransactionTemplate() | ||||
->setTransactionType(PhabricatorTransactions::TYPE_INLINESTATE) | ->setTransactionType(PhabricatorTransactions::TYPE_INLINESTATE) | ||||
->setIgnoreOnNoEffect(true) | ->setIgnoreOnNoEffect(true) | ||||
->setMetadataValue('inline.details', $inline_details) | |||||
->setOldValue($old_value) | ->setOldValue($old_value) | ||||
->setNewValue($new_value); | ->setNewValue($new_value); | ||||
} | } | ||||
} | } |