From e2c4c4a10fba648459cd3dd460a7aba755f1167f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Sat, 7 May 2022 14:13:18 -0300 Subject: [PATCH] Replace for with foreach in `Display\Results::getTable` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- libraries/classes/Display/Results.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index 1092aab401..a4144afc4d 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -4152,15 +4152,10 @@ class Results $sort_direction[] = ''; } - $number_of_columns = count($sort_expression_nodirection); - // 1.4 Prepares display of first and last value of the sorted column $sorted_column_message = ''; - for ($i = 0; $i < $number_of_columns; $i++) { - $sorted_column_message .= $this->getSortedColumnMessage( - $dt_result, - $sort_expression_nodirection[$i] - ); + foreach ($sort_expression_nodirection as $expression) { + $sorted_column_message .= $this->getSortedColumnMessage($dt_result, $expression); } // 2. ----- Prepare to display the top of the page -----