Manual:$wgDisableQueryPages/de-formal

Details
Disable all query pages if  is on, not just some.