From 31e7d46a5b03c9082d38beed413b4af91a050a63 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 22 Mar 2011 18:15:53 -0400 Subject: [PATCH] add profile to stream function --- classes/Notice.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/classes/Notice.php b/classes/Notice.php index 03ce36640b..4e688218f8 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1546,8 +1546,17 @@ class Notice extends Memcached_DataObject } } - function stream($fn, $args, $cachekey, $offset=0, $limit=20, $since_id=0, $max_id=0) + function stream($fn, $args, $cachekey, $offset=0, $limit=20, $since_id=0, $max_id=0, $profile=0) { + if ($profile === 0) { + $user = common_current_user(); + if (empty($user)) { + $profile = null; + } else { + $profile = $user->getProfile(); + } + } + $cache = Cache::instance(); if (empty($cache) || -- 2.39.5