mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-23 22:39:00 +01:00
* eMail: make evaluation of message flags case INSENSITIVE (by changing all flags to lowercase before evaluating
This commit is contained in:
parent
0171c157ea
commit
4c52933c35
@ -1101,7 +1101,7 @@ class felamimail_bo
|
||||
$this->flagMessages('read', $uid, $_folder);
|
||||
$flags = $this->getFlags($uid);
|
||||
//error_log(__METHOD__.__LINE__.array2string($flags));
|
||||
if (strpos( array2string($flags),'Deleted')!==false) $undelete[] = $uid;
|
||||
if (stripos( array2string($flags),'Deleted')!==false) $undelete[] = $uid;
|
||||
unset($flags);
|
||||
}
|
||||
$retValue = PEAR::isError($this->icServer->deleteMessages($_messageUID, true));
|
||||
@ -3318,16 +3318,17 @@ class felamimail_bo
|
||||
static function prepareFlagsArray($headerObject)
|
||||
{
|
||||
$retValue = array();
|
||||
$retValue['recent'] = in_array('\\Recent', $headerObject['FLAGS']);
|
||||
$retValue['flagged'] = in_array('\\Flagged', $headerObject['FLAGS']);
|
||||
$retValue['answered'] = in_array('\\Answered', $headerObject['FLAGS']);
|
||||
$retValue['forwarded'] = in_array('$Forwarded', $headerObject['FLAGS']);
|
||||
$retValue['deleted'] = in_array('\\Deleted', $headerObject['FLAGS']);
|
||||
$retValue['seen'] = in_array('\\Seen', $headerObject['FLAGS']);
|
||||
$retValue['draft'] = in_array('\\Draft', $headerObject['FLAGS']);
|
||||
$retValue['mdnsent'] = in_array('MDNSent', $headerObject['FLAGS']);
|
||||
$retValue['mdnnotsent'] = in_array('MDNnotSent', $headerObject['FLAGS']);
|
||||
if (is_array($headerObject['FLAGS'])) $headerFlags = array_map('strtolower',$headerObject['FLAGS']);
|
||||
//error_log(__METHOD__.__LINE__.'->'.array2string($headerFlags));
|
||||
$retValue['recent'] = in_array('\\recent', $headerFlags);
|
||||
$retValue['flagged'] = in_array('\\flagged', $headerFlags);
|
||||
$retValue['answered'] = in_array('\\answered', $headerFlags);
|
||||
$retValue['forwarded'] = in_array('$forwarded', $headerFlags);
|
||||
$retValue['deleted'] = in_array('\\deleted', $headerFlags);
|
||||
$retValue['seen'] = in_array('\\seen', $headerFlags);
|
||||
$retValue['draft'] = in_array('\\draft', $headerFlags);
|
||||
$retValue['mdnsent'] = in_array('mdnsent', $headerFlags);
|
||||
$retValue['mdnnotsent'] = in_array('mdnnotsent', $headerFlags);
|
||||
if (!empty($headerFlags))
|
||||
{
|
||||
$retValue['label1'] = in_array('$label1', $headerFlags);
|
||||
|
@ -304,9 +304,9 @@
|
||||
#$bodyParts = $this->bofelamimail->getMessageBody($this->uid,'',$partID);
|
||||
#_debug_array($bodyParts); exit;
|
||||
#_debug_array($this->uid);
|
||||
#_debug_array($this->bofelamimail->getFlags($this->uid)); #exit;
|
||||
//_debug_array($this->bofelamimail->getFlags($this->uid));// exit;
|
||||
// flag the message as read/seen (if not already flagged)
|
||||
if (!empty($this->uid) && strpos( array2string($flags),'Seen')===false) $this->bofelamimail->flagMessages('read', $this->uid);
|
||||
if (!empty($this->uid) && stripos( array2string($flags),'Seen')===false); $this->bofelamimail->flagMessages('read', $this->uid);
|
||||
|
||||
$nextMessage = $this->bofelamimail->getNextMessage($this->mailbox, $this->uid);
|
||||
$webserverURL = $GLOBALS['egw_info']['server']['webserver_url'];
|
||||
@ -349,7 +349,7 @@
|
||||
$this->t->set_var('charset',$GLOBALS['egw']->translation->charset());
|
||||
}
|
||||
// only notify when requested, notify flag (MDNSent/MDNnotSent) not set, and message not already seen (some servers do not support the MDNSent/MDNnotSent flag)
|
||||
if ( $sent_not != "" && $this->bofelamimail->getNotifyFlags($this->uid,($flags?$flags:null)) === null && strpos( array2string($flags),'Seen')===false)
|
||||
if ( $sent_not != "" && $this->bofelamimail->getNotifyFlags($this->uid,($flags?$flags:null)) === null && stripos( array2string($flags),'Seen')===false)
|
||||
{
|
||||
$this->t->set_var('sentNotify','sendNotify("'.$this->uid.'");');
|
||||
$this->t->set_var('lang_sendnotify',lang('The message sender has requested a response to indicate that you have read this message. Would you like to send a receipt?'));
|
||||
@ -380,7 +380,7 @@
|
||||
if($partID != '') {
|
||||
$headerData['partid'] = $partID;
|
||||
}
|
||||
if (strpos( array2string($flags),'Deleted')!==false)
|
||||
if (stripos( array2string($flags),'Deleted')!==false)
|
||||
{
|
||||
$headerData['deleted']=1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user