From 598df41b1d494a15c75aa6eef6fd260a9e9c7d99 Mon Sep 17 00:00:00 2001 From: Daku Date: Mon, 6 Apr 2015 17:25:46 +0100 Subject: [PATCH] set default in display, not build to avoid errors --- core/basethemelet.class.php | 4 ++-- themes/danbooru/themelet.class.php | 2 +- themes/danbooru2/themelet.class.php | 2 +- themes/futaba/themelet.class.php | 2 +- themes/lite/themelet.class.php | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/basethemelet.class.php b/core/basethemelet.class.php index 77e2e775..acae9a52 100644 --- a/core/basethemelet.class.php +++ b/core/basethemelet.class.php @@ -84,7 +84,7 @@ class BaseThemelet { * @param int $page_number * @param int $total_pages */ - public function display_paginator(Page $page, $base, $query, $page_number, $total_pages, $show_random) { + public function display_paginator(Page $page, $base, $query, $page_number, $total_pages, $show_random = FALSE) { if($total_pages == 0) $total_pages = 1; $body = $this->build_paginator($page_number, $total_pages, $base, $query, $show_random); $page->add_block(new Block(null, $body, "main", 90, "paginator")); @@ -129,7 +129,7 @@ class BaseThemelet { * @param string $query * @return string */ - private function build_paginator($current_page, $total_pages, $base_url, $query, $show_random = FALSE) { + private function build_paginator($current_page, $total_pages, $base_url, $query, $show_random) { $next = $current_page + 1; $prev = $current_page - 1; diff --git a/themes/danbooru/themelet.class.php b/themes/danbooru/themelet.class.php index 11122f3e..ff6b5cd4 100644 --- a/themes/danbooru/themelet.class.php +++ b/themes/danbooru/themelet.class.php @@ -7,7 +7,7 @@ class Themelet extends BaseThemelet { * @param int $page_number * @param int $total_pages */ - public function display_paginator(Page $page, $base, $query, $page_number, $total_pages, $show_random) { + public function display_paginator(Page $page, $base, $query, $page_number, $total_pages, $show_random = FALSE) { if($total_pages == 0) $total_pages = 1; $body = $this->build_paginator($page_number, $total_pages, $base, $query); $page->add_block(new Block(null, $body, "main", 90)); diff --git a/themes/danbooru2/themelet.class.php b/themes/danbooru2/themelet.class.php index 11122f3e..ff6b5cd4 100644 --- a/themes/danbooru2/themelet.class.php +++ b/themes/danbooru2/themelet.class.php @@ -7,7 +7,7 @@ class Themelet extends BaseThemelet { * @param int $page_number * @param int $total_pages */ - public function display_paginator(Page $page, $base, $query, $page_number, $total_pages, $show_random) { + public function display_paginator(Page $page, $base, $query, $page_number, $total_pages, $show_random = FALSE) { if($total_pages == 0) $total_pages = 1; $body = $this->build_paginator($page_number, $total_pages, $base, $query); $page->add_block(new Block(null, $body, "main", 90)); diff --git a/themes/futaba/themelet.class.php b/themes/futaba/themelet.class.php index 96a5f64f..6681ef43 100644 --- a/themes/futaba/themelet.class.php +++ b/themes/futaba/themelet.class.php @@ -11,7 +11,7 @@ class Themelet extends BaseThemelet { * @param int $total_pages * @param int $position */ - public function display_paginator(Page $page, $base, $query, $page_number, $total_pages, $show_random) { + public function display_paginator(Page $page, $base, $query, $page_number, $total_pages, $show_random = FALSE) { if($total_pages == 0) $total_pages = 1; $body = $this->futaba_build_paginator($page_number, $total_pages, $base, $query); $page->add_block(new Block(null, $body, "main", 90)); diff --git a/themes/lite/themelet.class.php b/themes/lite/themelet.class.php index c3f7f4c2..6182b0bb 100644 --- a/themes/lite/themelet.class.php +++ b/themes/lite/themelet.class.php @@ -28,7 +28,7 @@ class Themelet extends BaseThemelet { * @param int $page_number * @param int $total_pages */ - public function display_paginator(Page $page, $base, $query, $page_number, $total_pages, $show_random) { + public function display_paginator(Page $page, $base, $query, $page_number, $total_pages, $show_random = FALSE) { if($total_pages == 0) $total_pages = 1; $body = $this->litetheme_build_paginator($page_number, $total_pages, $base, $query, $show_random); $page->add_block(new Block(null, $body, "main", 90)); @@ -71,7 +71,7 @@ class Themelet extends BaseThemelet { * @param string $query * @return string */ - public function litetheme_build_paginator($current_page, $total_pages, $base_url, $query) { + public function litetheme_build_paginator($current_page, $total_pages, $base_url, $query, $show_random) { $next = $current_page + 1; $prev = $current_page - 1;