@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fixed Pholio stories in feed.

Summary: Pholio stories now reference the mock they're talking about.

Test Plan: Generate each type of story and check that they make sense in feed/inline.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T2988

Differential Revision: https://secure.phabricator.com/D6117

authored by

Bryan Cuccioli and committed by
epriestley
71118f8e 0b233e46

+41
+41
src/applications/pholio/storage/PholioTransaction.php
··· 82 82 return parent::getTitle(); 83 83 } 84 84 85 + public function getTitleForFeed() { 86 + $author_phid = $this->getAuthorPHID(); 87 + $object_phid = $this->getObjectPHID(); 88 + 89 + $old = $this->getOldValue(); 90 + $new = $this->getNewValue(); 91 + 92 + $type = $this->getTransactionType(); 93 + switch ($type) { 94 + case PholioTransactionType::TYPE_NAME: 95 + if ($old === null) { 96 + return pht( 97 + '%s created %s.', 98 + $this->renderHandleLink($author_phid), 99 + $this->renderHandleLink($object_phid)); 100 + } else { 101 + return pht( 102 + '%s renamed %s from "%s" to "%s".', 103 + $this->renderHandleLink($author_phid), 104 + $this->renderHandleLink($object_phid), 105 + $old, 106 + $new); 107 + } 108 + break; 109 + case PholioTransactionType::TYPE_DESCRIPTION: 110 + return pht( 111 + '%s updated the description for %s.', 112 + $this->renderHandleLink($author_phid), 113 + $this->renderHandleLink($object_phid)); 114 + break; 115 + case PholioTransactionType::TYPE_INLINE: 116 + return pht( 117 + '%s added an inline comment to %s.', 118 + $this->renderHandleLink($author_phid), 119 + $this->renderHandleLink($object_phid)); 120 + break; 121 + } 122 + 123 + return parent::getTitleForFeed(); 124 + } 125 + 85 126 public function hasChangeDetails() { 86 127 switch ($this->getTransactionType()) { 87 128 case PholioTransactionType::TYPE_DESCRIPTION: