diff options
Diffstat (limited to 'mailnews/base')
-rw-r--r-- | mailnews/base/search/content/FilterEditor.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mailnews/base/search/content/FilterEditor.js b/mailnews/base/search/content/FilterEditor.js index 986185d34..ecfe9febc 100644 --- a/mailnews/base/search/content/FilterEditor.js +++ b/mailnews/base/search/content/FilterEditor.js @@ -124,8 +124,8 @@ function filterEditorOnLoad() else if ("copiedFilter" in args) { // we are copying a filter - var copiedFilter = args.copiedFilter; - var copiedName = gFilterBundle.getFormattedString("copyToNewFilterName", + let copiedFilter = args.copiedFilter; + let copiedName = gFilterBundle.getFormattedString("copyToNewFilterName", [copiedFilter.filterName]); let newFilter = gFilterList.createFilter(copiedName); @@ -142,13 +142,15 @@ function filterEditorOnLoad() var searchTerm = copiedFilter.searchTerms.QueryElementAt(i, Components.interfaces.nsIMsgSearchTerm); - var newTerm = newFilter.createTerm(); + let newTerm = newFilter.createTerm(); newTerm.attrib = searchTerm.attrib; newTerm.op = searchTerm.op; newTerm.booleanAnd = searchTerm.booleanAnd; newTerm.value = searchTerm.value; newFilter.appendTerm(newTerm); - }; + } + + newFilter.filterType = copiedFilter.filterType; gPreFillName = copiedName; gFilter = newFilter; |