#698522 Make Views code work with Views 2 and Views 3, patch by rjbrown99, Ahqar, tauno, dagmar, perusio.