]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/all.php
better deletion of old avatars
[quix0rs-gnu-social.git] / actions / all.php
index 949c7227502d62bf394bd008a004dbea15ba4a69..7cd1f5beba9a9146c23eb62f0986c42de0e87447 100644 (file)
@@ -31,14 +31,14 @@ class AllAction extends ShowstreamAction {
                
                # XXX: chokety and bad
 
-               $notice->whereAdd('EXISTS (SELECT subscribed from subscription where subscriber = '.$profile->id.')', 'OR');
+               $notice->whereAdd('EXISTS (SELECT subscribed from subscription where subscriber = '.$profile->id.' and subscribed = notice.profile_id)', 'OR');
                $notice->whereAdd('profile_id = ' . $profile->id, 'OR');
                
                $notice->orderBy('created DESC');
                
                $page = $this->arg('page') || 1;
                
-               $notice->limit((($page-1)*NOTICES_PER_PAGE) + 1, NOTICES_PER_PAGE);
+               $notice->limit((($page-1)*NOTICES_PER_PAGE), NOTICES_PER_PAGE);
                
                $notice->find();
                
@@ -48,6 +48,7 @@ class AllAction extends ShowstreamAction {
                        $this->show_notice($notice);
                }
                
+               # XXX: show a link for the next page
                common_element_end('div');
        }
 }