From 6a39b35df61d370ff7be2c75409fb9d791b1eeb1 Mon Sep 17 00:00:00 2001 From: nate Date: Sat, 12 Aug 2006 13:06:21 +0000 Subject: [PATCH] Adding additional data for pagination, and fixing docblock formatting git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3398 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/controller/controller.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index 0986755a5..a53ee4468 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -417,7 +417,8 @@ class Controller extends Object{ * Saves a variable to use inside a template. * * @param mixed $one A string or an array of data. - * @param mixed $two Value in case $one is a string (which then works as the key). Unused if $one is an associative array, otherwise serves as the values to $one's keys. + * @param mixed $two Value in case $one is a string (which then works as the key). + * Unused if $one is an associative array, otherwise serves as the values to $one's keys. * @return unknown */ function set($one, $two = null) { @@ -1005,6 +1006,7 @@ class Controller extends Object{ $results = $object->findAll($conditions, $fields, $order, $limit, $page, $recursive); $this->params['paging'][$object->name] = $options; + $this->params['paging'][$object->name]['current'] = count($results); $this->params['paging'][$object->name]['count'] = $object->findCount($conditions); return $results;