Decode subject by emailcollector
This commit is contained in:
parent
1bace80a9b
commit
d34f487c65
@ -1122,11 +1122,17 @@ class EmailCollector extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
|
||||||
// GET Email meta datas
|
// GET Email meta datas
|
||||||
$overview = imap_fetch_overview($connection, $imapemail, 0);
|
$overview = imap_fetch_overview($connection, $imapemail, 0);
|
||||||
|
|
||||||
dol_syslog("** Process email - msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." subject=".$overview[0]->subject);
|
dol_syslog("** Process email - msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." subject=".$overview[0]->subject);
|
||||||
|
|
||||||
|
// Decode $overview[0]->subject
|
||||||
|
if (function_exists('mb_decode_mimeheader')) {
|
||||||
|
$overview[0]->subject = mb_decode_mimeheader($overview[0]->subject);
|
||||||
|
}
|
||||||
|
|
||||||
// Parse IMAP email structure
|
// Parse IMAP email structure
|
||||||
global $htmlmsg, $plainmsg, $charset, $attachments;
|
global $htmlmsg, $plainmsg, $charset, $attachments;
|
||||||
$this->getmsg($connection, $imapemail);
|
$this->getmsg($connection, $imapemail);
|
||||||
|
|||||||
@ -356,7 +356,7 @@ class Holiday extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param int $id Id object
|
* @param int $id Id object
|
||||||
* @param string $ref Ref object
|
* @param string $ref Ref object
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function fetch($id, $ref = '')
|
public function fetch($id, $ref = '')
|
||||||
{
|
{
|
||||||
@ -421,12 +421,17 @@ class Holiday extends CommonObject
|
|||||||
$this->fk_user_create = $obj->fk_user_create;
|
$this->fk_user_create = $obj->fk_user_create;
|
||||||
$this->fk_type = $obj->fk_type;
|
$this->fk_type = $obj->fk_type;
|
||||||
$this->entity = $obj->entity;
|
$this->entity = $obj->entity;
|
||||||
|
|
||||||
|
$this->fetch_optionals();
|
||||||
|
|
||||||
|
$result = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$result = 0;
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
$this->fetch_optionals();
|
return $result;
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user