[RSS Feed/News] N+1 query behaviour in XF\FindNew\ProfilePost::getResultIds

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
PHP:

Code:
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);
...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom