saner danbooru pagination

git-svn-id: file:///home/shish/svn/shimmie2/trunk@356 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-23 04:10:28 +00:00
parent 269154c54c
commit 069d96d282
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ class IndexTheme extends Themelet {
}
else {
$search_string = implode(' ', $this->search_terms);
$query = "search=".url_escape($search_string);
$query = "/".url_escape($search_string);
$page_title = html_escape($search_string);
}
@ -26,7 +26,7 @@ class IndexTheme extends Themelet {
$page->add_block(new Block("Search", $nav, "left", 0));
if(count($images) > 0) {
$page->add_block(new Block("Images", $this->build_table($images, $query), "main", 10));
$this->display_paginator($page, "post/list", $query, $this->page_number, $this->total_pages);
$this->display_paginator($page, "post/list$query", null, $this->page_number, $this->total_pages);
}
else {
$page->add_block(new Block("No Images Found", "No images were found to match the search criteria"));

View File

@ -31,8 +31,8 @@ class Themelet {
$prev = $current_page - 1;
$rand = rand(1, $total_pages);
$at_start = ($current_page <= 1 || $total_pages <= 1);
$at_end = ($current_page >= $total_pages);
$at_start = ($current_page <= 3 || $total_pages <= 3);
$at_end = ($current_page >= $total_pages -2);
$first_html = $at_start ? "" : $this->gen_page_link($base_url, $query, 1, "1");
$prev_html = $at_start ? "" : $this->gen_page_link($base_url, $query, $prev, "&lt;&lt;");