1. 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...

Discussion in 'Closed Suggestions' started by Jaxel, Feb 9, 2011.

  1. Jaxel

    Jaxel Well-Known Member

    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)';
    			}
     
  2. Mike

    Mike XenForo Developer Staff Member

    first_post_id is already there :)
     
  3. ragtek

    ragtek Guest

    Isn't it already there?

    Edit
    Oh, mike was faster
     

Share This Page