Page MenuHomePhabricator

D8898.diff
No OneTemporary

D8898.diff

diff --git a/src/applications/repository/storage/PhabricatorRepositoryTransaction.php b/src/applications/repository/storage/PhabricatorRepositoryTransaction.php
--- a/src/applications/repository/storage/PhabricatorRepositoryTransaction.php
+++ b/src/applications/repository/storage/PhabricatorRepositoryTransaction.php
@@ -338,8 +338,8 @@
return pht(
'%s changed the push policy of this repository from "%s" to "%s".',
$this->renderHandleLink($author_phid),
- $this->renderPolicyName($old),
- $this->renderPolicyName($new));
+ $this->renderPolicyName($old, 'old'),
+ $this->renderPolicyName($new, 'new'));
case self::TYPE_DANGEROUS:
if ($new) {
return pht(
diff --git a/src/applications/transactions/controller/PhabricatorApplicationTransactionValueController.php b/src/applications/transactions/controller/PhabricatorApplicationTransactionValueController.php
--- a/src/applications/transactions/controller/PhabricatorApplicationTransactionValueController.php
+++ b/src/applications/transactions/controller/PhabricatorApplicationTransactionValueController.php
@@ -27,10 +27,15 @@
// to show the details of custom policies. If / when this pathway
// supports more transaction types, rendering coding should be moved
// into PhabricatorTransactions e.g. feed rendering code.
+
+ // TODO: This should be some kind of "hey do you support this?" thing on
+ // the transactions themselves.
+
switch ($xaction->getTransactionType()) {
case PhabricatorTransactions::TYPE_VIEW_POLICY:
case PhabricatorTransactions::TYPE_EDIT_POLICY:
case PhabricatorTransactions::TYPE_JOIN_POLICY:
+ case PhabricatorRepositoryTransaction::TYPE_PUSH_POLICY:
break;
default:
return new Aphront404Response();
diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
--- a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
+++ b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
@@ -311,7 +311,7 @@
}
}
- private function renderPolicyName($phid, $state = 'old') {
+ protected function renderPolicyName($phid, $state = 'old') {
$policy = PhabricatorPolicy::newFromPolicyAndHandle(
$phid,
$this->getHandleIfExists($phid));

File Metadata

Mime Type
text/plain
Expires
Wed, May 22, 3:45 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6295433
Default Alt Text
D8898.diff (2 KB)

Event Timeline