Differential D19852 Diff 47411 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 2,535 Lines • ▼ Show 20 Lines | private function validateSubtypeTransactions( | ||||
$old = $object->getEditEngineSubtype(); | $old = $object->getEditEngineSubtype(); | ||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
$new = $xaction->getNewValue(); | $new = $xaction->getNewValue(); | ||||
if ($old == $new) { | if ($old == $new) { | ||||
continue; | continue; | ||||
} | } | ||||
if (!isset($map[$new])) { | if (!$map->isValidSubtype($new)) { | ||||
$errors[] = new PhabricatorApplicationTransactionValidationError( | $errors[] = new PhabricatorApplicationTransactionValidationError( | ||||
$transaction_type, | $transaction_type, | ||||
pht('Invalid'), | pht('Invalid'), | ||||
pht( | pht( | ||||
'The subtype "%s" is not a valid subtype.', | 'The subtype "%s" is not a valid subtype.', | ||||
$new), | $new), | ||||
$xaction); | $xaction); | ||||
continue; | continue; | ||||
▲ Show 20 Lines • Show All 2,045 Lines • Show Last 20 Lines |