Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/storage/ManiphestTransaction.php
Show First 20 Lines • Show All 548 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
break; | break; | ||||
} | } | ||||
return parent::getTitle(); | return parent::getTitle(); | ||||
} | } | ||||
public function getTitleForFeed(PhabricatorFeedStory $story) { | public function getTitleForFeed() { | ||||
$author_phid = $this->getAuthorPHID(); | $author_phid = $this->getAuthorPHID(); | ||||
$object_phid = $this->getObjectPHID(); | $object_phid = $this->getObjectPHID(); | ||||
$old = $this->getOldValue(); | $old = $this->getOldValue(); | ||||
$new = $this->getNewValue(); | $new = $this->getNewValue(); | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case self::TYPE_TITLE: | case self::TYPE_TITLE: | ||||
▲ Show 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
$new_name); | $new_name); | ||||
} | } | ||||
case self::TYPE_EDGE: | case self::TYPE_EDGE: | ||||
// TODO: Remove this when we switch to real edges. Just reuse the | // TODO: Remove this when we switch to real edges. Just reuse the | ||||
// code in the parent; | // code in the parent; | ||||
$clone = clone $this; | $clone = clone $this; | ||||
$clone->setTransactionType(PhabricatorTransactions::TYPE_EDGE); | $clone->setTransactionType(PhabricatorTransactions::TYPE_EDGE); | ||||
return $clone->getTitleForFeed($story); | return $clone->getTitleForFeed(); | ||||
case self::TYPE_ATTACH: | case self::TYPE_ATTACH: | ||||
$old = nonempty($old, array()); | $old = nonempty($old, array()); | ||||
$new = nonempty($new, array()); | $new = nonempty($new, array()); | ||||
$new = array_keys(idx($new, 'FILE', array())); | $new = array_keys(idx($new, 'FILE', array())); | ||||
$old = array_keys(idx($old, 'FILE', array())); | $old = array_keys(idx($old, 'FILE', array())); | ||||
$added = array_diff($new, $old); | $added = array_diff($new, $old); | ||||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
'%s merged %d task(s) %s into %s.', | '%s merged %d task(s) %s into %s.', | ||||
$this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
count($new), | count($new), | ||||
$this->renderHandleList($new), | $this->renderHandleList($new), | ||||
$this->renderHandleLink($object_phid)); | $this->renderHandleLink($object_phid)); | ||||
} | } | ||||
return parent::getTitleForFeed($story); | return parent::getTitleForFeed(); | ||||
} | } | ||||
public function hasChangeDetails() { | public function hasChangeDetails() { | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case self::TYPE_DESCRIPTION: | case self::TYPE_DESCRIPTION: | ||||
return true; | return true; | ||||
} | } | ||||
return parent::hasChangeDetails(); | return parent::hasChangeDetails(); | ||||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |