From e58e699288196947cdfd1c8d5ae3b501d82edd3d Mon Sep 17 00:00:00 2001 From: odain Date: Wed, 24 Dec 2025 10:43:40 +0100 Subject: [PATCH] (Jeffrey Boesten): Rewind enhancement when data already loaded --- core/dbobjectset.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/dbobjectset.class.php b/core/dbobjectset.class.php index 6d25134cf..6b10102d8 100644 --- a/core/dbobjectset.class.php +++ b/core/dbobjectset.class.php @@ -1063,7 +1063,12 @@ class DBObjectSet implements iDBObjectSetIterator $this->Load(); } - $this->m_iCurrRow = min($iRow, $this->Count()); + if ($iRow > 0) { + $this->m_iCurrRow = min($iRow, $this->Count()); + } else { + $this->m_iCurrRow = $iRow; + } + if ($this->m_iCurrRow < $this->m_iNumLoadedDBRows) { $this->m_oSQLResult->data_seek($this->m_iCurrRow); }