summaryrefslogtreecommitdiff
path: root/actions/showstream.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-01 11:05:15 -0700
committerBrion Vibber <brion@pobox.com>2010-10-01 11:05:15 -0700
commit12f68c4ff243829a435f774e4d486ccfb381a11d (patch)
tree7812ae39db1cc83008eca8cfea4236117b5f0da6 /actions/showstream.php
parentad7623a87fe5277706470c43fe357363891326c9 (diff)
Throw in a quick event hook to override the profile list type on showstream (should be made more general in future).
Replace with a NoticeList to have output include avatar and username -- but CSS still hides them in default theme. Event::addHandler('ShowStreamNoticeList', 'awesome'); function awesome($notice, $action, &$pnl) { $pnl = new NoticeList($notice, $action); return false; }
Diffstat (limited to 'actions/showstream.php')
-rw-r--r--actions/showstream.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/actions/showstream.php b/actions/showstream.php
index 2476f19fa..e9f117afc 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -222,7 +222,10 @@ class ShowstreamAction extends ProfileAction
? $this->user->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1)
: $this->user->getTaggedNotices($this->tag, ($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1, 0, 0, null);
- $pnl = new ProfileNoticeList($notice, $this);
+ $pnl = null;
+ if (Event::handle('ShowStreamNoticeList', array($notice, $this, &$pnl))) {
+ $pnl = new ProfileNoticeList($notice, $this);
+ }
$cnt = $pnl->show();
if (0 == $cnt) {
$this->showEmptyListMessage();