set default in display, not build to avoid errors
This commit is contained in:
parent
be18140944
commit
598df41b1d
@ -84,7 +84,7 @@ class BaseThemelet {
|
|||||||
* @param int $page_number
|
* @param int $page_number
|
||||||
* @param int $total_pages
|
* @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;
|
if($total_pages == 0) $total_pages = 1;
|
||||||
$body = $this->build_paginator($page_number, $total_pages, $base, $query, $show_random);
|
$body = $this->build_paginator($page_number, $total_pages, $base, $query, $show_random);
|
||||||
$page->add_block(new Block(null, $body, "main", 90, "paginator"));
|
$page->add_block(new Block(null, $body, "main", 90, "paginator"));
|
||||||
@ -129,7 +129,7 @@ class BaseThemelet {
|
|||||||
* @param string $query
|
* @param string $query
|
||||||
* @return string
|
* @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;
|
$next = $current_page + 1;
|
||||||
$prev = $current_page - 1;
|
$prev = $current_page - 1;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ class Themelet extends BaseThemelet {
|
|||||||
* @param int $page_number
|
* @param int $page_number
|
||||||
* @param int $total_pages
|
* @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;
|
if($total_pages == 0) $total_pages = 1;
|
||||||
$body = $this->build_paginator($page_number, $total_pages, $base, $query);
|
$body = $this->build_paginator($page_number, $total_pages, $base, $query);
|
||||||
$page->add_block(new Block(null, $body, "main", 90));
|
$page->add_block(new Block(null, $body, "main", 90));
|
||||||
|
@ -7,7 +7,7 @@ class Themelet extends BaseThemelet {
|
|||||||
* @param int $page_number
|
* @param int $page_number
|
||||||
* @param int $total_pages
|
* @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;
|
if($total_pages == 0) $total_pages = 1;
|
||||||
$body = $this->build_paginator($page_number, $total_pages, $base, $query);
|
$body = $this->build_paginator($page_number, $total_pages, $base, $query);
|
||||||
$page->add_block(new Block(null, $body, "main", 90));
|
$page->add_block(new Block(null, $body, "main", 90));
|
||||||
|
@ -11,7 +11,7 @@ class Themelet extends BaseThemelet {
|
|||||||
* @param int $total_pages
|
* @param int $total_pages
|
||||||
* @param int $position
|
* @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;
|
if($total_pages == 0) $total_pages = 1;
|
||||||
$body = $this->futaba_build_paginator($page_number, $total_pages, $base, $query);
|
$body = $this->futaba_build_paginator($page_number, $total_pages, $base, $query);
|
||||||
$page->add_block(new Block(null, $body, "main", 90));
|
$page->add_block(new Block(null, $body, "main", 90));
|
||||||
|
@ -28,7 +28,7 @@ class Themelet extends BaseThemelet {
|
|||||||
* @param int $page_number
|
* @param int $page_number
|
||||||
* @param int $total_pages
|
* @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;
|
if($total_pages == 0) $total_pages = 1;
|
||||||
$body = $this->litetheme_build_paginator($page_number, $total_pages, $base, $query, $show_random);
|
$body = $this->litetheme_build_paginator($page_number, $total_pages, $base, $query, $show_random);
|
||||||
$page->add_block(new Block(null, $body, "main", 90));
|
$page->add_block(new Block(null, $body, "main", 90));
|
||||||
@ -71,7 +71,7 @@ class Themelet extends BaseThemelet {
|
|||||||
* @param string $query
|
* @param string $query
|
||||||
* @return string
|
* @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;
|
$next = $current_page + 1;
|
||||||
$prev = $current_page - 1;
|
$prev = $current_page - 1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user