From 5a7c7bb8f28b42a900e9b48a22d76bb85b3703ae Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 19 Apr 2013 20:19:00 +0400 Subject: [PATCH] add multi parametr &thread=`thread-1,thread-2,thread-3` --- .../quip/controllers/web/LatestComments.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/components/quip/controllers/web/LatestComments.php b/core/components/quip/controllers/web/LatestComments.php index 989caff..4ca19e2 100644 --- a/core/components/quip/controllers/web/LatestComments.php +++ b/core/components/quip/controllers/web/LatestComments.php @@ -149,9 +149,15 @@ public function getComments() { $thread = $this->getProperty('thread',''); if (empty($thread)) return array(); $c = $this->modx->newQuery('quipComment'); - $c->where(array( - 'quipComment.thread' => $thread, - )); + if (strpos($thread,',')===false) { + $c->where(array( + 'quipComment.thread' => $thread, + )); + }else{ + $c->where(array( + 'quipComment.thread:IN' => explode(',', $thread), + )); + } break; case 'family': $family = $this->getProperty('family','');