Judge tells agencies to restore webpages and data removed after Trump’s executive order