Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/storage/PhabricatorConfigTransaction.php
| Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
| $this->renderHandleLink($author_phid)); | $this->renderHandleLink($author_phid)); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| return parent::getTitle(); | return parent::getTitle(); | ||||
| } | } | ||||
| public function getTitleForFeed(PhabricatorFeedStory $story = null) { | |||||
| $author_phid = $this->getAuthorPHID(); | |||||
| $old = $this->getOldValue(); | |||||
| $new = $this->getNewValue(); | |||||
| switch ($this->getTransactionType()) { | |||||
| case self::TYPE_EDIT: | |||||
| $old_del = idx($old, 'deleted'); | |||||
| $new_del = idx($new, 'deleted'); | |||||
| if ($old_del && !$new_del) { | |||||
| return pht( | |||||
| '%s created %s.', | |||||
| $this->renderHandleLink($author_phid), | |||||
| $this->getObject()->getConfigKey()); | |||||
| } else if (!$old_del && $new_del) { | |||||
| return pht( | |||||
| '%s deleted %s.', | |||||
| $this->renderHandleLink($author_phid), | |||||
| $this->getObject()->getConfigKey()); | |||||
| } else if ($old_del && $new_del) { | |||||
| // This is a bug. | |||||
| return pht( | |||||
| '%s deleted %s (again?).', | |||||
| $this->renderHandleLink($author_phid), | |||||
| $this->getObject()->getConfigKey()); | |||||
| } else { | |||||
| return pht( | |||||
| '%s edited %s.', | |||||
| $this->renderHandleLink($author_phid), | |||||
| $this->getObject()->getConfigKey()); | |||||
| } | |||||
| break; | |||||
| } | |||||
| return parent::getTitle(); | |||||
| } | |||||
| public function getIcon() { | public function getIcon() { | ||||
| switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
| case self::TYPE_EDIT: | case self::TYPE_EDIT: | ||||
| return 'fa-pencil'; | return 'fa-pencil'; | ||||
| } | } | ||||
| return parent::getIcon(); | return parent::getIcon(); | ||||
| ▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines | |||||