]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add profile to stream function
authorEvan Prodromou <evan@status.net>
Tue, 22 Mar 2011 22:15:53 +0000 (18:15 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 22 Mar 2011 22:15:53 +0000 (18:15 -0400)
classes/Notice.php

index 03ce36640b8c3035978b1e2551d1793a0975d69f..4e688218f85b56ce23425b8be748cef3cbff18dd 100644 (file)
@@ -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) ||