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

- Patch #7535 by Gerhard: one could not search for the word 'From'.

parent 543d8b72
No related branches found
No related tags found
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
......@@ -55,7 +55,7 @@ function pager_query($query, $limit = 10, $element = 0, $count_query = NULL) {
// Count the total number of records in this query.
if (!isset($count_query)) {
$count_query = preg_replace(array('/SELECT.*FROM/is', '/ORDER BY .*/'), array('SELECT COUNT(*) FROM', ''), $query);
$count_query = preg_replace(array('/SELECT.*?FROM/As', '/ORDER BY .*/'), array('SELECT COUNT(*) FROM', ''), $query);
}
$pager_total[$element] = db_result(call_user_func_array('db_query', array_merge(array($count_query), $args)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment