]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/oauthappssettings.php
OAuth widgets separated into their own files
[quix0rs-gnu-social.git] / actions / oauthappssettings.php
index e75f014ab5186da0819d00375543f9e4460097c1..e9b6280feb81ad65e1f0c1374b1d22de2c641b37 100644 (file)
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET') && !defined('LACONICA')) {
-    exit(1);
-}
-
-require_once INSTALLDIR . '/lib/settingsaction.php';
-require_once INSTALLDIR . '/lib/applicationlist.php';
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * Show a user's registered OAuth applications
@@ -56,8 +51,8 @@ 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;
         }
 
         return true;
@@ -71,6 +66,7 @@ class OauthappssettingsAction extends SettingsAction
 
     function title()
     {
+        // TRANS: Page title for OAuth applications
         return _('OAuth applications');
     }
 
@@ -82,6 +78,7 @@ class OauthappssettingsAction extends SettingsAction
 
     function getInstructions()
     {
+        // TRANS: Page instructions for OAuth applications
         return _('Applications you have registered');
     }
 
@@ -120,6 +117,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');
 
@@ -133,6 +131,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');
@@ -161,7 +160,5 @@ class OauthappssettingsAction extends SettingsAction
                               'Try again, please.'));
             return;
         }
-
     }
-
 }