Skip to content
Snippets Groups Projects
Commit cbf3f21e authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch by Steven: fixed bug in pager_query().
parent 63f25211
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -69,8 +69,13 @@ function pager_query($query, $limit = 10, $element = 0, $count_query = NULL) { ...@@ -69,8 +69,13 @@ function pager_query($query, $limit = 10, $element = 0, $count_query = NULL) {
// Convert comma-separated $from to an array, used by other functions. // Convert comma-separated $from to an array, used by other functions.
$pager_from_array = explode(',', $from); $pager_from_array = explode(',', $from);
if (count($args)) {
return db_query_range($query, $args, (int)$pager_from_array[$element], (int)$limit); return db_query_range($query, $args, (int)$pager_from_array[$element], (int)$limit);
} }
else {
return db_query_range($query, (int)$pager_from_array[$element], (int)$limit);
}
}
/** /**
* Format a query pager. * Format a query pager.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment