Differential D14073 Diff 34742 src/applications/transactions/storage/PhabricatorApplicationTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
| Show First 20 Lines • Show All 704 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
| $type = head($type); | $type = head($type); | ||||
| $type_obj = PhabricatorEdgeType::getByConstant($type); | $type_obj = PhabricatorEdgeType::getByConstant($type); | ||||
| if ($add && $rem) { | if ($add && $rem) { | ||||
| return $type_obj->getTransactionEditString( | return $type_obj->getTransactionEditString( | ||||
| $this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
| new PhutilNumber(count($add) + count($rem)), | new PhutilNumber(count($add) + count($rem)), | ||||
| new PhutilNumber(count($add)), | phutil_count($add), | ||||
| $this->renderHandleList($add), | $this->renderHandleList($add), | ||||
| new PhutilNumber(count($rem)), | phutil_count($rem), | ||||
| $this->renderHandleList($rem)); | $this->renderHandleList($rem)); | ||||
| } else if ($add) { | } else if ($add) { | ||||
| return $type_obj->getTransactionAddString( | return $type_obj->getTransactionAddString( | ||||
| $this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
| new PhutilNumber(count($add)), | phutil_count($add), | ||||
| $this->renderHandleList($add)); | $this->renderHandleList($add)); | ||||
| } else if ($rem) { | } else if ($rem) { | ||||
| return $type_obj->getTransactionRemoveString( | return $type_obj->getTransactionRemoveString( | ||||
| $this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
| new PhutilNumber(count($rem)), | phutil_count($rem), | ||||
| $this->renderHandleList($rem)); | $this->renderHandleList($rem)); | ||||
| } else { | } else { | ||||
| return $type_obj->getTransactionPreviewString( | return $type_obj->getTransactionPreviewString( | ||||
| $this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
| } | } | ||||
| case PhabricatorTransactions::TYPE_CUSTOMFIELD: | case PhabricatorTransactions::TYPE_CUSTOMFIELD: | ||||
| $field = $this->getTransactionCustomField(); | $field = $this->getTransactionCustomField(); | ||||
| ▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
| $type_obj = PhabricatorEdgeType::getByConstant($type); | $type_obj = PhabricatorEdgeType::getByConstant($type); | ||||
| if ($add && $rem) { | if ($add && $rem) { | ||||
| return $type_obj->getFeedEditString( | return $type_obj->getFeedEditString( | ||||
| $this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
| $this->renderHandleLink($object_phid), | $this->renderHandleLink($object_phid), | ||||
| new PhutilNumber(count($add) + count($rem)), | new PhutilNumber(count($add) + count($rem)), | ||||
| new PhutilNumber(count($add)), | phutil_count($add), | ||||
| $this->renderHandleList($add), | $this->renderHandleList($add), | ||||
| new PhutilNumber(count($rem)), | phutil_count($rem), | ||||
| $this->renderHandleList($rem)); | $this->renderHandleList($rem)); | ||||
| } else if ($add) { | } else if ($add) { | ||||
| return $type_obj->getFeedAddString( | return $type_obj->getFeedAddString( | ||||
| $this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
| $this->renderHandleLink($object_phid), | $this->renderHandleLink($object_phid), | ||||
| new PhutilNumber(count($add)), | phutil_count($add), | ||||
| $this->renderHandleList($add)); | $this->renderHandleList($add)); | ||||
| } else if ($rem) { | } else if ($rem) { | ||||
| return $type_obj->getFeedRemoveString( | return $type_obj->getFeedRemoveString( | ||||
| $this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
| $this->renderHandleLink($object_phid), | $this->renderHandleLink($object_phid), | ||||
| new PhutilNumber(count($rem)), | phutil_count($rem), | ||||
| $this->renderHandleList($rem)); | $this->renderHandleList($rem)); | ||||
| } else { | } else { | ||||
| return pht( | return pht( | ||||
| '%s edited edge metadata for %s.', | '%s edited edge metadata for %s.', | ||||
| $this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
| $this->renderHandleLink($object_phid)); | $this->renderHandleLink($object_phid)); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 385 Lines • Show Last 20 Lines | |||||