port of mail encoding
This commit is contained in:
parent
c7637a0c53
commit
f4e708a02f
@ -1594,13 +1594,13 @@ function encode_mail($item,$extended = false) {
|
|||||||
|
|
||||||
if($extended) {
|
if($extended) {
|
||||||
$x['conv_guid'] = $item['conv_guid'];
|
$x['conv_guid'] = $item['conv_guid'];
|
||||||
if($item['mail_flags'] & MAIL_DELETED)
|
if(intval($item['mail_deleted']))
|
||||||
$x['flags'][] = 'deleted';
|
$x['flags'][] = 'deleted';
|
||||||
if($item['mail_flags'] & MAIL_REPLIED)
|
if(intval($item['mail_replied']))
|
||||||
$x['flags'][] = 'replied';
|
$x['flags'][] = 'replied';
|
||||||
if($item['mail_flags'] & MAIL_ISREPLY)
|
if(intval($item['mail_isreply']))
|
||||||
$x['flags'][] = 'isreply';
|
$x['flags'][] = 'isreply';
|
||||||
if($item['mail_flags'] & MAIL_SEEN)
|
if(intval($item['mail_seen']))
|
||||||
$x['flags'][] = 'seen';
|
$x['flags'][] = 'seen';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1629,16 +1629,16 @@ function get_mail_elements($x) {
|
|||||||
$arr['mail_recalled'] = 1;
|
$arr['mail_recalled'] = 1;
|
||||||
}
|
}
|
||||||
if(in_array('replied',$x['flags'])) {
|
if(in_array('replied',$x['flags'])) {
|
||||||
$arr['mail_flags'] |= MAIL_REPLIED;
|
$arr['mail_replied'] = 1;
|
||||||
}
|
}
|
||||||
if(in_array('isreply',$x['flags'])) {
|
if(in_array('isreply',$x['flags'])) {
|
||||||
$arr['mail_flags'] |= MAIL_ISREPLY;
|
$arr['mail_isreply'] = 1;
|
||||||
}
|
}
|
||||||
if(in_array('seen',$x['flags'])) {
|
if(in_array('seen',$x['flags'])) {
|
||||||
$arr['mail_flags'] |= MAIL_SEEN;
|
$arr['mail_seen'] = 1;
|
||||||
}
|
}
|
||||||
if(in_array('deleted',$x['flags'])) {
|
if(in_array('deleted',$x['flags'])) {
|
||||||
$arr['mail_flags'] |= MAIL_DELETED;
|
$arr['mail_deleted'] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user