From: Evan Prodromou Date: Sat, 9 Apr 2011 21:07:03 +0000 (-0400) Subject: hide poll response notices from threaded view X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b80ece169161900a8fc865f50fe13e6aa2f1a620;p=quix0rs-gnu-social.git hide poll response notices from threaded view --- diff --git a/plugins/Poll/PollPlugin.php b/plugins/Poll/PollPlugin.php index 4e7b2c5273..f9b5808b1c 100644 --- a/plugins/Poll/PollPlugin.php +++ b/plugins/Poll/PollPlugin.php @@ -480,4 +480,18 @@ class PollPlugin extends MicroAppPlugin // TRANS: Application title. return _m('APPTITLE','Poll'); } + + function onStartShowThreadedNoticeTail($nli, $notice, &$children) + { + // Filter out any poll responses + if ($notice->object_type == self::POLL_OBJECT) { + $children = array_filter($children, array($this, 'isNotPollResponse')); + } + return true; + } + + function isNotPollResponse($notice) + { + return ($notice->object_type != self::POLL_RESPONSE_OBJECT); + } }