mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-02 19:39:26 +01:00
* email: set preset signature below the preconfigured mailbody (if sig was configured on top), when sending meeting requests
This commit is contained in:
parent
8136c246c1
commit
5421a20fc0
@ -230,8 +230,10 @@
|
|||||||
*/
|
*/
|
||||||
function compose($_focusElement='to',$suppressSigOnTop=false, $isReply=false)
|
function compose($_focusElement='to',$suppressSigOnTop=false, $isReply=false)
|
||||||
{
|
{
|
||||||
|
//error_log(__METHOD__.__LINE__.array2string($_REQUEST));
|
||||||
// read the data from session
|
// read the data from session
|
||||||
// all values are empty for a new compose window
|
// all values are empty for a new compose window
|
||||||
|
$insertSigOnTop = false;
|
||||||
$sessionData = $this->bocompose->getSessionData();
|
$sessionData = $this->bocompose->getSessionData();
|
||||||
$alwaysAttachVCardAtCompose = false; // we use this to eliminate double attachments, if users VCard is already present/attached
|
$alwaysAttachVCardAtCompose = false; // we use this to eliminate double attachments, if users VCard is already present/attached
|
||||||
if ( isset($GLOBALS['egw_info']['apps']['stylite']) && (isset($this->bocompose->preferencesArray['attachVCardAtCompose']) &&
|
if ( isset($GLOBALS['egw_info']['apps']['stylite']) && (isset($this->bocompose->preferencesArray['attachVCardAtCompose']) &&
|
||||||
@ -275,6 +277,15 @@
|
|||||||
{
|
{
|
||||||
$names = (array)$_REQUEST['preset']['name'];
|
$names = (array)$_REQUEST['preset']['name'];
|
||||||
$types = (array)$_REQUEST['preset']['type'];
|
$types = (array)$_REQUEST['preset']['type'];
|
||||||
|
//if (!empty($types) && in_array('text/calendar; method=request',$types))
|
||||||
|
if (!empty($types) && in_array('text/calendar',$types))
|
||||||
|
{
|
||||||
|
$insertSigOnTop = 'below';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//$insertSigOnTop = 'top'; // more complicated
|
||||||
|
}
|
||||||
$files = (array)$_REQUEST['preset']['file'];
|
$files = (array)$_REQUEST['preset']['file'];
|
||||||
foreach($files as $k => $path)
|
foreach($files as $k => $path)
|
||||||
{
|
{
|
||||||
@ -629,14 +640,14 @@
|
|||||||
{
|
{
|
||||||
$disableRuler = true;
|
$disableRuler = true;
|
||||||
}
|
}
|
||||||
$insertSigOnTop = false;
|
|
||||||
//error_log(__METHOD__.__LINE__.array2string($this->bocompose->preferencesArray));
|
//error_log(__METHOD__.__LINE__.array2string($this->bocompose->preferencesArray));
|
||||||
if (isset($this->bocompose->preferencesArray['insertSignatureAtTopOfMessage']) &&
|
if (isset($this->bocompose->preferencesArray['insertSignatureAtTopOfMessage']) &&
|
||||||
$this->bocompose->preferencesArray['insertSignatureAtTopOfMessage'] &&
|
$this->bocompose->preferencesArray['insertSignatureAtTopOfMessage'] &&
|
||||||
!(isset($_POST['mySigID']) && !empty($_POST['mySigID']) ) && !$suppressSigOnTop
|
!(isset($_POST['mySigID']) && !empty($_POST['mySigID']) ) && !$suppressSigOnTop
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$insertSigOnTop = true;
|
$insertSigOnTop = ($insertSigOnTop?$insertSigOnTop:true);
|
||||||
if($sessionData['mimeType'] == 'html') {
|
if($sessionData['mimeType'] == 'html') {
|
||||||
$before = ($disableRuler ?' <br>':' <br><hr style="border:1px dotted silver; width:90%;">');
|
$before = ($disableRuler ?' <br>':' <br><hr style="border:1px dotted silver; width:90%;">');
|
||||||
$inbetween = ' <br>';
|
$inbetween = ' <br>';
|
||||||
@ -646,8 +657,16 @@
|
|||||||
}
|
}
|
||||||
$sigText = felamimail_bo::merge($signature->fm_signature,array($GLOBALS['egw']->accounts->id2name($GLOBALS['egw_info']['user']['account_id'],'person_id')));
|
$sigText = felamimail_bo::merge($signature->fm_signature,array($GLOBALS['egw']->accounts->id2name($GLOBALS['egw_info']['user']['account_id'],'person_id')));
|
||||||
if ($sessionData['mimeType'] == 'html') $sigText = "<!-- HTMLSIGBEGIN -->".$sigText."<!-- HTMLSIGEND -->";
|
if ($sessionData['mimeType'] == 'html') $sigText = "<!-- HTMLSIGBEGIN -->".$sigText."<!-- HTMLSIGEND -->";
|
||||||
|
|
||||||
|
if ($insertSigOnTop === 'below')
|
||||||
|
{
|
||||||
|
$sessionData['body'] = $sessionData['body'].$before.($sessionData['mimeType'] == 'html'?$sigText:$this->bocompose->convertHTMLToText($sigText));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$sessionData['body'] = $before.($sessionData['mimeType'] == 'html'?$sigText:$this->bocompose->convertHTMLToText($sigText)).$inbetween.$sessionData['body'];
|
$sessionData['body'] = $before.($sessionData['mimeType'] == 'html'?$sigText:$this->bocompose->convertHTMLToText($sigText)).$inbetween.$sessionData['body'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// prepare body
|
// prepare body
|
||||||
// in a way, this tests if we are having real utf-8 (the displayCharset) by now; we should if charsets reported (or detected) are correct
|
// in a way, this tests if we are having real utf-8 (the displayCharset) by now; we should if charsets reported (or detected) are correct
|
||||||
if (strtoupper($this->displayCharset) == 'UTF-8')
|
if (strtoupper($this->displayCharset) == 'UTF-8')
|
||||||
|
Loading…
Reference in New Issue
Block a user