]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Prefill done by notice stream
authorEvan Prodromou <evan@status.net>
Wed, 21 Mar 2012 16:10:54 +0000 (12:10 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 21 Mar 2012 16:10:54 +0000 (12:10 -0400)
lib/filteringnoticestream.php
lib/scopingnoticestream.php

index 9f3b8ac8584b02ac66b8cf5074d7364b04b6c7c0..119f71e40457e298cc6c76b06e229a6e4842822d 100644 (file)
@@ -82,14 +82,11 @@ abstract class FilteringNoticeStream extends NoticeStream
                 break;
             }
 
-                       $notices = $raw->fetchAll();
-                       
-                       // XXX: this should probably only be in the scoping one.
-                       
-                       Notice::fillGroups($notices);
-                       Notice::fillReplies($notices);
-                       
-                       foreach ($notices as $notice) {
+            $notices = $raw->fetchAll();
+            
+            $this->prefill($notices);
+
+            foreach ($notices as $notice) {
                 if ($this->filter($notice)) {
                     $filtered[] = $notice;
                     if (count($filtered) >= $total) {
@@ -127,4 +124,9 @@ abstract class FilteringNoticeStream extends NoticeStream
 
         return $ids;
     }
+
+    function prefill($notices)
+    {
+        return;
+    }
 }
index 30b80f10e57569866d4b50518a0ec61078e1058b..30a7b708d202eb1a62539fc04b36ed4552e553b4 100644 (file)
@@ -73,4 +73,12 @@ class ScopingNoticeStream extends FilteringNoticeStream
     {
         return $notice->inScope($this->profile);
     }
+
+    function prefill($notices)
+    {
+        // XXX: this should probably only be in the scoping one.
+            
+        Notice::fillGroups($notices);
+        Notice::fillReplies($notices);
+    }
 }