]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
public timeline only gets local notices
authorEvan Prodromou <evan@prodromou.name>
Tue, 22 Jul 2008 14:20:50 +0000 (10:20 -0400)
committerEvan Prodromou <evan@prodromou.name>
Tue, 22 Jul 2008 14:20:50 +0000 (10:20 -0400)
darcs-hash:20080722142050-84dde-b948048b7f85e24c59dc063ef298bcc4c386d33a.gz

actions/public.php
actions/publicrss.php
actions/twitapistatuses.php

index 98e570e80b5b3bc3394e029859263d553e024cb4..d2285fb8fcce57a1896dc9302822e2403ed61ee6 100644 (file)
@@ -59,11 +59,11 @@ class PublicAction extends StreamAction {
 
        function show_notices($page) {
 
-               $notice = DB_DataObject::factory('notice');
+               $notice = new Notice();
 
-               # FIXME: bad performance
+               # XXX: sub-optimal
 
-               $notice->whereAdd('EXISTS (SELECT user.id from user where user.id = notice.profile_id)');
+               $notice->is_local = 1;
 
                $notice->orderBy('created DESC, notice.id DESC');
 
index 621058d3fe7668c5d887e85dc13266c055e3c2f9..185a4ff785f192c90202a70f0680485579df0256 100644 (file)
@@ -34,11 +34,11 @@ class PublicrssAction extends Rss10Action {
                $user = $this->user;
                $notices = array();
 
-               $notice = DB_DataObject::factory('notice');
+               $notice = new Notice();
 
-               # FIXME: bad performance
+               # XXX: bad performance
 
-               $notice->whereAdd('EXISTS (SELECT user.id from user where user.id = notice.profile_id)');
+               $notice->is_local = 1;
 
                $notice->orderBy('created DESC, notice.id DESC');
 
index 670aaebf0ec0a6e6cfe6babb49df4a320f97ae50..47e3ffcd9761da5261c126f50ed20414e4353bf4 100644 (file)
@@ -40,13 +40,14 @@ class TwitapistatusesAction extends TwitterapiAction {
                // Number of public statuses to return by default -- Twitter sends 20
                $MAX_PUBSTATUSES = 20;
 
-               $notice = DB_DataObject::factory('notice');
+               $notice = new Notice();
 
                // FIXME: To really live up to the spec we need to build a list
                // of notices by users who have custom avatars, so fix this SQL -- Zach
 
-               # FIXME: bad performance
-               $notice->whereAdd('EXISTS (SELECT user.id from user where user.id = notice.profile_id)');
+               # XXX: sub-optimal performance
+               
+               $notice->is_local = 1;
                $notice->orderBy('created DESC, notice.id DESC');
                $notice->limit($MAX_PUBSTATUSES);
                $cnt = $notice->find();