* Mail: fix broken save to filemanager action

This commit is contained in:
Hadi Nategh 2019-08-21 12:12:20 +02:00
parent 9cbc941c8d
commit c6adfe64ca

View File

@ -3036,12 +3036,12 @@ app.classes.mail = AppJS.extend(
var _id = _elems[i].id; var _id = _elems[i].id;
var dataElem = egw.dataGetUIDdata(_id); var dataElem = egw.dataGetUIDdata(_id);
var subject = dataElem? dataElem.data.subject: _elems[i].subject; var subject = dataElem? dataElem.data.subject: _elems[i].subject;
if (this.egw.is_popup()) if (this.egw.is_popup() && this.et2._inst.name == 'mail.display')
{ {
subject = this.et2.getArrayMgr('content').getEntry('mail_displaysubject'); subject = this.et2.getArrayMgr('content').getEntry('mail_displaysubject');
} }
// Replace these now, they really cause problems later // Replace these now, they really cause problems later
var filename = subject.replace(/[\f\n\t\v\/\\\?]/g,"_")|| 'unknown'; var filename = subject ? subject.replace(/[\f\n\t\v\/\\\?]/g,"_") : 'unknown';
ids.push(_id); ids.push(_id);
names.push(filename+'.eml'); names.push(filename+'.eml');
} }