After a yearlong royal rumble between the San Francisco 49ers, local schools, the Brown administration and others, a judge on Wednesday ruled that local officials were wrong last year to yank $30 million in disputed tax funds from the team's new stadium.