better control of message forwarding inline/as attachment (was partially dependent on associated preference-setting)

This commit is contained in:
Klaus Leithoff 2012-03-29 12:20:56 +00:00
parent aba3c0250b
commit 333c03b41d
3 changed files with 14 additions and 4 deletions

View File

@ -370,8 +370,13 @@
return false;
}
function getForwardData($_icServer, $_folder, $_uid, $_partID)
function getForwardData($_icServer, $_folder, $_uid, $_partID, $_mode=false)
{
if ($_mode)
{
$modebuff = $this->preferencesArray['message_forwarding'];
$this->preferencesArray['message_forwarding'] = $_mode;
}
if ($this->preferencesArray['message_forwarding'] == 'inline') {
$this->getReplyData('forward', $_icServer, $_folder, $_uid, $_partID);
}
@ -415,7 +420,10 @@
}
}
$bofelamimail->closeConnection();
if ($_mode)
{
$this->preferencesArray['message_forwarding'] = $modebuff;
}
$this->saveSessionData();
}

View File

@ -788,11 +788,12 @@
$folder = base64_decode($_GET['folder']);
$replyID = $_GET['reply_id'];
$partID = $_GET['part_id'];
$mode = false;
if (isset($_GET['mode']) && ($_GET['mode']=='forwardasattach'||$_GET['mode']=='forwardinline')) $mode = ($_GET['mode']=='forwardinline'?'inline':'asattach');
if (!empty($replyID))
{
// this fill the session data with the values from the original email
$this->bocompose->getForwardData($icServer, $folder, $replyID, $partID);
$this->bocompose->getForwardData($icServer, $folder, $replyID, $partID, $mode);
}
$this->compose();
}

View File

@ -197,6 +197,7 @@ function mail_compose(_action, _elems)
url += '&icServer='+egw_appWindow('felamimail').activeServerID;
url += '&folder='+egw_appWindow('felamimail').activeFolderB64;
url += '&reply_id='+_elems[0].id;
url += '&mode=forwardinline';
egw_openWindowCentered(url,'forward_'+_elems[0].id,700,egw_getWindowOuterHeight());
}
}