Skip to content
Snippets Groups Projects
Commit 44406017 authored by gnaegi's avatar gnaegi
Browse files

OO-2071 shorten certificate URL to improve QR-Code readibility

parent de63e078
No related branches found
No related tags found
No related merge requests found
...@@ -856,11 +856,10 @@ public class CertificatesManagerImpl implements CertificatesManager, MessageList ...@@ -856,11 +856,10 @@ public class CertificatesManagerImpl implements CertificatesManager, MessageList
.append(entry.getDisplayname()).append("_") .append(entry.getDisplayname()).append("_")
.append(Formatter.formatShortDateFilesystem(dateCertification)); .append(Formatter.formatShortDateFilesystem(dateCertification));
String filename = FileUtils.normalizeFilename(sb.toString()) + ".pdf"; String filename = FileUtils.normalizeFilename(sb.toString()) + ".pdf";
// External URL to certificate. See also DownloadCertificateCellRenderer.getUrl(); // External URL to certificate as short as possible for QR-Code
sb = new StringBuilder(); sb = new StringBuilder();
sb.append(Settings.getServerContextPathURI()).append("/certificate/") sb.append(Settings.getServerContextPathURI()).append("/certificate/")
.append(certificate.getUuid()).append("/") .append(certificate.getUuid()).append("/certificate.pdf");
.append(filename);
String certUrl = sb.toString(); String certUrl = sb.toString();
if(template == null || template.getPath().toLowerCase().endsWith("pdf")) { if(template == null || template.getPath().toLowerCase().endsWith("pdf")) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment