Skip to content
Snippets Groups Projects
Commit f9b02a37 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

remove logging, decode only on textfile

parent 9c303092
No related branches found
No related tags found
No related merge requests found
import("system.logging");
import("Communication_lib");
import("system.neon");
import("Employee_lib");
......@@ -122,7 +121,7 @@ DocumentTemplate.prototype._getRequiredPlaceholders = function ()
return usedPlaceholders;
}
/**
/**
* Returns the template content with replaced placeholders by choosing the right
* replace function for the type.
*
......@@ -139,7 +138,7 @@ DocumentTemplate.prototype.getReplacedContent = function (pReplacements)
pReplacements[i] = text.text2html(pReplacements[i], false);
case DocumentTemplate.types.TXT:
let decodedContent = util.decodeBase64String(this.content)
return DocumentTemplate._replaceText(decodedContent, pReplacements);
return util.encodeBase64String(DocumentTemplate._replaceText(decodedContent, pReplacements));
case DocumentTemplate.types.EML:
return this._getReplacedEML(pReplacements);
case DocumentTemplate.types.ODT:
......@@ -161,8 +160,7 @@ DocumentTemplate.prototype.getReplacedContentByContactId = function (pContactId)
var replacements = this._getReplacementsByContactIds([pContactId]);
var content = this.getReplacedContent(replacements[pContactId]);
logging.log(JSON.stringify(content, null, "\t"))
return util.encodeBase64String(content);
return content;
}
/**
......
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