From b28bebe4422a152b7ade142b543192069079db76 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 3 Apr 2014 09:07:55 +0000 Subject: [PATCH] fix problem encountered on reply with whole grid refresh, caused by not matching expectations on rowId on egw_refresh --- mail/inc/class.mail_compose.inc.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 1273bc7042..ff345a3c84 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -425,6 +425,7 @@ class mail_compose { $workingFolder = $activeFolder; $mode = 'compose'; + $idsForRefresh = array(); if (isset($_content['mode']) && !empty($_content['mode'])) { $mode = $_content['mode']; @@ -436,6 +437,7 @@ class mail_compose $fhA = mail_ui::splitRowID($rowid); //$this->sessionData['uid'][] = $fhA['msgUID']; //$this->sessionData['forwardedUID'][] = $fhA['msgUID']; + $idsForRefresh[] = mail_ui::generateRowID($fhA['profileID'], $fhA['folder'], $fhA['msgUID'], $_prependApp=false); if (!empty($fhA['folder'])) $workingFolder = $fhA['folder']; } } @@ -443,9 +445,16 @@ class mail_compose { $rhA = mail_ui::splitRowID($_content['processedmail_id']); //$this->sessionData['uid'] = $rhA['msgUID']; + $idsForRefresh[] = mail_ui::generateRowID($rhA['profileID'], $rhA['folder'], $rhA['msgUID'], $_prependApp=false); $workingFolder = $rhA['folder']; } } + //the line/condition below should not be needed + if (empty($idsForRefresh) && !empty($_content['processedmail_id'])) + { + $rhA = mail_ui::splitRowID($_content['processedmail_id']); + $idsForRefresh[] = mail_ui::generateRowID($rhA['profileID'], $rhA['folder'], $rhA['msgUID'], $_prependApp=false); + } $response = egw_json_response::get(); if ($activeProfile != $composeProfile) { @@ -461,7 +470,8 @@ class mail_compose } else { - $response->call('opener.egw_refresh',lang('Message send successfully.'),'mail',$_content['processedmail_id'],'update'); + //error_log(__METHOD__.__LINE__.array2string($idsForRefresh)); + $response->call('opener.egw_refresh',lang('Message send successfully.'),'mail',$idsForRefresh,'update'); } } else