From 51fb3bfa5870db4e16e898f99ca72d25f62349d5 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 20 Apr 2017 16:09:56 +0200 Subject: [PATCH] Support including files with path relative to templates dir --- program/include/rcmail_output_html.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index 835f7f594..a8ee3a8a3 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -1104,6 +1104,10 @@ EOF; break; } + if ($attrib['file'][0] != '/') { + $attrib['file'] = '/templates/' . $attrib['file']; + } + $old_base_path = $this->base_path; if (!empty($attrib['skin_path'])) $attrib['skinpath'] = $attrib['skin_path']; if ($path = $this->get_skin_file($attrib['file'], $skin_path, $attrib['skinpath'])) {