From d62de2e81fed40f08ba3face75ac41cf4f57a835 Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Fri, 3 Sep 2010 17:35:44 +0100 Subject: Reorganise list page structure --- app/controllers/application_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 959caf7ef..41108ad19 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -251,12 +251,15 @@ class ApplicationController < ActionController::Base # Peform the search @per_page = per_page if this_page.nil? - @page = (params[:page] || "1").to_i + @page = get_search_page_from_params else @page = this_page end return InfoRequest.full_search(models, @query, order, ascending, collapse, @per_page, @page) end + def get_search_page_from_params + return (params[:page] || "1").to_i + end # Store last visited pages, for contact form def set_last_request(info_request) -- cgit v1.2.3