Differential D14073 Diff 34741 src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | public function getApplicationTransactionTitle( | ||||
$add = array_diff($new, $old); | $add = array_diff($new, $old); | ||||
$rem = array_diff($old, $new); | $rem = array_diff($old, $new); | ||||
if ($add && !$rem) { | if ($add && !$rem) { | ||||
return pht( | return pht( | ||||
'%s updated %s, added %d: %s.', | '%s updated %s, added %d: %s.', | ||||
$xaction->renderHandleLink($author_phid), | $xaction->renderHandleLink($author_phid), | ||||
$this->getFieldName(), | $this->getFieldName(), | ||||
new PhutilNumber(count($add)), | phutil_count($add), | ||||
$xaction->renderHandleList($add)); | $xaction->renderHandleList($add)); | ||||
} else if ($rem && !$add) { | } else if ($rem && !$add) { | ||||
return pht( | return pht( | ||||
'%s updated %s, removed %d: %s.', | '%s updated %s, removed %s: %s.', | ||||
$xaction->renderHandleLink($author_phid), | $xaction->renderHandleLink($author_phid), | ||||
$this->getFieldName(), | $this->getFieldName(), | ||||
new PhutilNumber(count($rem)), | phutil_count($rem), | ||||
$xaction->renderHandleList($rem)); | $xaction->renderHandleList($rem)); | ||||
} else { | } else { | ||||
return pht( | return pht( | ||||
'%s updated %s, added %d: %s; removed %d: %s.', | '%s updated %s, added %s: %s; removed %s: %s.', | ||||
$xaction->renderHandleLink($author_phid), | $xaction->renderHandleLink($author_phid), | ||||
$this->getFieldName(), | $this->getFieldName(), | ||||
new PhutilNumber(count($add)), | phutil_count($add), | ||||
$xaction->renderHandleList($add), | $xaction->renderHandleList($add), | ||||
new PhutilNumber(count($rem)), | phutil_count($rem), | ||||
$xaction->renderHandleList($rem)); | $xaction->renderHandleList($rem)); | ||||
} | } | ||||
} | } | ||||
public function validateApplicationTransactions( | public function validateApplicationTransactions( | ||||
PhabricatorApplicationTransactionEditor $editor, | PhabricatorApplicationTransactionEditor $editor, | ||||
$type, | $type, | ||||
array $xactions) { | array $xactions) { | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |