Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/storage/PhamePostTransaction.php
Show First 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | switch ($type) { | ||||
$this->renderHandleLink($object_phid)); | $this->renderHandleLink($object_phid)); | ||||
break; | break; | ||||
} | } | ||||
return parent::getTitleForFeed(); | return parent::getTitleForFeed(); | ||||
} | } | ||||
public function getRemarkupBodyForFeed(PhabricatorFeedStory $story) { | public function getRemarkupBodyForFeed(PhabricatorFeedStory $story) { | ||||
$text = null; | |||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case self::TYPE_TITLE: | |||||
if ($this->getOldValue() === null) { | |||||
$post = $story->getPrimaryObject(); | |||||
$text = $post->getBody(); | |||||
} | |||||
break; | |||||
case self::TYPE_VISIBILITY: | |||||
if ($this->getNewValue() == PhameConstants::VISIBILITY_PUBLISHED) { | |||||
$post = $story->getPrimaryObject(); | |||||
$text = $post->getBody(); | |||||
} | |||||
break; | |||||
case self::TYPE_BODY: | case self::TYPE_BODY: | ||||
$text = $this->getNewValue(); | return $this->getNewValue(); | ||||
break; | |||||
} | } | ||||
return $text; | return null; | ||||
} | } | ||||
public function getColor() { | public function getColor() { | ||||
$old = $this->getOldValue(); | $old = $this->getOldValue(); | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case self::TYPE_TITLE: | case self::TYPE_TITLE: | ||||
if ($old === null) { | if ($old === null) { | ||||
Show All 33 Lines |