diff options
author | Bharat Mediratta <bharat@menalto.com> | 2011-04-02 16:07:13 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2011-04-02 16:07:13 -0700 |
commit | 531baea2d974993d963094cb91975233e40ca495 (patch) | |
tree | a1a60cd195162edd2b4498f188cc0c12d4c94c70 | |
parent | 5931cc872d9ed33467712cb4a970bdbaac798ef9 (diff) | |
parent | f10648fe0af7c2ae682290812cc78568aea23829 (diff) |
Merge branch 'Ticket#1667' of git://github.com/Joe7/gallery3
-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); |