Path: blob/master/src/applications/auth/storage/PhabricatorAuthSSHKeyTransaction.php
12256 views
<?php12final class PhabricatorAuthSSHKeyTransaction3extends PhabricatorApplicationTransaction {45const TYPE_NAME = 'sshkey.name';6const TYPE_KEY = 'sshkey.key';7const TYPE_DEACTIVATE = 'sshkey.deactivate';89public function getApplicationName() {10return 'auth';11}1213public function getApplicationTransactionType() {14return PhabricatorAuthSSHKeyPHIDType::TYPECONST;15}1617public function getTitle() {18$author_phid = $this->getAuthorPHID();1920$old = $this->getOldValue();21$new = $this->getNewValue();2223switch ($this->getTransactionType()) {24case PhabricatorTransactions::TYPE_CREATE:25return pht(26'%s created this key.',27$this->renderHandleLink($author_phid));28case self::TYPE_NAME:29return pht(30'%s renamed this key from "%s" to "%s".',31$this->renderHandleLink($author_phid),32$old,33$new);34case self::TYPE_KEY:35return pht(36'%s updated the public key material for this SSH key.',37$this->renderHandleLink($author_phid));38case self::TYPE_DEACTIVATE:39if ($new) {40return pht(41'%s revoked this key.',42$this->renderHandleLink($author_phid));43} else {44return pht(45'%s reinstated this key.',46$this->renderHandleLink($author_phid));47}4849}5051return parent::getTitle();52}5354}555657