diff --git a/Controller/AuditsController.php b/Controller/AuditsController.php index 8f086c4..f7b54b2 100644 --- a/Controller/AuditsController.php +++ b/Controller/AuditsController.php @@ -37,6 +37,7 @@ public function admin_index() { $Instance = ClassRegistry::init($model); $displayField = $Instance->displayField; + $this->Paginator->settings['do_count'] = empty($Instance->noAuditCount); $this->Paginator->settings['fields'][] = $model . '.' . $displayField; $this->Paginator->settings['joins'][] = [ 'alias' => $model, diff --git a/Model/Audit.php b/Model/Audit.php index 8f3483c..d6a8fd9 100644 --- a/Model/Audit.php +++ b/Model/Audit.php @@ -36,6 +36,10 @@ public function setupSearchPlugin() { * @return integer */ public function paginateCount($conditions, $recursive, $extra) { + if (empty($extra['do_count'])) { + return 10000; + } + return $this->find('count', compact('conditions')); }