Court rules government funding cuts unlawful