diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-13 17:22:35 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-13 17:22:35 +0000 |
| commit | f2c1c5270cdf233869294c926f847f94832ebe14 (patch) | |
| tree | 9e11571a5f143e15360d736c0982e8d9d093f1cf /roundcubemail/program | |
| parent | 2545cfd8ae678f609786c4d51d778fa3a99d0612 (diff) | |
- Use less included files in mail and message templates for better performance
- Add access to template name in template expressions
git-svn-id: https://svn.roundcube.net/trunk@4762 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rwxr-xr-x | roundcubemail/program/include/rcube_template.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_template.php b/roundcubemail/program/include/rcube_template.php index 3131b39c2..8495ab8ee 100755 --- a/roundcubemail/program/include/rcube_template.php +++ b/roundcubemail/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); } |
