]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile.php
let avatars be served over SSL
[quix0rs-gnu-social.git] / classes / Profile.php
index 687215b11b64a838a98a24e88c5b6c5abd3cc5dd..feabc250870c2effcff82b065b3b65eb021c8764 100644 (file)
@@ -355,10 +355,12 @@ class Profile extends Memcached_DataObject
     function getApplications($offset = 0, $limit = null)
     {
         $qry =
-          'SELECT oauth_application_user.* ' .
-          'FROM oauth_application_user ' .
-          'WHERE profile_id = %d ' .
-          'ORDER BY created DESC ';
+          'SELECT a.* ' .
+          'FROM oauth_application_user u, oauth_application a ' .
+          'WHERE u.profile_id = %d ' .
+          'AND a.id = u.application_id ' .
+          'AND u.access_type > 0 ' .
+          'ORDER BY u.created DESC ';
 
         if ($offset > 0) {
             if (common_config('db','type') == 'pgsql') {
@@ -714,6 +716,7 @@ class Profile extends Memcached_DataObject
             switch ($right)
             {
             case Right::DELETEOTHERSNOTICE:
+            case Right::MAKEGROUPADMIN:
             case Right::SANDBOXUSER:
             case Right::SILENCEUSER:
             case Right::DELETEUSER: