From f03839b24b44c4957843701d38acec950446ebf1 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 22 Mar 2017 12:15:39 +0100 Subject: [PATCH] Add support for 'link' objects in templates (with conditions) .. to simplify conditional tags injection while nested 'if' objects do not work --- program/include/rcmail_output_html.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index 28edd2e98..777362c5d 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -1221,6 +1221,17 @@ EOF; return $hook['content']; + // return element + case 'link': + if ($attrib['condition'] && !$this->check_condition($attrib['condition'])) { + break; + } + + unset($attrib['condition']); + + return html::tag('link', $attrib); + + // return code for a specified eval expression case 'exp': return html::quote($this->eval_expression($attrib['expression']));