- Affected version
- 2.2.2
PHP:
public function getResultIds(array $filters, $maxResults)
{
/** @var \XF\Finder\ProfilePost $profilePostFinder */
$profilePostFinder = \XF::finder('XF:ProfilePost')
->where('message_state', '<>', 'moderated')
->where('message_state', '<>', 'deleted')
->order('post_date', 'DESC');
$this->applyFilters($profilePostFinder, $filters);
$profilePosts = $profilePostFinder->fetch($maxResults);
$profilePosts = $this->filterResults($profilePosts);
filterResults()
calls \XF\Entity\ProfilePost::canView()
which touches ProfileUser
, which can result in some silly high query counts on the New Profile posts page before it redirects to the caches query list.getPageResultsEntities
avoids this as it fetches much more data for display.