From 2aa2b332f6e216ceeabc36ef6b942c40d91bda5a Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Wed, 08 Sep 2010 05:40:39 -0400 Subject: [PATCH] - Small performance improvements --- program/include/rcube_template.php | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php index fec12ae..f301b36 100755 --- a/program/include/rcube_template.php +++ b/program/include/rcube_template.php @@ -444,7 +444,10 @@ */ public function abs_url($str) { - return preg_replace('/^\//', $this->config['skin_path'].'/', $str); + if ($str[0] == '/') + return $this->config['skin_path'] . $str; + else + return $str; } @@ -791,6 +794,10 @@ if ($attrib['task']) $command = $attrib['task'] . '.' . $command; + + if (!$attrib['image']) { + $attrib['image'] = $attrib['imagepas'] ? $attrib['imagepas'] : $attrib['imageact']; + } if (!$attrib['id']) { $attrib['id'] = sprintf('rcmbtn%d', $s_button_count++); -- Gitblit v1.9.1