summaryrefslogtreecommitdiff
path: root/modules/search/controllers
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
committerAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
commit0733dc37fda27a5ba35f9020edf3c66aa41a95a0 (patch)
tree6877946232f1b01b1c8709054c689f6658cef34f /modules/search/controllers
parent218493c50be9362d4abed6900a816308fee5d978 (diff)
parent9379308f91a476f790fb8d444536719535c584e4 (diff)
Merge commit 'upstream/master'
Conflicts: modules/gallery/tests/xss_data.txt
Diffstat (limited to 'modules/search/controllers')
-rw-r--r--modules/search/controllers/search.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/search/controllers/search.php b/modules/search/controllers/search.php
index 08128ae8..cf9e271f 100644
--- a/modules/search/controllers/search.php
+++ b/modules/search/controllers/search.php
@@ -30,7 +30,12 @@ class Search_Controller extends Controller {
}
list ($count, $result) = search::search($q, $page_size, $offset);
+
+ $max_pages = max(ceil($count / $page_size), 1);
+
$template = new Theme_View("page.html", "search");
+ $template->set_global("page", $page);
+ $template->set_global("max_pages", $max_pages);
$template->set_global("page_size", $page_size);
$template->set_global("children_count", $count);