From f74073a2e14c85b249ff27faf510e078e3fc03da Mon Sep 17 00:00:00 2001 From: abijah Date: Mon, 1 Jun 2009 04:30:32 +0000 Subject: [PATCH] Cleaned up the paginate comment remnants and added the undocumented 'extra' parameter to paginate git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@52 97e9348a-65ac-dc4b-aefc-98561f571b83 --- site/app_model.php | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/site/app_model.php b/site/app_model.php index b4cc264..8914138 100644 --- a/site/app_model.php +++ b/site/app_model.php @@ -84,9 +84,9 @@ class AppModel extends Model { // without changing a bunch of core code is near impossible. var $paginate_rows_save; - function paginate($conditions, $fields, $order, $limit, $page = 1, $recursive = null) { + function paginate($conditions, $fields, $order, $limit, $page = 1, $recursive = null, $extra = null) { /* pr("paginate"); */ -/* pr(array_merge(compact('conditions', 'fields', 'order', 'limit', 'page', 'recursive'))); */ +/* pr(array_merge(compact('conditions', 'fields', 'order', 'limit', 'page', 'recursive', 'extra'))); */ if ($page > 1 && isset($limit)) $offset = ($page - 1) * $limit; else @@ -95,6 +95,7 @@ class AppModel extends Model { } function paginateCount($conditions = null, $recursive = null, $extra = null) { /* pr("paginateCount"); */ +/* pr(array_merge(compact('conditions', 'recursive', 'extra'))); */ if (!isset($recursive)) $recursive = $this->recursive; @@ -105,35 +106,4 @@ class AppModel extends Model { return count($this->paginate_rows_save); } -// Code as found in the controller -/* function paginate($conditions, $fields, $order, $limit, $page = 1, $recursive = null) { */ -/* pr("paginate"); */ -/* pr(array_merge(compact('conditions', 'fields', 'order', 'limit', 'page', 'recursive'))); */ - -/* $parameters = compact('conditions', 'fields', 'order', 'limit', 'page'); */ -/* if ($recursive != $this->recursive) { */ -/* $parameters['recursive'] = $recursive; */ -/* } */ - -/* $results = $this->find($type, array_merge($parameters, $extra)); */ -/* pr("paginate end"); */ -/* pr($results); */ -/* } */ - -/* function paginateCount($conditions = null, $recursive = null, $extra = null) { */ -/* pr("paginateCount"); */ -/* pr(array_merge(compact('conditions', 'recursive'), $extra)); */ - -/* $parameters = compact('conditions'); */ -/* if ($recursive != $this->recursive) { */ -/* $parameters['recursive'] = $recursive; */ -/* } */ -/* $count = $this->find('count', array_merge($parameters, $extra)); */ - -/* pr("paginateCount end: $count"); */ -/* return $count; */ -/* } */ - - - }