forked from extern/egroupware
catch error on failed copy/move messages and report to user via egw_message
This commit is contained in:
parent
acd8b742e8
commit
092af04bc4
@ -4183,11 +4183,17 @@ blockquote[type=cite] {
|
||||
$hA = self::splitRowID($rowID);
|
||||
$messageList[] = $hA['msgUID'];
|
||||
}
|
||||
|
||||
$this->mail_bo->moveMessages($targetFolder,$messageList,($_copyOrMove=='copy'?false:true),$folder,false,($targetProfileID!=$sourceProfileID?$targetProfileID:null));
|
||||
$response = egw_json_response::get();
|
||||
try
|
||||
{
|
||||
$this->mail_bo->moveMessages($targetFolder,$messageList,($_copyOrMove=='copy'?false:true),$folder,false,($targetProfileID!=$sourceProfileID?$targetProfileID:null));
|
||||
$response->call('egw_refresh',($_copyOrMove=='copy'?lang('copied %1 message(s) from %2 to %3',count($messageList),$folder,$targetFolder):lang('moved %1 message(s) from %2 to %3',count($messageList),$folder,$targetFolder)),'mail');
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$response->call('egw_message',$e->getMessage(),"error");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mail_bo::$debug) error_log(__METHOD__."-> No messages selected.");
|
||||
|
Loading…
Reference in New Issue
Block a user