Skip to content

Commit

Permalink
Fix bad merge conflict resolution
Browse files Browse the repository at this point in the history
Merge commit 917c54e did not resolve
conflicted adodb.inc.php correctly: changes in the hotfix/5.22 branch
were simply ignored instead of being selectively applied.

As a result, the fix for #954 and some PHPDoc improvements were not
applied.

Fixes #960
  • Loading branch information
dregad committed Apr 18, 2023
1 parent 5e734b0 commit 760b1ca
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions adodb.inc.php
Expand Up @@ -3606,20 +3606,21 @@ function qStr($s, $magic_quotes=false) {


/**
* Will select the supplied $page number from a recordset, given that it is paginated in pages of
* $nrows rows per page. It also saves two boolean values saying if the given page is the first
* and/or last one of the recordset. Added by Iván Oliva to provide recordset pagination.
* Execute query with pagination.
*
* See docs-adodb.htm#ex8 for an example of usage.
* NOTE: phpLens uses a different algorithm and does not use PageExecute().
* Will select the supplied $page number from a recordset, divided in
* pages of $nrows rows each. It also saves two boolean values saying
* if the given page is the first and/or last one of the recordset.
*
* @param string $sql
* @param int $nrows Number of rows per page to get
* @param int $page Page number to get (1-based)
* @param mixed[]|bool $inputarr Array of bind variables
* @param int $secs2cache Private parameter only used by jlim
* @param string $sql Query to execute
* @param int $nrows Number of rows per page
* @param int $page Page number to retrieve (1-based)
* @param array|bool $inputarr Array of bind variables
* @param int $secs2cache Time-to-live of the cache (in seconds), 0 to force query execution
*
* @return ADORecordSet|bool the recordset ($rs->databaseType == 'array')
*
* @return mixed the recordset ($rs->databaseType == 'array')
* @author Iván Oliva
*/
function PageExecute($sql, $nrows, $page, $inputarr=false, $secs2cache=0) {
global $ADODB_INCLUDED_LIB;
Expand Down Expand Up @@ -4034,11 +4035,20 @@ class ADORecordSet implements IteratorAggregate {
var $_obj; /** Used by FetchObj */
var $_names; /** Used by FetchObj */

var $_currentPage = -1; /** Added by Iván Oliva to implement recordset pagination */
var $_atFirstPage = false; /** Added by Iván Oliva to implement recordset pagination */
var $_atLastPage = false; /** Added by Iván Oliva to implement recordset pagination */
// Recordset pagination
/** @var int Number of rows per page */
var $rowsPerPage;
/** @var int Current page number */
var $_currentPage = -1;
/** @var bool True if current page is the first page */
var $_atFirstPage = false;
/** @var bool True if current page is the last page */
var $_atLastPage = false;
/** @var int Last page number */
var $_lastPageNo = -1;
/** @var int Total number of rows in recordset */
var $_maxRecordCount = 0;

var $datetime = false;

public $customActualTypes;
Expand Down

0 comments on commit 760b1ca

Please sign in to comment.