summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-22 10:20:50 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-22 10:20:50 -0400
commit5f79bcdf51e0cbc17f62c6899207813f26a29214 (patch)
treef476596fa45958f73a7ea83e665ff1f1b14fe0f2
parentb1282b1b9fd9997d15f127810f98117e01b72daa (diff)
public timeline only gets local notices
darcs-hash:20080722142050-84dde-b948048b7f85e24c59dc063ef298bcc4c386d33a.gz
-rw-r--r--actions/public.php6
-rw-r--r--actions/publicrss.php6
-rw-r--r--actions/twitapistatuses.php7
3 files changed, 10 insertions, 9 deletions
diff --git a/actions/public.php b/actions/public.php
index 98e570e80..d2285fb8f 100644
--- a/actions/public.php
+++ b/actions/public.php
@@ -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');
diff --git a/actions/publicrss.php b/actions/publicrss.php
index 621058d3f..185a4ff78 100644
--- a/actions/publicrss.php
+++ b/actions/publicrss.php
@@ -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');
diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php
index 670aaebf0..47e3ffcd9 100644
--- a/actions/twitapistatuses.php
+++ b/actions/twitapistatuses.php
@@ -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();