BUG 10980 Issue in pagination displaying "Messages History" SOLVED

- Pagination doesn't work
- Fix pagination
This commit is contained in:
Julio Cesar Laura
2013-03-12 12:06:53 -04:00
parent 37c6fa8ec0
commit defebb3099
3 changed files with 29 additions and 9 deletions

View File

@@ -25,6 +25,14 @@
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
if ($actionAjax == 'messageHistoryGridList_JXP') {
if (!isset($_REQUEST['start'])) {
$_REQUEST['start'] = 0;
}
if (!isset($_REQUEST['limit'])) {
$_REQUEST['limit'] = 20;
}
G::LoadClass( 'case' );
G::LoadClass( "BasePeer" );
@@ -32,16 +40,22 @@ if ($actionAjax == 'messageHistoryGridList_JXP') {
global $G_PUBLISH;
$oCase = new Cases();
$appMessageArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'] );
$appMessageArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'], $_REQUEST['start'], $_REQUEST['limit']);
$appMessageCountArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION']);
$result = new stdClass();
$aProcesses = Array ();
$totalCount = 0;
foreach ($appMessageArray as $index => $value) {
if ($appMessageArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1) {
$appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'] . '_' . $appMessageArray[$index]['APP_MSG_UID'];
$aProcesses[] = $appMessageArray[$index];
}
}
$totalCount = 0;
foreach ($appMessageCountArray as $index => $value) {
if ($appMessageCountArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1) {
$totalCount ++;
}
}
@@ -159,10 +173,10 @@ if ($actionAjax == 'sendMailMessage_JXP') {
$aConfiguration['MESS_PASSWORD'] = $passwd;
$oSpool = new spoolRun();
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
$aConfiguration['MESS_RAUTH'] = 0;
} else {
$aConfiguration['MESS_RAUTH'] = 1;
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
$aConfiguration['MESS_RAUTH'] = 0;
} else {
$aConfiguration['MESS_RAUTH'] = 1;
}
$oSpool->setConfig( array ('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],'MESS_SERVER' => $aConfiguration['MESS_SERVER'],'MESS_PORT' => $aConfiguration['MESS_PORT'],'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],'MESS_PASSWORD' => $passwd,'SMTPAuth' => $aConfiguration['MESS_RAUTH']
) );