There are many misunderstandings about the foreclosure process. If the case has just been started, the landlord normally has 20 days to respond, but some lawfirms give thirty. That does NOT mean that at the end of the 30 days the lender has the right to the property. That is not the case at all. First of all, it is possible that he might contest the foreclosure. Many people do. The banks are not always right, there are many errors made, and often times the borrwers have fraud issues or others they can raise in defense.
Second of all, sometimes landlords with rental properties file Chapter 11 petitions, to restructure their assets and debts. Many business people do this, including Delta Airlines right now, and Lehman Brothers.. A Chapter 11 would stop the foreclosure for a long time, or maybe permanently.
Even if your landlord does nothing and the foreclosure goes forward, it will probably take at least 90 days before you actually would have to go.
It would be best to speak to your landlord again, tell him that you read what you got, that it does appear to be the same property, and that you wou;d like to know his plans.