From dabd8c4b175b73f06413c7de138c9310554c5ef8 Mon Sep 17 00:00:00 2001 From: Adrien Dorsaz Date: Fri, 23 Nov 2018 23:32:29 +0100 Subject: [PATCH] replace use of obsolete makeURL by Services.io.newURI Following updates from Lightning: https://bugzilla.mozilla.org/show_bug.cgi?id=1347211 --- calendar/interface/exchangeCalendar/mivExchangeCalendar.js | 2 +- common/interface/exchangeBaseItem/mivExchangeBaseItem.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/calendar/interface/exchangeCalendar/mivExchangeCalendar.js b/calendar/interface/exchangeCalendar/mivExchangeCalendar.js index 61396eb8..ae46d8b6 100644 --- a/calendar/interface/exchangeCalendar/mivExchangeCalendar.js +++ b/calendar/interface/exchangeCalendar/mivExchangeCalendar.js @@ -6746,7 +6746,7 @@ calExchangeCalendar.prototype = { var newAttachment = createAttachment(); newAttachment.setParameter("X-AttachmentId", fileAttachment.getAttributeByTag("t:AttachmentId", "Id")); - newAttachment.uri = makeURL(this.serverUrl + "/?id=" + encodeURIComponent(fileAttachment.getAttributeByTag("t:AttachmentId", "Id")) + "&name=" + encodeURIComponent(fileAttachment.getTagValue("t:Name")) + "&size=" + encodeURIComponent(fileAttachment.getTagValue("t:Size", "")) + "&user=" + encodeURIComponent(this.user)); + newAttachment.uri = Services.io.newURI(this.serverUrl + "/?id=" + encodeURIComponent(fileAttachment.getAttributeByTag("t:AttachmentId", "Id")) + "&name=" + encodeURIComponent(fileAttachment.getTagValue("t:Name")) + "&size=" + encodeURIComponent(fileAttachment.getTagValue("t:Size", "")) + "&user=" + encodeURIComponent(this.user)); this.logInfo("New attachment URI:" + this.serverUrl + "/?id=" + encodeURIComponent(fileAttachment.getAttributeByTag("t:AttachmentId", "Id")) + "&name=" + encodeURIComponent(fileAttachment.getTagValue("t:Name")) + "&size=" + encodeURIComponent(fileAttachment.getTagValue("t:Size", "")) + "&user=" + encodeURIComponent(this.user)); diff --git a/common/interface/exchangeBaseItem/mivExchangeBaseItem.js b/common/interface/exchangeBaseItem/mivExchangeBaseItem.js index 8eae282f..5fae4ee4 100644 --- a/common/interface/exchangeBaseItem/mivExchangeBaseItem.js +++ b/common/interface/exchangeBaseItem/mivExchangeBaseItem.js @@ -2891,7 +2891,7 @@ mivExchangeBaseItem.prototype = { for (var fileAttachment of Object.values(fileAttachments)) { var newAttachment = cal.createAttachment(); newAttachment.setParameter("X-AttachmentId", xml2json.getAttributeByTag(fileAttachment, "t:AttachmentId", "Id")); - newAttachment.uri = cal.makeURL("http://somewhere/?id=" + encodeURIComponent(xml2json.getAttributeByTag(fileAttachment, "t:AttachmentId", "Id")) + "&name=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:Name")) + "&size=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:Size", "")) + "&calendarid=" + encodeURIComponent(this.calendar.id) + "&isinline=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:IsInline", "false")) + "&contentid=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:ContentId", ""))); + newAttachment.uri = Services.io.newURI("http://somewhere/?id=" + encodeURIComponent(xml2json.getAttributeByTag(fileAttachment, "t:AttachmentId", "Id")) + "&name=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:Name")) + "&size=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:Size", "")) + "&calendarid=" + encodeURIComponent(this.calendar.id) + "&isinline=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:IsInline", "false")) + "&contentid=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:ContentId", ""))); this._attachments.push(newAttachment.clone()); this._calEvent.addAttachment(newAttachment);