Skip to content

Commit cd59fa5

Browse files
author
Marius Burkard
committed
Merge branch 'patch-search-full-result-count' into 'develop'
In search show the full result count instead of capped at 10. See merge request ispconfig/ispconfig3!1341
2 parents 8e777cd + 6f29d68 commit cd59fa5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

interface/web/dashboard/ajax_get_json.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,14 @@ function _search($module, $section, $additional_sql = '', $params = ''){
194194
if(is_array($results) && !empty($results)){
195195
$lng_file = '../'.$module.'/lib/lang/'.$_SESSION['s']['language'].'_'.$section.'.lng';
196196
if(is_file($lng_file)) include $lng_file;
197+
198+
// Get the real result count, without LIMIT.
199+
$sql_real_rows = "SELECT COUNT(*) as `c` FROM ?? WHERE ".$where_clause.$authsql.$order_clause;
200+
201+
$result_count = $app->db->queryOneRecord($sql_real_rows, $db_table);
202+
197203
$result_array['cheader'] = array('title' => $category_title,
198-
'total' => count($results),
204+
'total' => $result_count['c'],
199205
'limit' => count($results)
200206
);
201207
foreach($results as $result){

0 commit comments

Comments
 (0)