• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Thread Condition FIRST_POST should include post id...

Jaxel

Well-known member
#1
Line 147 on XenForo_Model_Thread
Code:
			if ($fetchOptions['join'] & self::FETCH_FIRSTPOST)
			{
				$selectFields .= ',
					post.message, post.attach_count';
				$joinTables .= '
					INNER JOIN xf_post AS post ON
						(post.post_id = thread.first_post_id)';
			}
What good is having attach_count if you can't retrieve attachments without a post_id? Shouldn't this be changed to:
Code:
			if ($fetchOptions['join'] & self::FETCH_FIRSTPOST)
			{
				$selectFields .= ',
					post.post_id, post.message, post.attach_count';
				$joinTables .= '
					INNER JOIN xf_post AS post ON
						(post.post_id = thread.first_post_id)';
			}