summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-07-23 14:45:21 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-07-23 14:45:21 -0700
commit749d9bfbbf65d962804bea1fa510039da185179f (patch)
tree6d49205a0e305ec66573f7b94329832932b52c5d
parent0a602725b1c49d246e77b24c723a65cdb0119e8e (diff)
parent5f7fb994471e4326f6aea5e29157a6236de4001f (diff)
Merge branch 'master' into 0.8.x
Conflicts: scripts/twitterstatusfetcher.php
-rw-r--r--classes/Fave.php2
-rw-r--r--classes/Notice.php3
-rw-r--r--classes/User.php2
-rwxr-xr-xscripts/twitterstatusfetcher.php2
4 files changed, 5 insertions, 4 deletions
diff --git a/classes/Fave.php b/classes/Fave.php
index 4b28d06b4..11e876ff1 100644
--- a/classes/Fave.php
+++ b/classes/Fave.php
@@ -59,7 +59,7 @@ class Fave extends Memcached_DataObject
$qry = 'SELECT fave.* FROM fave ';
$qry .= 'INNER JOIN notice ON fave.notice_id = notice.id ';
$qry .= 'WHERE fave.user_id = ' . $user_id . ' ';
- $qry .= 'AND notice.is_local != ' . NOTICE_GATEWAY . ' ';
+ $qry .= 'AND notice.is_local != ' . Notice::GATEWAY . ' ';
}
if ($since_id != 0) {
diff --git a/classes/Notice.php b/classes/Notice.php
index 101fadb67..413d281f3 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -32,7 +32,6 @@ define('NOTICE_CACHE_WINDOW', 61);
define('NOTICE_LOCAL_PUBLIC', 1);
define('NOTICE_REMOTE_OMB', 0);
define('NOTICE_LOCAL_NONPUBLIC', -1);
-define('NOTICE_GATEWAY', -2);
define('MAX_BOXCARS', 128);
@@ -63,6 +62,8 @@ class Notice extends Memcached_DataObject
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
+ const GATEWAY = -2;
+
function getProfile()
{
return Profile::staticGet('id', $this->profile_id);
diff --git a/classes/User.php b/classes/User.php
index 6c1f149e4..bea47a3b0 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -443,7 +443,7 @@ class User extends Memcached_DataObject
'SELECT notice.* ' .
'FROM notice JOIN subscription ON notice.profile_id = subscription.subscribed ' .
'WHERE subscription.subscriber = %d ' .
- 'AND notice.is_local != ' . NOTICE_GATEWAY;
+ 'AND notice.is_local != ' . Notice::GATEWAY;
return Notice::getStream(sprintf($qry, $this->id),
'user:notices_with_friends:' . $this->id,
$offset, $limit, $since_id, $before_id,
diff --git a/scripts/twitterstatusfetcher.php b/scripts/twitterstatusfetcher.php
index e2ba1d003..e1745cfc0 100755
--- a/scripts/twitterstatusfetcher.php
+++ b/scripts/twitterstatusfetcher.php
@@ -330,7 +330,7 @@ class TwitterStatusFetcher extends Daemon
$notice->rendered = common_render_content($notice->content, $notice);
$notice->source = 'twitter';
$notice->reply_to = null; // XXX lookup reply
- $notice->is_local = NOTICE_GATEWAY;
+ $notice->is_local = Notice::GATEWAY;
if (Event::handle('StartNoticeSave', array(&$notice))) {
$id = $notice->insert();