From 610df161f5a15ee92252c3a553f78fae16fa6239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Thu, 4 Jul 2024 01:31:59 +0200 Subject: [PATCH] Show query duration for count queries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Krög --- libraries/classes/Display/Results.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index 1a325dd3391d..41e175d86d76 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -635,7 +635,7 @@ private function setDisplayPartsAndTotal(array $displayParts) if ($printView == '1') { $displayParts = $this->setDisplayPartsForPrintView($displayParts); } elseif ( - $this->properties['is_count'] || $this->properties['is_analyse'] + $this->properties['is_analyse'] || $this->properties['is_maint'] || $this->properties['is_explain'] ) { $displayParts = $this->setDisplayPartsForNonData($displayParts); @@ -658,9 +658,9 @@ private function setDisplayPartsAndTotal(array $displayParts) // if for COUNT query, number of rows returned more than 1 // (may be being used GROUP BY) - if ($this->properties['is_count'] && $numRows > 1) { - $displayParts['nav_bar'] = '1'; - $displayParts['sort_lnk'] = '1'; + if ($this->properties['is_count'] && $numRows <= 1) { + $displayParts['nav_bar'] = '0'; + $displayParts['sort_lnk'] = '0'; } // 4. If navigation bar or sorting fields names URLs should be