(c) The tenant may be restored to possession of the property under the terms of the original lease if, before the expiration of six months after the landlord obtains possession due to the tenant's abandonment or surrender of the property or the landlord prevails in the action, the tenant or a creditor holding a legal or equitable lien on the property: (1) pays to the landlord or brings into court the amount of rent then in arrears, with interest and the costs of the action; and (2) performs the other agreements or legal obligations that are in default. § Subd. 3. Recording of eviction or ejectment actions.