]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile.php
don't show private lists; correct link in header
[quix0rs-gnu-social.git] / classes / Profile.php
index b44ad77dd204a898661ef6996359250776e43246..c23fc1fed2083add4d9dc2cc09e4b74ff13b6f50 100644 (file)
@@ -1324,7 +1324,7 @@ class Profile extends Memcached_DataObject
         return $profile;
     }
 
-    function getLists($offset, $limit)
+    function getLists($showPrivate)
     {
         $ids = array();
 
@@ -1352,7 +1352,11 @@ class Profile extends Memcached_DataObject
         $lists = array();
 
         foreach ($ids as $id) {
-            $lists[] = Profile_list::staticGet('id', $id);
+            $list = Profile_list::staticGet('id', $id);
+            if (!empty($list) && 
+                ($showPrivate || !$list->private)) {
+                $lists[] = $list;
+            }
         }
 
         return new ArrayWrapper($lists);