Skip to content

Commit 71118f8

Browse files
Bryan Cuccioliepriestley
Bryan Cuccioli
authored and
epriestley
committedJun 3, 2013
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
1 parent 0b233e4 commit 71118f8

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
 

‎src/applications/pholio/storage/PholioTransaction.php

+41
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,47 @@ public function getTitle() {
8282
return parent::getTitle();
8383
}
8484

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+
85126
public function hasChangeDetails() {
86127
switch ($this->getTransactionType()) {
87128
case PholioTransactionType::TYPE_DESCRIPTION:

0 commit comments

Comments
 (0)
Failed to load comments.