Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Felamimail): can't forward attachments
Browse files Browse the repository at this point in the history
Change-Id: Ic6f4540f43c1d3e72f129fa90cb8a58bf2cb11f7
Reviewed-on: http://gerrit.tine20.com/customers/16117
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
  • Loading branch information
corneliusweiss authored and pschuele committed Mar 18, 2020
1 parent d9c0f38 commit 6d9cd51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tine20/Tinebase/js/extFixes.js
Expand Up @@ -83,10 +83,10 @@ Ext.override(Ext.data.Store, {
*/
addUnique: function(record, prop) {
prop = prop.match(/^data\./) ? prop : `data.${prop}`;
let [,name, idx, ext] = String(_.get(record, prop)).match(/(.*?)(?:\s\((\d+)\))?\.(.*)/) ;
let [,name, idx, ext] = String(_.get(record, prop)).match(/(.*?)(?:\s\((\d+)\))?(\..*)/) || [null, _.get(record, prop)];
while(_.find(this.data.items, (item) => {return _.get(item, prop) === _.get(record, prop)})) {
idx = idx || 0;
_.set(record, prop, `${name} (${++idx}).${ext}`);
_.set(record, prop, `${name} (${++idx})${ext}`);
}

this.add([record]);
Expand Down

0 comments on commit 6d9cd51

Please sign in to comment.