But the ruling will not restore tens of millions in funds cut earlier this summer.