A federal judge sided Friday with Democrats and issued a temporary restraining order that prohibited both presidential campaigns from a variety of activities around polling places, including photographing prospective voters and their vehicles or interrogating or harassing voters inside polling places.