Fixing issues caused by not accessing the request object correctly.

This commit is contained in:
mark_story 2010-11-12 23:14:34 -05:00
parent 18bb5f6b8b
commit 01894b315f
2 changed files with 6 additions and 6 deletions

View file

@ -1039,7 +1039,7 @@ class Controller extends Object {
), E_USER_WARNING);
return array();
}
$options = array_merge($this->request->params, $this->params['url'], $this->passedArgs);
$options = array_merge($this->request->params, $this->request->params['url'], $this->passedArgs);
if (isset($this->paginate[$object->alias])) {
$defaults = $this->paginate[$object->alias];
@ -1170,11 +1170,11 @@ class Controller extends Object {
'defaults' => array_merge(array('limit' => 20, 'step' => 1), $defaults),
'options' => $options
);
if (!isset($this->request['paging'])) {
$this->request['paging'] = array();
if (!isset($this->request->params['paging'])) {
$this->request->params['paging'] = array();
}
$this->request['paging'] = array_merge(
(array)$this->request['paging'],
$this->request->params['paging'] = array_merge(
(array)$this->request->params['paging'],
array($object->alias => $paging)
);

View file

@ -773,7 +773,7 @@ class ControllerTest extends CakeTestCase {
'recursive' => -1
);
$conditions = array();
$result = $Controller->paginate('ControllerPost',$conditions);
$result = $Controller->paginate('ControllerPost', $conditions);
$expected = array(
array(
'ControllerPost' => array(