diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 0ecf33e5ebf..8c6fc94e31f 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -520,6 +520,7 @@ $sql .= $db->order($sortfield, $sortorder); $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { + // TODO Set and use an optimized request in $sqlforcount with no fields and no useless join to caluclate nb of records $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0