allow image resizing in display; make sure of proper trash/sent/draft/template handling, by using the preferences associated to the current profile; handle quoted emailadresses for imap_rfc822_parse_adrlist

This commit is contained in:
Klaus Leithoff 2010-01-13 11:21:31 +00:00
parent 5bb170b40e
commit d268673514
3 changed files with 16 additions and 14 deletions

View File

@ -371,9 +371,9 @@
*/
function emptyTrash()
{
if($this->_debug) error_log("ajaxfelamimail::emptyTrash");
if(!empty($GLOBALS['egw_info']['user']['preferences']['felamimail']['trashFolder'])) {
$this->bofelamimail->compressFolder($GLOBALS['egw_info']['user']['preferences']['felamimail']['trashFolder']);
if($this->_debug) error_log("ajaxfelamimail::emptyTrash Folder:".$this->bofelamimail->mailPreferences->preferences['trashFolder']);
if(!empty($this->bofelamimail->mailPreferences->preferences['trashFolder'])) {
$this->bofelamimail->compressFolder($this->bofelamimail->mailPreferences->preferences['trashFolder']);
}
return $this->generateMessageList($this->sessionData['mailbox']);

View File

@ -727,7 +727,7 @@
}
foreach((array)$_formData['to'] as $address) {
$address_array = imap_rfc822_parse_adrlist($address, '');
$address_array = imap_rfc822_parse_adrlist((get_magic_quotes_gpc()?stripslashes($address):$address), '');
foreach((array)$address_array as $addressObject) {
$emailAddress = $addressObject->mailbox. (!empty($addressObject->host) ? '@'.$addressObject->host : '');
#$emailName = $bofelamimail->encodeHeader($addressObject->personal, 'q');
@ -737,7 +737,7 @@
}
foreach((array)$_formData['cc'] as $address) {
$address_array = imap_rfc822_parse_adrlist($address,'');
$address_array = imap_rfc822_parse_adrlist((get_magic_quotes_gpc()?stripslashes($address):$address),'');
foreach((array)$address_array as $addressObject) {
$emailAddress = $addressObject->mailbox. (!empty($addressObject->host) ? '@'.$addressObject->host : '');
#$emailName = $bofelamimail->encodeHeader($addressObject->personal, 'q');
@ -747,7 +747,7 @@
}
foreach((array)$_formData['bcc'] as $address) {
$address_array = imap_rfc822_parse_adrlist($address,'');
$address_array = imap_rfc822_parse_adrlist((get_magic_quotes_gpc()?stripslashes($address):$address),'');
foreach((array)$address_array as $addressObject) {
$emailAddress = $addressObject->mailbox. (!empty($addressObject->host) ? '@'.$addressObject->host : '');
#$emailName = $bofelamimail->encodeHeader($addressObject->personal, 'q');
@ -757,7 +757,7 @@
}
foreach((array)$_formData['replyto'] as $address) {
$address_array = imap_rfc822_parse_adrlist($address,'');
$address_array = imap_rfc822_parse_adrlist((get_magic_quotes_gpc()?stripslashes($address):$address),'');
foreach((array)$address_array as $addressObject) {
$emailAddress = $addressObject->mailbox. (!empty($addressObject->host) ? '@'.$addressObject->host : '');
#$emailName = $bofelamimail->encodeHeader($addressObject->personal, 'q');
@ -867,7 +867,7 @@
$this->sessionData['stationeryID'] = $_formData['stationeryID'];
$this->sessionData['identity'] = $_formData['identity'];
foreach((array)$this->sessionData['bcc'] as $address) {
$address_array = imap_rfc822_parse_adrlist($address,'');
$address_array = imap_rfc822_parse_adrlist((get_magic_quotes_gpc()?stripslashes($address):$address),'');
foreach((array)$address_array as $addressObject) {
$emailAddress = $addressObject->mailbox. (!empty($addressObject->host) ? '@'.$addressObject->host : '');
$mailAddr[] = array($emailAddress, $addressObject->personal);
@ -1016,7 +1016,7 @@
if (count($folder) > 0) {
foreach((array)$this->sessionData['bcc'] as $address) {
$address_array = imap_rfc822_parse_adrlist($address,'');
$address_array = imap_rfc822_parse_adrlist((get_magic_quotes_gpc()?stripslashes($address):$address),'');
foreach((array)$address_array as $addressObject) {
$emailAddress = $addressObject->mailbox. (!empty($addressObject->host) ? '@'.$addressObject->host : '');
$mailAddr[] = array($emailAddress, $addressObject->personal);

View File

@ -237,8 +237,8 @@
{
if ($GLOBALS['egw_info']['server']['account_repository'] == "ldap")
{
$data = Array
(
$data = Array
(
'description' => 'email settings',
'url' => '/index.php',
'extradata' => 'menuaction=emailadmin.uiuserdata.editUserData'
@ -290,7 +290,7 @@
{
$folderName = ($_folderName ? $_folderName : $this->sessionData['mailbox']);
$deleteOptions = $GLOBALS['egw_info']['user']['preferences']['felamimail']['deleteOptions'];
$trashFolder = $GLOBALS['egw_info']['user']['preferences']['felamimail']['trashFolder'];
$trashFolder = $this->mailPreferences->preferences['trashFolder']; //$GLOBALS['egw_info']['user']['preferences']['felamimail']['trashFolder'];
$this->icServer->selectMailbox($folderName);
@ -557,8 +557,8 @@
$deleteOptions = $this->mailPreferences->preferences['deleteOptions'];
$trashFolder = $this->mailPreferences->preferences['trashFolder'];
$draftFolder = $GLOBALS['egw_info']['user']['preferences']['felamimail']['draftFolder'];
$templateFolder = $GLOBALS['egw_info']['user']['preferences']['felamimail']['templateFolder'];
$draftFolder = $this->mailPreferences->preferences['draftFolder']; //$GLOBALS['egw_info']['user']['preferences']['felamimail']['draftFolder'];
$templateFolder = $this->mailPreferences->preferences['templateFolder']; //$GLOBALS['egw_info']['user']['preferences']['felamimail']['templateFolder'];
if(($this->sessionData['mailbox'] == $trashFolder && $deleteOptions == "move_to_trash") ||
($this->sessionData['mailbox'] == $draftFolder)) {
@ -1055,6 +1055,8 @@
"src" => array("minlen" => 4, 'maxlen' => 384, $GLOBALS['egw_info']['user']['preferences']['felamimail']['allowExternalIMGs'] ? '' : 'match' => '/^cid:.*/'),
"align" => array("minlen" => 1),
"border" => array('maxlen' => 30),
"width" => array("minlen" => 1, 'maxlen' => 3),
"height" => array("minlen" => 1, 'maxlen' => 3),
)
);