From 0238aa9d196b4b7c12e0319807c83ce20cd5cf93 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 21 Mar 2012 12:10:54 -0400 Subject: [PATCH] Prefill done by notice stream --- lib/filteringnoticestream.php | 18 ++++++++++-------- lib/scopingnoticestream.php | 8 ++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lib/filteringnoticestream.php b/lib/filteringnoticestream.php index 9f3b8ac858..119f71e404 100644 --- a/lib/filteringnoticestream.php +++ b/lib/filteringnoticestream.php @@ -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; + } } diff --git a/lib/scopingnoticestream.php b/lib/scopingnoticestream.php index 30b80f10e5..30a7b708d2 100644 --- a/lib/scopingnoticestream.php +++ b/lib/scopingnoticestream.php @@ -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); + } }