function _getThankYouPosts($saidgot) { if ($saidgot == 'got') { $this->header = $this->title = JText::_('COM_KUNENA_THANKYOU_GOT'); } else { $this->header = $this->title = JText::_('COM_KUNENA_THANKYOU_SAID'); } // Only available to users if (!$this->user->id) { return; } kimport('thankyou'); $this->total = 10; //$limit default is on 10 TODO make adjustable if (empty($this->threads_per_page)) { $this->threads_per_page = 10; } $idlist = KunenaThankYou::getThankYouPosts($this->user->id, $saidgot, $this->threads_per_page); $this->threadids = array(); $this->loadids = array(); foreach ($idlist as $item) { $this->threadids[$item->thread] = $item->thread; $this->loadids[$item->id] = $item->id; } $this->order = 'field(a.id,' . implode(",", $this->loadids) . ')'; $this->_common(); }