Manual:$wgDisableQueryPages

Details
Disable all 2>Special:MyLanguage/Manual:Hooks/wgQueryPages|query pages if   is on, not just some.