diff --git a/interface/web/dashboard/ajax_get_json.php b/interface/web/dashboard/ajax_get_json.php index 32fc8912e05ee6c2b91f62783efc667e969c2e49..76f284352b62f48d49f0a1dc6c1f7528293b5dc9 100644 --- a/interface/web/dashboard/ajax_get_json.php +++ b/interface/web/dashboard/ajax_get_json.php @@ -194,8 +194,14 @@ function _search($module, $section, $additional_sql = '', $params = ''){ if(is_array($results) && !empty($results)){ $lng_file = '../'.$module.'/lib/lang/'.$_SESSION['s']['language'].'_'.$section.'.lng'; if(is_file($lng_file)) include $lng_file; + + // Get the real result count, without LIMIT. + $sql_real_rows = "SELECT COUNT(*) as `c` FROM ?? WHERE ".$where_clause.$authsql.$order_clause; + + $result_count = $app->db->queryOneRecord($sql_real_rows, $db_table); + $result_array['cheader'] = array('title' => $category_title, - 'total' => count($results), + 'total' => $result_count['c'], 'limit' => count($results) ); foreach($results as $result){