Judge quashes £10m of London funding cuts