Differential D21191 Diff 50524 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,969 Lines • ▼ Show 20 Lines | private function hasWarnings($object, $xaction) { | ||||
| // TODO: For the moment, this is a very un-modular hack to support | // TODO: For the moment, this is a very un-modular hack to support | ||||
| // exactly one type of warning (mentioning users on a draft revision) | // exactly one type of warning (mentioning users on a draft revision) | ||||
| // that we want to show. See PHI433. | // that we want to show. See PHI433. | ||||
| if (!($object instanceof DifferentialRevision)) { | if (!($object instanceof DifferentialRevision)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| $type = $xaction->getTransactionType(); | |||||
| // TODO: This doesn't warn for inlines in Audit, even though they have | |||||
| // the same overall workflow. | |||||
| if ($type === DifferentialTransaction::TYPE_INLINE) { | |||||
| return (bool)$xaction->getComment()->getAttribute('editing', false); | |||||
| } | |||||
| if (!$object->isDraft()) { | if (!$object->isDraft()) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| $type = $xaction->getTransactionType(); | |||||
| if ($type != PhabricatorTransactions::TYPE_SUBSCRIBERS) { | if ($type != PhabricatorTransactions::TYPE_SUBSCRIBERS) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| // NOTE: This will currently warn even if you're only removing | // NOTE: This will currently warn even if you're only removing | ||||
| // subscribers. | // subscribers. | ||||
| return true; | return true; | ||||
| ▲ Show 20 Lines • Show All 406 Lines • Show Last 20 Lines | |||||