SMF Development > Bug Reports

Recent Posts does not properly adhere to unapproved topics

<< < (2/3) > >>

mashby:
Well, I certainly cannot speak for 2.0.x or 2.x releases. It will be ready when it's ready (even if "it" isn't defined), but this part is interesting:

--- Quote ---This would confine it to approved posts only (and still in the boards the user can see) which would close the loophole, but would also remove the ability of moderators (who can approve) from seeing unapproved topics entirely.
--- End quote ---
You're just referring to the action=recent part? The fix you provided wouldn't affect the (!) that I see on the Showcase board. I'm pretty sure that's true. It would just impact the action=recent.

Arantor:
Yup, the only issue I'm seeing is confined to action=recent. The suggested fix is also confined to action=recent. (It would just mean that only approved topics would ever show in action=recent, as opposed to unapproved topics with approved replies, the current state of play)

I can't see the (!) on the Showcase board, nor can I see any unapproved posts or topics in it by accessing the board directly. All I can see are approved posts via action=recent.

mashby:
Your attention to detail is very admirable. How much of an impact do you see on this, referring to this point:

--- Quote ---Now, the reason for that is pure performance: there's no join to the topics table, thus the state of the topic being approved or not approved is not known at that point, and doing that does potentially slow it down significantly.
--- End quote ---
How significant is it? Sure seems like the right thing to do (correct the code) though.

Arantor:
It's already a slow query. On a big forum it's going to be painful. Any extra join makes it slower. I haven't benchmarked it on this site (though I would imagine a dev could do some decent benchmarks given this size of database)

Exactly what the effect will be, I don't know.

emanuele:
Thanks Arantor for the report, that's indeed a problem (maybe worth a patch?...that's Norv's problem :P).

I don't use much the post moderation, so I don't have a good overview, but doing a quick test (on the 2.1 code base, I don't remember changes in that area, but worth mention) it seems that when the first post of a topic is approved all the posts in that topic are approved as well.
And apparently this query is known to be "not so fast".
So, instead of touching this query wouldn't be the same to post as unapproved all the messages (irrespective of the author) when a topic is not approved?
That would avoid the need to join the topics table, downside the topic would become completely pink... :P

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version