It has nothing to do with any kind of Patriot/equivalent act. The border search exception was authorized by the First Congress in 1789. It is extremely well established that at international borders the government can conduct warrantless searches and seizures, as long as they are reasonable.
In this case, the court did not feel that the search was reasonable, citing such factors as the actual search not taking place until after the person had left, and the search taking place far away from the border.