X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fdeleteapplication.php;h=5d7441098c8f73f1068491d5509208935626420e;hb=0a2c51510ca785b5e3564fc0830518527929dc38;hp=272a91762c7cbbeb6ee17af8ff863200656747c6;hpb=62dfdb34a613f61e8f546b60468e1a73ee18d7e0;p=quix0rs-gnu-social.git diff --git a/actions/deleteapplication.php b/actions/deleteapplication.php index 272a91762c..5d7441098c 100644 --- a/actions/deleteapplication.php +++ b/actions/deleteapplication.php @@ -60,16 +60,14 @@ class DeleteapplicationAction extends Action if (!common_logged_in()) { // TRANS: Client error displayed trying to delete an application while not logged in. $this->clientError(_('You must be logged in to delete an application.')); - return false; } $id = (int)$this->arg('id'); - $this->app = Oauth_application::staticGet('id', $id); + $this->app = Oauth_application::getKV('id', $id); if (empty($this->app)) { // TRANS: Client error displayed trying to delete an application that does not exist. $this->clientError(_('Application not found.')); - return false; } $cur = common_current_user(); @@ -77,7 +75,6 @@ class DeleteapplicationAction extends Action if ($cur->id != $this->app->owner) { // TRANS: Client error displayed trying to delete an application the current user does not own. $this->clientError(_('You are not the owner of this application.'), 401); - return false; } return true; @@ -99,8 +96,8 @@ class DeleteapplicationAction extends Action // CSRF protection $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->clientError(_('There was a problem with your session token.')); - return; } if ($this->arg('no')) { @@ -158,13 +155,13 @@ class DeleteapplicationAction extends Action 'submit form_action-primary', 'no', // TRANS: Submit button title for 'No' when deleting an application. - _('Do not delete this application')); + _('Do not delete this application.')); $this->submit('form_action-yes', // TRANS: Button label on the delete application form. _m('BUTTON','Yes'), 'submit form_action-secondary', // TRANS: Submit button title for 'Yes' when deleting an application. - 'yes', _('Delete this application')); + 'yes', _('Delete this application.')); $this->elementEnd('fieldset'); $this->elementEnd('form'); }