Skip to content
Snippets Groups Projects
Commit ccec8d73 authored by Prasad's avatar Prasad
Browse files

Fixes #1101::Uma::Modtracker pagination was not working

parents 2565c9cf 0769299b
No related branches found
No related tags found
No related merge requests found
......@@ -436,6 +436,16 @@ class Vtiger_Detail_View extends Vtiger_Index_View {
$recordModel = Vtiger_Record_Model::getInstanceById($parentRecordId);
$viewer = $this->getViewer($request);
$viewer->assign('SOURCE',$recordModel->get('source'));
$recentActivities = ModTracker_Record_Model::getUpdates($parentRecordId, $pagingModel,$moduleName);
$totalCount = ModTracker_Record_Model::getTotalRecordCount($parentRecordId);
$pageLimit = $pagingModel->getPageLimit();
$pageCount = ceil((int) $totalCount / (int) $pageLimit);
if($pageCount - $pagingModel->getCurrentPage() == 0) {
$pagingModel->set('nextPageExists', false);
} else {
$pagingModel->set('nextPageExists', true);
}
$viewer->assign('RECENT_ACTIVITIES', $recentActivities);
$viewer->assign('MODULE_NAME', $moduleName);
$viewer->assign('PAGING_MODEL', $pagingModel);
......
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