X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Foauthconnectionssettings.php;h=9aa3ad434f452b7a3335d4e51e4b08911e17bdaf;hb=1635d459ec1988104f28f3346c45ee5aebbfcc1a;hp=bcef773ac6fe5a787f3d0d7070d73a026decbe93;hpb=5bf0c9f610d2fe7852ffafbcd51436c9e057b0a7;p=quix0rs-gnu-social.git diff --git a/actions/oauthconnectionssettings.php b/actions/oauthconnectionssettings.php index bcef773ac6..9aa3ad434f 100644 --- a/actions/oauthconnectionssettings.php +++ b/actions/oauthconnectionssettings.php @@ -32,7 +32,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { } require_once INSTALLDIR . '/lib/applicationlist.php'; -require_once INSTALLDIR . '/lib/apioauthstore.php'; /** * Show connected OAuth applications @@ -132,6 +131,7 @@ class OauthconnectionssettingsAction extends SettingsAction $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->showForm(_('There was a problem with your session token. '. 'Try again, please.')); return; @@ -142,7 +142,6 @@ class OauthconnectionssettingsAction extends SettingsAction } else { // TRANS: Client error when submitting a form with unexpected information. $this->clientError(_('Unexpected form submission.'), 401); - return false; } } @@ -163,12 +162,11 @@ class OauthconnectionssettingsAction extends SettingsAction if (empty($appUser)) { // TRANS: Client error when trying to revoke access for an application while not being a user of it. $this->clientError(_('You are not a user of that application.'), 401); - return false; } - $app = Oauth_application::staticGet('id', $appUser->application_id); + $app = Oauth_application::getKV('id', $appUser->application_id); - $datastore = new ApiStatusNetOAuthDataStore(); + $datastore = new ApiGNUsocialOAuthDataStore(); $datastore->revoke_token($appUser->token, 1); $result = $appUser->delete(); @@ -178,7 +176,6 @@ class OauthconnectionssettingsAction extends SettingsAction // TRANS: Client error when revoking access has failed for some reason. // TRANS: %s is the application ID revoking access failed for. $this->clientError(sprintf(_('Unable to revoke access for application: %s.'), $app->id)); - return false; } $msg = 'API OAuth - user %s (id: %d) revoked access token %s for app id %d';