diff --git a/themes/danbooru/index.theme.php b/themes/danbooru/index.theme.php index d07aadef..d5b5309c 100644 --- a/themes/danbooru/index.theme.php +++ b/themes/danbooru/index.theme.php @@ -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")); diff --git a/themes/danbooru/themelet.class.php b/themes/danbooru/themelet.class.php index cbcf868b..b2eefae8 100644 --- a/themes/danbooru/themelet.class.php +++ b/themes/danbooru/themelet.class.php @@ -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, "<<");