diff options
-rw-r--r-- | modules/search/controllers/search.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/search/controllers/search.php b/modules/search/controllers/search.php index 75cbaa29..261d67ee 100644 --- a/modules/search/controllers/search.php +++ b/modules/search/controllers/search.php @@ -22,13 +22,14 @@ class Search_Controller extends Controller { $page_size = module::get_var("gallery", "page_size", 9); $q = Input::instance()->get("q"); $page = Input::instance()->get("page", 1); - $offset = ($page - 1) * $page_size; // Make sure that the page references a valid offset if ($page < 1) { $page = 1; } + $offset = ($page - 1) * $page_size; + $q_with_more_terms = search::add_query_terms($q); list ($count, $result) = search::search($q_with_more_terms, $page_size, $offset); |