diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-04-23 19:33:59 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-04-23 19:33:59 +0000 |
| commit | 310900d450c1f9858df2afe27b783d95e7aa1cd8 (patch) | |
| tree | 01c6370ed506a23553277eb2c0bb69dc9207ec8f /roundcubemail/program | |
| parent | 4eb00d7a5c78abd07aa10965e25516a7c6153a5d (diff) | |
- Append skin_path to images location only when it starts with '/' sign (#1484859)
git-svn-id: https://svn.roundcube.net/trunk@1330 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rwxr-xr-x | roundcubemail/program/include/rcube_template.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/roundcubemail/program/include/rcube_template.php b/roundcubemail/program/include/rcube_template.php index 20b55caaa..a76e378e1 100755 --- a/roundcubemail/program/include/rcube_template.php +++ b/roundcubemail/program/include/rcube_template.php @@ -599,7 +599,6 @@ class rcube_template extends rcube_html_page return $out; } - /** * Create and register a button * @@ -617,12 +616,12 @@ class rcube_template extends rcube_html_page // these commands can be called directly via url $a_static_commands = array('compose', 'list'); - $browser = new rcube_browser(); - $skin_path = $this->config['skin_path']; - if (!($attrib['command'] || $attrib['name'])) { return ''; } + + $browser = new rcube_browser(); + // try to find out the button type if ($attrib['type']) { $attrib['type'] = strtolower($attrib['type']); @@ -687,9 +686,9 @@ class rcube_template extends rcube_html_page $command, $attrib['id'], $attrib['type'], - $attrib['imageact'] ? $skin_path.$attrib['imageact'] : $attrib['classact'], - $attrib['imagesel'] ? $skin_path.$attrib['imagesel'] : $attrib['classsel'], - $attrib['imageover'] ? $skin_path.$attrib['imageover'] : '' + $attrib['imageact'] ? $this->abs_url($attrib['imageact']) : $attrib['classact'], + $attrib['imagesel'] ? $this->abs_url($attrib['imagesel']) : $attrib['classsel'], + $attrib['imageover'] ? $this->abs_url($attrib['imageover']) : '' )); // make valid href to specific buttons @@ -755,8 +754,7 @@ class rcube_template extends rcube_html_page 'vspace', 'align', 'alt', ) ); - $img_tag = sprintf('<img src="%%s"%s />', $attrib_str); - $btn_content = sprintf($img_tag, $skin_path.$attrib['image']); + $btn_content = sprintf('<img src="%s"%s />', $this->abs_url($attrib['image']), $attrib_str); if ($attrib['label']) { $btn_content .= ' '.$attrib['label']; } |
