Skip to content
Snippets Groups Projects
Commit db006bce authored by jaapjansma's avatar jaapjansma
Browse files

Fixed issue with Contact Search and Hard limit and paging.

parent 544b7675
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
* Regression fix dashlets not working anymore #122
* Fixed contact Summary tab not loading due to fatal error. See !115 and #122
* Performance improvements.
* Fixed issue with Contact Search and Hard limit and paging.
# Version 1.69
......
......@@ -270,11 +270,18 @@ abstract class CRM_Dataprocessor_Form_Output_AbstractUIOutputForm extends CRM_Co
$limit = static::getDefaultLimit($output);
if (isset($submittedValues['crmRowCount']) && $submittedValues['crmRowCount']) {
$limit = $submittedValues['crmRowCount'];
} elseif (CRM_Utils_Request::retrieve('crmRowCount', 'Integer')) {
$limit = CRM_Utils_Request::retrieve('crmRowCount', 'Integer');
}
$pageId = 1;
if (isset($submittedValues['crmPID'])) {
$pageId = $submittedValues['crmPID'];
} elseif (CRM_Utils_Request::retrieve('crmPID', 'Integer')) {
$pageId = CRM_Utils_Request::retrieve('crmPID', 'Integer');
}
$pageId = isset($submittedValues['crmPID']) ?? 1;
$offset = static::getOffset($pageId, $limit, $hardLimit);
if ($hardLimit && $limit > $hardLimit) {
$limit = $hardLimit;
if ($hardLimit && ($offset + $limit) > $hardLimit) {
$limit = $hardLimit - $offset;
}
try {
$dataProcessor->getDataFlow()->setOffset($offset);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment