summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-05-13 17:22:35 +0000
committeralecpl <alec@alec.pl>2011-05-13 17:22:35 +0000
commit8e99ffbcaccf83602a47b2be230eb4dd2f106399 (patch)
tree50390a0c5594568db2ba536c369d219734a6f99f /program
parenta208a4fa68d3c26c34ca3dae250267fec761675c (diff)
- Use less included files in mail and message templates for better performance
- Add access to template name in template expressions
Diffstat (limited to 'program')
-rwxr-xr-xprogram/include/rcube_template.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 3131b39c2..8495ab8ee 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -38,6 +38,7 @@ class rcube_template extends rcube_html_page
private $js_commands = array();
private $object_handlers = array();
private $plugin_skin_path;
+ private $template_name;
public $browser;
public $framed = false;
@@ -365,7 +366,9 @@ class rcube_template extends rcube_html_page
$plugin = false;
$realname = $name;
$temp = explode('.', $name, 2);
+
$this->plugin_skin_path = null;
+ $this->template_name = $realname;
if (count($temp) > 1) {
$plugin = $temp[0];
@@ -600,7 +603,8 @@ class rcube_template extends rcube_html_page
'/env:([a-z0-9_]+)/i',
'/request:([a-z0-9_]+)/i',
'/cookie:([a-z0-9_]+)/i',
- '/browser:([a-z0-9_]+)/i'
+ '/browser:([a-z0-9_]+)/i',
+ '/template:name/i',
),
array(
"\$_SESSION['\\1']",
@@ -608,7 +612,8 @@ class rcube_template extends rcube_html_page
"\$this->env['\\1']",
"get_input_value('\\1', RCUBE_INPUT_GPC)",
"\$_COOKIE['\\1']",
- "\$this->browser->{'\\1'}"
+ "\$this->browser->{'\\1'}",
+ $this->template_name,
),
$expression);
}