Differential D15620 Diff 37653 src/applications/oauthserver/storage/PhabricatorOAuthServerTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/oauthserver/storage/PhabricatorOAuthServerTransaction.php
<?php | <?php | ||||
final class PhabricatorOAuthServerTransaction | final class PhabricatorOAuthServerTransaction | ||||
extends PhabricatorApplicationTransaction { | extends PhabricatorApplicationTransaction { | ||||
const TYPE_NAME = 'oauthserver.name'; | const TYPE_NAME = 'oauthserver.name'; | ||||
const TYPE_REDIRECT_URI = 'oauthserver.redirect-uri'; | const TYPE_REDIRECT_URI = 'oauthserver.redirect-uri'; | ||||
const TYPE_DISABLED = 'oauthserver.disabled'; | |||||
public function getApplicationName() { | public function getApplicationName() { | ||||
return 'oauth_server'; | return 'oauth_server'; | ||||
} | } | ||||
public function getTableName() { | public function getTableName() { | ||||
return 'oauth_server_transaction'; | return 'oauth_server_transaction'; | ||||
} | } | ||||
Show All 23 Lines | switch ($this->getTransactionType()) { | ||||
$old, | $old, | ||||
$new); | $new); | ||||
case self::TYPE_REDIRECT_URI: | case self::TYPE_REDIRECT_URI: | ||||
return pht( | return pht( | ||||
'%s changed the application redirect URI from "%s" to "%s".', | '%s changed the application redirect URI from "%s" to "%s".', | ||||
$this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
$old, | $old, | ||||
$new); | $new); | ||||
case self::TYPE_DISABLED: | |||||
if ($new) { | |||||
return pht( | |||||
'%s disabled this application.', | |||||
$this->renderHandleLink($author_phid)); | |||||
} else { | |||||
return pht( | |||||
'%s enabled this application.', | |||||
$this->renderHandleLink($author_phid)); | |||||
} | |||||
} | } | ||||
return parent::getTitle(); | return parent::getTitle(); | ||||
} | } | ||||
} | } |