Fixed an issue when null wueries were passed to some themes
This commit is contained in:
parent
236904087b
commit
76bd6d4238
4 changed files with 11 additions and 11 deletions
|
@ -10,13 +10,13 @@ class Themelet extends BaseThemelet
|
|||
$page->add_block(new Block(null, $body, "main", 90));
|
||||
}
|
||||
|
||||
private function gen_page_link(string $base_url, string $query, string $page, string $name): string
|
||||
private function gen_page_link(string $base_url, ?string $query, string $page, string $name): string
|
||||
{
|
||||
$link = make_link("$base_url/$page", $query);
|
||||
return "<a href='$link'>$name</a>";
|
||||
}
|
||||
|
||||
private function gen_page_link_block(string $base_url, string $query, int $page, int $current_page, string $name): string
|
||||
private function gen_page_link_block(string $base_url, ?string $query, int $page, int $current_page, string $name): string
|
||||
{
|
||||
$paginator = "";
|
||||
if ($page == $current_page) {
|
||||
|
@ -27,7 +27,7 @@ class Themelet extends BaseThemelet
|
|||
return $paginator;
|
||||
}
|
||||
|
||||
private function build_paginator(int $current_page, int $total_pages, string $base_url, string $query): string
|
||||
private function build_paginator(int $current_page, int $total_pages, string $base_url, ?string $query): string
|
||||
{
|
||||
$next = $current_page + 1;
|
||||
$prev = $current_page - 1;
|
||||
|
|
|
@ -10,13 +10,13 @@ class Themelet extends BaseThemelet
|
|||
$page->add_block(new Block(null, $body, "main", 90));
|
||||
}
|
||||
|
||||
private function gen_page_link(string $base_url, string $query, string $page, string $name): string
|
||||
private function gen_page_link(string $base_url, ?string $query, string $page, string $name): string
|
||||
{
|
||||
$link = make_link("$base_url/$page", $query);
|
||||
return "<a href='$link'>$name</a>";
|
||||
}
|
||||
|
||||
private function gen_page_link_block(string $base_url, string $query, int $page, int $current_page, string $name): string
|
||||
private function gen_page_link_block(string $base_url, ?string $query, int $page, int $current_page, string $name): string
|
||||
{
|
||||
$paginator = "";
|
||||
if ($page == $current_page) {
|
||||
|
@ -27,7 +27,7 @@ class Themelet extends BaseThemelet
|
|||
return $paginator;
|
||||
}
|
||||
|
||||
private function build_paginator(int $current_page, int $total_pages, string $base_url, string $query): string
|
||||
private function build_paginator(int $current_page, int $total_pages, string $base_url, ?string $query): string
|
||||
{
|
||||
$next = $current_page + 1;
|
||||
$prev = $current_page - 1;
|
||||
|
|
|
@ -17,13 +17,13 @@ class Themelet extends BaseThemelet
|
|||
/**
|
||||
* Generate a single HTML link.
|
||||
*/
|
||||
public function futaba_gen_page_link(string $base_url, string $query, string $page, string $name): string
|
||||
public function futaba_gen_page_link(string $base_url, ?string $query, string $page, string $name): string
|
||||
{
|
||||
$link = make_link("$base_url/$page", $query);
|
||||
return "[<a href='$link'>{$name}</a>]";
|
||||
}
|
||||
|
||||
public function futaba_gen_page_link_block(string $base_url, string $query, int $page, int $current_page, string $name): string
|
||||
public function futaba_gen_page_link_block(string $base_url, ?string $query, int $page, int $current_page, string $name): string
|
||||
{
|
||||
$paginator = "";
|
||||
if ($page == $current_page) {
|
||||
|
@ -36,7 +36,7 @@ class Themelet extends BaseThemelet
|
|||
return $paginator;
|
||||
}
|
||||
|
||||
public function futaba_build_paginator(int $current_page, int $total_pages, string $base_url, string $query): string
|
||||
public function futaba_build_paginator(int $current_page, int $total_pages, string $base_url, ?string $query): string
|
||||
{
|
||||
$next = $current_page + 1;
|
||||
$prev = $current_page - 1;
|
||||
|
|
|
@ -33,7 +33,7 @@ class Themelet extends BaseThemelet
|
|||
return "<a class='$link_class' href='$link'>$name</a>";
|
||||
}
|
||||
|
||||
public function litetheme_gen_page_link_block(string $base_url, string $query, string $page, string $current_page, string $name): string
|
||||
public function litetheme_gen_page_link_block(string $base_url, ?string $query, string $page, string $current_page, string $name): string
|
||||
{
|
||||
$paginator = "";
|
||||
|
||||
|
@ -47,7 +47,7 @@ class Themelet extends BaseThemelet
|
|||
return $paginator;
|
||||
}
|
||||
|
||||
public function litetheme_build_paginator(int $current_page, int $total_pages, string $base_url, string $query, bool $show_random): string
|
||||
public function litetheme_build_paginator(int $current_page, int $total_pages, string $base_url, ?string $query, bool $show_random): string
|
||||
{
|
||||
$next = $current_page + 1;
|
||||
$prev = $current_page - 1;
|
||||
|
|
Reference in a new issue