diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php index c448c56a27..8c0af087d0 100644 --- a/src/applications/diffusion/controller/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/DiffusionCommitController.php @@ -86,7 +86,9 @@ final class DiffusionCommitController extends DiffusionController { $commit_data, $parent_query->loadParents()); $property_list = id(new PhabricatorPropertyListView()) - ->setHasKeyboardShortcuts(true); + ->setHasKeyboardShortcuts(true) + ->setUser($user) + ->setObject($commit); foreach ($commit_properties as $key => $value) { $property_list->addProperty($key, $value); } @@ -98,6 +100,7 @@ final class DiffusionCommitController extends DiffusionController { $message = $engine->markupText($message); + $property_list->invokeWillRenderEvent(); $property_list->addTextContent( phutil_tag( 'div', @@ -105,7 +108,6 @@ final class DiffusionCommitController extends DiffusionController { 'class' => 'diffusion-commit-message phabricator-remarkup', ), $message)); - $content[] = $top_anchor; $content[] = $headsup_view; $content[] = $headsup_actions; diff --git a/src/applications/paste/controller/PhabricatorPasteViewController.php b/src/applications/paste/controller/PhabricatorPasteViewController.php index 85db9938df..f0e4c3f59c 100644 --- a/src/applications/paste/controller/PhabricatorPasteViewController.php +++ b/src/applications/paste/controller/PhabricatorPasteViewController.php @@ -120,7 +120,9 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController { array $child_phids) { $user = $this->getRequest()->getUser(); - $properties = new PhabricatorPropertyListView(); + $properties = id(new PhabricatorPropertyListView()) + ->setUser($user) + ->setObject($paste); $properties->addProperty( pht('Author'), diff --git a/src/applications/paste/storage/PhabricatorPaste.php b/src/applications/paste/storage/PhabricatorPaste.php index ba87def552..dc1d697e08 100644 --- a/src/applications/paste/storage/PhabricatorPaste.php +++ b/src/applications/paste/storage/PhabricatorPaste.php @@ -1,7 +1,7 @@ getAuthorPHID(), + ); + } + } diff --git a/src/applications/repository/storage/PhabricatorRepositoryCommit.php b/src/applications/repository/storage/PhabricatorRepositoryCommit.php index b35df5596f..ff9d2367ea 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryCommit.php +++ b/src/applications/repository/storage/PhabricatorRepositoryCommit.php @@ -2,7 +2,8 @@ final class PhabricatorRepositoryCommit extends PhabricatorRepositoryDAO - implements PhabricatorPolicyInterface { + implements PhabricatorPolicyInterface, + PhabricatorTokenReceiverInterface { protected $repositoryID; protected $phid; @@ -171,4 +172,12 @@ final class PhabricatorRepositoryCommit return $this->getRepository()->hasAutomaticCapability($capability, $viewer); } +/* -( PhabricatorTokenReceiverInterface )---------------------------------- */ + + public function getUsersToNotifyOfTokenGiven() { + return array( + $this->getAuthorPHID(), + ); + } + }