Skip to content

Commit 6f29d68

Browse files
committed
Apply 1 suggestion(s) to 1 file(s)
1 parent 874733d commit 6f29d68

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

interface/web/dashboard/ajax_get_json.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ function _search($module, $section, $additional_sql = '', $params = ''){
196196
if(is_file($lng_file)) include $lng_file;
197197

198198
// Get the real result count, without LIMIT.
199-
$sql_real_rows = preg_replace(array('/\*/', "/ LIMIT.*$/"), array('COUNT(*) as c', ''), $sql);
199+
$sql_real_rows = "SELECT COUNT(*) as `c` FROM ?? WHERE ".$where_clause.$authsql.$order_clause;
200+
200201
$result_count = $app->db->queryOneRecord($sql_real_rows, $db_table);
201202

202203
$result_array['cheader'] = array('title' => $category_title,

0 commit comments

Comments
 (0)