[Bb-trac] [bbPress] #853: topic count is calculated wrong when there are front-page stickies

bbPress bb-trac at lists.bbpress.org
Wed Apr 9 13:48:15 GMT 2008


#853: topic count is calculated wrong when there are front-page stickies
----------------------+-----------------------------------------------------
 Reporter:  _ck_      |       Owner:                    
     Type:  defect    |      Status:  new               
 Priority:  normal    |   Milestone:  1.0-beta & XML-RPC
Component:  Back-end  |     Version:                    
 Severity:  normal    |    Keywords:                    
----------------------+-----------------------------------------------------
 Think about this logic carefully for a moment:

 If you have 3 topics in a forum, and all 3 are flagged as front page super
 stickies, none will show up when you are specifically in that forum.
 Meanwhile the count outside the forum still shows three.

 This causes next page calculations to be off as well, ie. if you have 15
 topics per page, 18 topics but 3 are super stickies, bbPress navigation
 will indicate there is a next page to be seen within the forum, when there
 is actually not, so this confuses the user.

 so topic count should be `count(*) WHERE topic_status<>0 AND
 topic_sticky<>2`

 However since topic count probably only incrementally changed only when a
 topic is added and removed this might cause the need for some extra code -
 sorry about that, but it probably needs to be done to keep the navigation
 smooth.

-- 
Ticket URL: <http://trac.bbpress.org/ticket/853>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list