summaryrefslogtreecommitdiff
path: root/modules/search/controllers/search.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/search/controllers/search.php')
-rw-r--r--modules/search/controllers/search.php6
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);