mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding fix for failing DboSource tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5126 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
dcad548cac
commit
3a31e38937
1 changed files with 1 additions and 2 deletions
|
@ -1031,7 +1031,7 @@ class DboSource extends DataSource {
|
|||
$limit = '';
|
||||
|
||||
if (isset($assocData['limit'])) {
|
||||
if (!isset($assocData['offset']) && isset($assocData['page'])) {
|
||||
if ((!isset($assocData['offset']) || (empty($assocData['offset']))) && isset($assocData['page'])) {
|
||||
$assocData['offset'] = ($assocData['page'] - 1) * $assocData['limit'];
|
||||
} elseif (!isset($assocData['offset'])) {
|
||||
$assocData['offset'] = null;
|
||||
|
@ -1115,7 +1115,6 @@ class DboSource extends DataSource {
|
|||
$query = array(
|
||||
'conditions' => $assocData['conditions'],
|
||||
'limit' => $limit,
|
||||
'offset' => $assocData['offset'],
|
||||
'table' => $this->fullTableName($linkModel),
|
||||
'alias' => $alias,
|
||||
'fields' => am($this->fields($linkModel, $alias, $assocData['fields']), $joinFields),
|
||||
|
|
Loading…
Reference in a new issue