[rss_images] fix page matching... for real?
This commit is contained in:
parent
4544960a4b
commit
ed0eb1401c
1 changed files with 6 additions and 11 deletions
|
@ -24,17 +24,12 @@ class RSSImages extends Extension
|
||||||
public function onPageRequest(PageRequestEvent $event): void
|
public function onPageRequest(PageRequestEvent $event): void
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
if ($event->page_starts_with("rss/images")) {
|
if (
|
||||||
if ($event->page_matches("rss/images/{search}/{page}")) {
|
$event->page_matches("rss/images", paged: true)
|
||||||
$search_terms = Tag::explode($event->get_arg('search'));
|
|| $event->page_matches("rss/images/{search}", paged: true)
|
||||||
$page_number = int_escape($event->get_arg('page'));
|
) {
|
||||||
} elseif ($event->page_matches("rss/images/{page}")) {
|
$search_terms = Tag::explode($event->get_arg('search', ""));
|
||||||
$search_terms = [];
|
$page_number = $event->get_iarg('page_num', 1);
|
||||||
$page_number = int_escape($event->get_arg('page'));
|
|
||||||
} else {
|
|
||||||
$search_terms = [];
|
|
||||||
$page_number = 1;
|
|
||||||
}
|
|
||||||
$page_size = $config->get_int(IndexConfig::IMAGES);
|
$page_size = $config->get_int(IndexConfig::IMAGES);
|
||||||
if (SPEED_HAX && $page_number > 9) {
|
if (SPEED_HAX && $page_number > 9) {
|
||||||
return;
|
return;
|
||||||
|
|
Reference in a new issue