From 5dee804006b7ec75561716315965e19e6e4bd148 Mon Sep 17 00:00:00 2001 From: mlorb Date: Thu, 6 Dec 2018 09:42:58 +0100 Subject: [PATCH 1/2] fix download exported project from email link --- app/views/users/mailer/notification.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/mailer/notification.html.erb b/app/views/users/mailer/notification.html.erb index e866c1158..8090977c9 100644 --- a/app/views/users/mailer/notification.html.erb +++ b/app/views/users/mailer/notification.html.erb @@ -25,7 +25,7 @@ <%= I18n.t("notifications.deliver.download_link") %> <% # work around the problem with inserting the link of zipExport %> <% zip_id = /data-id=('|")(\d*)('|")/.match(@notification.message)[2] %> - <%= @notification.message.gsub(/href='.+'/, "href='#{zip_exports_download_url(zip_id)}'").html_safe %> + <%= @notification.message.gsub(/href='.+'/, "href='#{zip_exports_download_export_all_url(zip_id)}'").html_safe %> <% else %> <%= sanitize_input(prepend_server_url_to_links(@notification.message)) %> <% end %> From d761a81b269bbbf201011402e4e2235c4e4f4e33 Mon Sep 17 00:00:00 2001 From: mlorb Date: Fri, 7 Dec 2018 15:02:45 +0100 Subject: [PATCH 2/2] fix download link in email again --- app/views/users/mailer/notification.html.erb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/users/mailer/notification.html.erb b/app/views/users/mailer/notification.html.erb index 8090977c9..6262a788c 100644 --- a/app/views/users/mailer/notification.html.erb +++ b/app/views/users/mailer/notification.html.erb @@ -25,7 +25,12 @@ <%= I18n.t("notifications.deliver.download_link") %> <% # work around the problem with inserting the link of zipExport %> <% zip_id = /data-id=('|")(\d*)('|")/.match(@notification.message)[2] %> - <%= @notification.message.gsub(/href='.+'/, "href='#{zip_exports_download_export_all_url(zip_id)}'").html_safe %> + <% if /download_export_all_zip/.match(@notification.message) %> + <% download_url = zip_exports_download_export_all_url(zip_id) %> + <% else %> + <% download_url = zip_exports_download_url(zip_id) %> + <% end %> + <%= @notification.message.gsub(/href='.+'/, "href='#{download_url}'").html_safe %> <% else %> <%= sanitize_input(prepend_server_url_to_links(@notification.message)) %> <% end %>