* @param boolean $display
*/
function fetch($resource_name, $cache_id = NULL, $compile_id = NULL, $display = FALSE) {
- return parent::fetch($resource_name, $cache_id, $compile_id, $display);
+ if (preg_match( '/^(\s+)?string:/', $resource_name)) {
+ $old_security = $this->security;
+ $this->security = TRUE;
+ }
+ $output = parent::fetch($resource_name, $cache_id, $compile_id, $display);
+ if (isset($old_security)) {
+ $this->security = $old_security;
+ }
+ return $output;
}
function appendValue($name, $value) {
)) {
$textBody = join('', $text);
if ($useSmarty) {
- $smarty->security = TRUE;
- $textBody = $smarty->fetch("string:$textBody");
- $smarty->security = FALSE;
+ $textBody = $smarty->fetch("string:$textBody");
}
$mailParams['text'] = $textBody;
}
))) {
$htmlBody = join('', $html);
if ($useSmarty) {
- $smarty->security = TRUE;
- $htmlBody = $smarty->fetch("string:$htmlBody");
- $smarty->security = FALSE;
+ $htmlBody = $smarty->fetch("string:$htmlBody");
}
$mailParams['html'] = $htmlBody;
}