]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/oauthappssettings.php
Merge branch '1.0.x' into testing
[quix0rs-gnu-social.git] / actions / oauthappssettings.php
index 6c0670b17bfecc31605fd9316a6aa5394eda2a3d..a7a4b219a3ddaad9f8c76e0d54fb38db1a86475c 100644 (file)
@@ -31,9 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-require_once INSTALLDIR . '/lib/settingsaction.php';
-require_once INSTALLDIR . '/lib/applicationlist.php';
-
 /**
  * Show a user's registered OAuth applications
  *
@@ -56,6 +53,7 @@ class OauthappssettingsAction extends SettingsAction
         $this->page = ($this->arg('page')) ? ($this->arg('page') + 0) : 1;
 
         if (!common_logged_in()) {
+            // TRANS: Message displayed to an anonymous user trying to view OAuth application list.
             $this->clientError(_('You must be logged in to list your applications.'));
             return false;
         }
@@ -71,6 +69,7 @@ class OauthappssettingsAction extends SettingsAction
 
     function title()
     {
+        // TRANS: Page title for OAuth applications
         return _('OAuth applications');
     }
 
@@ -82,6 +81,7 @@ class OauthappssettingsAction extends SettingsAction
 
     function getInstructions()
     {
+        // TRANS: Page instructions for OAuth applications
         return _('Applications you have registered');
     }
 
@@ -100,6 +100,7 @@ class OauthappssettingsAction extends SettingsAction
 
         $application = new Oauth_application();
         $application->owner = $user->id;
+        $application->whereAdd("name != 'anonymous'");
         $application->limit($offset, $limit);
         $application->orderBy('created DESC');
         $application->find();
@@ -119,6 +120,7 @@ class OauthappssettingsAction extends SettingsAction
             array('href' => common_local_url('newapplication'),
                   'class' => 'more'
             ),
+            // TRANS: Link description to add a new OAuth application.
             'Register a new application');
         $this->elementEnd('p');
 
@@ -132,6 +134,7 @@ class OauthappssettingsAction extends SettingsAction
 
     function showEmptyListMessage()
     {
+        // TRANS: Empty list message on page with OAuth applications.
         $message = sprintf(_('You have not registered any applications yet.'));
 
         $this->elementStart('div', 'guide');
@@ -160,7 +163,5 @@ class OauthappssettingsAction extends SettingsAction
                               'Try again, please.'));
             return;
         }
-
     }
-
 }