Merge branch 'QA_5_2'

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
This commit is contained in:
Maurício Meneghini Fauth 2025-01-30 15:48:08 -03:00
commit 797e137c55
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
3 changed files with 21 additions and 4 deletions

View File

@ -6252,6 +6252,12 @@ parameters:
count: 1
path: src/Display/Results.php
-
message: '#^Binary operation "\+" between mixed and int\|numeric\-string results in an error\.$#'
identifier: binaryOp.invalid
count: 1
path: src/Display/Results.php
-
message: '#^Binary operation "\+" between mixed and mixed results in an error\.$#'
identifier: binaryOp.invalid
@ -6321,7 +6327,7 @@ parameters:
-
message: '#^Cannot access offset ''max_rows'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 18
count: 19
path: src/Display/Results.php
-

View File

@ -4087,6 +4087,7 @@
<code><![CDATA[$_SESSION['tmpval']['max_rows']]]></code>
<code><![CDATA[$_SESSION['tmpval']['max_rows']]]></code>
<code><![CDATA[$_SESSION['tmpval']['max_rows']]]></code>
<code><![CDATA[$_SESSION['tmpval']['max_rows']]]></code>
<code><![CDATA[$_SESSION['tmpval']['pftext']]]></code>
<code><![CDATA[$_SESSION['tmpval']['pftext']]]></code>
<code><![CDATA[$_SESSION['tmpval']['pftext']]]></code>

View File

@ -616,8 +616,9 @@ class Results
$isLastPage = $this->unlimNumRows !== -1 && $this->unlimNumRows !== false
&& ($isShowingAll
|| (int) $_SESSION['tmpval']['pos'] + (int) $_SESSION['tmpval']['max_rows']
>= $this->unlimNumRows
|| ($this->isExactCount()
&& (int) $_SESSION['tmpval']['pos'] + (int) $_SESSION['tmpval']['max_rows']
>= $this->unlimNumRows)
|| $this->numRows < $_SESSION['tmpval']['max_rows']);
$onsubmit = ' onsubmit="return '
@ -663,6 +664,15 @@ class Results
];
}
private function isExactCount(): bool
{
// If we have the full page of rows, we don't know
// if there are more unless unlimNumRows is smaller than MaxExactCount
return $this->unlimNumRows < $this->config->settings['MaxExactCount']
|| $_SESSION['tmpval']['max_rows'] === self::ALL_ROWS
|| $this->numRows < $_SESSION['tmpval']['max_rows'];
}
/**
* Get the headers of the results table, for all of the columns
*
@ -3383,7 +3393,7 @@ class Results
}
} elseif ($_SESSION['tmpval']['max_rows'] === self::ALL_ROWS || $posNext > $total) {
$firstShownRec = $_SESSION['tmpval']['pos'];
$lastShownRec = $total - 1;
$lastShownRec = $firstShownRec + $this->numRows - 1;
} else {
$firstShownRec = $_SESSION['tmpval']['pos'];
$lastShownRec = $posNext - 1;