]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/oauthconnectionssettings.php
Better detial in connected OAuth applications list
[quix0rs-gnu-social.git] / actions / oauthconnectionssettings.php
index e4b5af1586b725f35c42b2d626b504b1f6ee9d64..56e7b02fba4f8d03aac01230f57628e642bbbdda 100644 (file)
@@ -48,6 +48,16 @@ require_once INSTALLDIR . '/lib/applicationlist.php';
 
 class OauthconnectionssettingsAction extends ConnectSettingsAction
 {
+
+    var $page = null;
+
+    function prepare($args)
+    {
+        parent::prepare($args);
+        $this->page = ($this->arg('page')) ? ($this->arg('page') + 0) : 1;
+        return true;
+    }
+
     /**
      * Title of the page
      *
@@ -59,6 +69,11 @@ class OauthconnectionssettingsAction extends ConnectSettingsAction
         return _('Connected Applications');
     }
 
+    function isReadOnly($args)
+    {
+        return true;
+    }
+
     /**
      * Instructions for use
      *
@@ -86,13 +101,16 @@ class OauthconnectionssettingsAction extends ConnectSettingsAction
 
         $application = $profile->getApplications($offset, $limit);
 
-        if ($application) {
-            $al = new ApplicationList($application, $this->user, $this);
-            $cnt = $al->show();
-            if (0 == $cnt) {
-                $this->showEmptyListMessage();
-            }
-        }
+       $cnt == 0;
+
+       if (!empty($application)) {
+           $al = new ApplicationList($application, $user, $this, true);
+           $cnt = $al->show();
+       }
+
+       if ($cnt == 0) {
+           $this->showEmptyListMessage();
+       }
 
         $this->pagination($this->page > 1, $cnt > APPS_PER_PAGE,
                           $this->page, 'connectionssettings',