Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/storage/AlmanacNetworkTransaction.php
Show All 18 Lines | final class AlmanacNetworkTransaction | ||||
public function getTitle() { | public function getTitle() { | ||||
$author_phid = $this->getAuthorPHID(); | $author_phid = $this->getAuthorPHID(); | ||||
$old = $this->getOldValue(); | $old = $this->getOldValue(); | ||||
$new = $this->getNewValue(); | $new = $this->getNewValue(); | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case self::TYPE_NAME: | case PhabricatorTransactions::TYPE_CREATE: | ||||
if ($old === null) { | |||||
return pht( | return pht( | ||||
'%s created this network.', | '%s created this network.', | ||||
$this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
} else { | case self::TYPE_NAME: | ||||
return pht( | return pht( | ||||
'%s renamed this network from "%s" to "%s".', | '%s renamed this network from "%s" to "%s".', | ||||
$this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
$old, | $old, | ||||
$new); | $new); | ||||
} | } | ||||
break; | |||||
} | |||||
return parent::getTitle(); | return parent::getTitle(); | ||||
} | } | ||||
} | } |