Differential D21816 Diff 52024 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 577 Lines • ▼ Show 20 Lines | public function shouldHide() { | ||||
$xaction_type = $this->getTransactionType(); | $xaction_type = $this->getTransactionType(); | ||||
// Always hide requests for object history. | // Always hide requests for object history. | ||||
if ($xaction_type === PhabricatorTransactions::TYPE_HISTORY) { | if ($xaction_type === PhabricatorTransactions::TYPE_HISTORY) { | ||||
return true; | return true; | ||||
} | } | ||||
// Always hide file attach/detach transactions. | |||||
if ($xaction_type === PhabricatorTransactions::TYPE_FILE) { | |||||
return true; | |||||
} | |||||
// Hide creation transactions if the old value is empty. These are | // Hide creation transactions if the old value is empty. These are | ||||
// transactions like "alice set the task title to: ...", which are | // transactions like "alice set the task title to: ...", which are | ||||
// essentially never interesting. | // essentially never interesting. | ||||
if ($this->getIsCreateTransaction()) { | if ($this->getIsCreateTransaction()) { | ||||
switch ($xaction_type) { | switch ($xaction_type) { | ||||
case PhabricatorTransactions::TYPE_CREATE: | case PhabricatorTransactions::TYPE_CREATE: | ||||
case PhabricatorTransactions::TYPE_VIEW_POLICY: | case PhabricatorTransactions::TYPE_VIEW_POLICY: | ||||
case PhabricatorTransactions::TYPE_EDIT_POLICY: | case PhabricatorTransactions::TYPE_EDIT_POLICY: | ||||
▲ Show 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | /* -( Rendering )---------------------------------------------------------- */ | ||||
public function shouldHideForMail(array $xactions) { | public function shouldHideForMail(array $xactions) { | ||||
if ($this->isSelfSubscription()) { | if ($this->isSelfSubscription()) { | ||||
return true; | return true; | ||||
} | } | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case PhabricatorTransactions::TYPE_TOKEN: | case PhabricatorTransactions::TYPE_TOKEN: | ||||
return true; | return true; | ||||
case PhabricatorTransactions::TYPE_EDGE: | case PhabricatorTransactions::TYPE_EDGE: | ||||
$edge_type = $this->getMetadataValue('edge:type'); | $edge_type = $this->getMetadataValue('edge:type'); | ||||
switch ($edge_type) { | switch ($edge_type) { | ||||
case PhabricatorObjectMentionsObjectEdgeType::EDGECONST: | case PhabricatorObjectMentionsObjectEdgeType::EDGECONST: | ||||
case PhabricatorObjectMentionedByObjectEdgeType::EDGECONST: | case PhabricatorObjectMentionedByObjectEdgeType::EDGECONST: | ||||
case DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST: | case DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST: | ||||
case DifferentialRevisionDependedOnByRevisionEdgeType::EDGECONST: | case DifferentialRevisionDependedOnByRevisionEdgeType::EDGECONST: | ||||
case ManiphestTaskHasCommitEdgeType::EDGECONST: | case ManiphestTaskHasCommitEdgeType::EDGECONST: | ||||
case DiffusionCommitHasTaskEdgeType::EDGECONST: | case DiffusionCommitHasTaskEdgeType::EDGECONST: | ||||
▲ Show 20 Lines • Show All 1,106 Lines • Show Last 20 Lines |