This commit is contained in:
Shish
2019-11-04 00:42:06 +00:00
parent d17e207984
commit f79eafc91e
11 changed files with 32 additions and 46 deletions

View File

@@ -54,17 +54,16 @@ class ArrowkeyNavigation extends Extension
// get the amount of images per page
$images_per_page = $config->get_int(IndexConfig::IMAGES);
if($event->count_args() > 1) {
// if there are tags, use pages with tags
if ($event->count_args() > 1) {
// if there are tags, use pages with tags
$prefix = url_escape($event->get_arg(0)) . "/";
$page_number = $event->try_page_num(1);
$total_pages = ceil($database->get_one(
"SELECT count FROM tags WHERE tag=:tag",
["tag"=>$event->get_arg(0)]
) / $images_per_page);
}
else {
// if there are no tags, use default
} else {
// if there are no tags, use default
$prefix = "";
$page_number = $event->try_page_num(0);
$total_pages = ceil($database->get_one(