Court rules on cycling funding legality