Should be consistent about using the int_escape method.
This commit is contained in:
parent
8e3fc1da9f
commit
3511711008
@ -118,7 +118,7 @@ class PageRequestEvent extends Event {
|
|||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function count_args() {
|
public function count_args() {
|
||||||
return (int)($this->arg_count - $this->part_count);
|
return int_escape($this->arg_count - $this->part_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -69,13 +69,13 @@ class ArrowkeyNavigation extends Extension {
|
|||||||
// if there are no tags, use default
|
// if there are no tags, use default
|
||||||
if ($event->get_arg(1) == null){
|
if ($event->get_arg(1) == null){
|
||||||
$prefix = "";
|
$prefix = "";
|
||||||
$page_number = (int)$event->get_arg(0);
|
$page_number = int_escape($event->get_arg(0));
|
||||||
$total_pages = ceil($database->get_one(
|
$total_pages = ceil($database->get_one(
|
||||||
"SELECT COUNT(*) FROM images") / $images_per_page);
|
"SELECT COUNT(*) FROM images") / $images_per_page);
|
||||||
}
|
}
|
||||||
else { // if there are tags, use pages with tags
|
else { // if there are tags, use pages with tags
|
||||||
$prefix = $event->get_arg(0)."/";
|
$prefix = $event->get_arg(0)."/";
|
||||||
$page_number = (int)$event->get_arg(1);
|
$page_number = int_escape($event->get_arg(1));
|
||||||
$total_pages = ceil($database->get_one(
|
$total_pages = ceil($database->get_one(
|
||||||
"SELECT count FROM tags WHERE tag=:tag",
|
"SELECT count FROM tags WHERE tag=:tag",
|
||||||
array("tag"=>$event->get_arg(0))) / $images_per_page);
|
array("tag"=>$event->get_arg(0))) / $images_per_page);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user