Path: blob/master/src/applications/oauthserver/storage/PhabricatorOAuthServerTransaction.php
12242 views
<?php12final class PhabricatorOAuthServerTransaction3extends PhabricatorApplicationTransaction {45const TYPE_NAME = 'oauthserver.name';6const TYPE_REDIRECT_URI = 'oauthserver.redirect-uri';7const TYPE_DISABLED = 'oauthserver.disabled';89public function getApplicationName() {10return 'oauth_server';11}1213public function getTableName() {14return 'oauth_server_transaction';15}1617public function getApplicationTransactionType() {18return PhabricatorOAuthServerClientPHIDType::TYPECONST;19}2021public function getTitle() {22$author_phid = $this->getAuthorPHID();23$old = $this->getOldValue();24$new = $this->getNewValue();2526switch ($this->getTransactionType()) {27case PhabricatorTransactions::TYPE_CREATE:28return pht(29'%s created this OAuth application.',30$this->renderHandleLink($author_phid));31case self::TYPE_NAME:32return pht(33'%s renamed this application from "%s" to "%s".',34$this->renderHandleLink($author_phid),35$old,36$new);37case self::TYPE_REDIRECT_URI:38return pht(39'%s changed the application redirect URI from "%s" to "%s".',40$this->renderHandleLink($author_phid),41$old,42$new);43case self::TYPE_DISABLED:44if ($new) {45return pht(46'%s disabled this application.',47$this->renderHandleLink($author_phid));48} else {49return pht(50'%s enabled this application.',51$this->renderHandleLink($author_phid));52}53}5455return parent::getTitle();56}5758}596061