diff options
| author | Nathan Kinkade <nath@nkinka.de> | 2011-04-22 16:54:55 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nath@nkinka.de> | 2011-04-22 16:54:55 +0000 |
| commit | 1f7c1f18c651c58048e92d615c71ac0fe6691c10 (patch) | |
| tree | 4527c4bc08000a07c180cd1fe81792d71195d58b /modules/search/controllers/search.php | |
| parent | de6f3fce9110b777d61dec97f2a3a61d887a5ccd (diff) | |
| parent | 55da59c942c0f7171b515f0718fea8506ed4b116 (diff) | |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/search/controllers/search.php')
| -rw-r--r-- | modules/search/controllers/search.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/search/controllers/search.php b/modules/search/controllers/search.php index eef009a0..261d67ee 100644 --- a/modules/search/controllers/search.php +++ b/modules/search/controllers/search.php @@ -22,14 +22,16 @@ 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; } - list ($count, $result) = search::search($q, $page_size, $offset); + $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); $max_pages = max(ceil($count / $page_size), 1); |
