On 7/10/07, Yuri Astrakhan yuriastrakhan@gmail.com wrote:
The very important part is that no hook should be able to dynamically say that a page cannot be viewed. As for whitelists, I am not sure it's efficient to pass a list of whitelisted items in every query:
SELECT ... WHERE ... AND ( xx_namespace NOT IN (banned NSs) OR (xx_namespace IN (banned NSs) AND (xx_title IN (whitelist) )
Instead of just "xx_namespace NOT IN (bannedr NSs)".
It would only need to be xx_namespace NOT IN (banned NSes) OR xx_id IN (whitelist). See, those logic classes are good for something:
!p || (p && q) <=> (!p || p) && (!p || q) <=> !p || q
I shouldn't imagine that would be any less efficient than what you currently do. You should probably look at EXPLAIN and see.