summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2009-05-21 20:02:43 +0000
committerthomascube <thomas@roundcube.net>2009-05-21 20:02:43 +0000
commit66f68e96236848e8f1dd5992f1d7d0c5cc6da2a9 (patch)
treedfdc1a9c8283ea62dfa4d1b3157dbc17d900db16
parente7008cd4c632ceca938d0ccc2a82ec02d6220884 (diff)
Make links with /this/ pointing to the plugins skin directory
-rwxr-xr-xprogram/include/rcube_template.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 1a83e5ca3..f6718e337 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -357,9 +357,10 @@ class rcube_template extends rcube_html_page
return false;
}
- // replace all path references to plugins/... with the current plugins dir
+ // replace all path references to plugins/... with the configured plugins dir
+ // and /this/ to the current plugin skin directory
if ($plugin) {
- $templ = preg_replace('/\bplugins\//', $this->config['plugins_dir'].'/', $templ);
+ $templ = preg_replace(array('/\bplugins\//', '/(["\']?)\/this\//'), array($this->config['plugins_dir'].'/', "\\1$skin_path/"), $templ);
}
// parse for specialtags
@@ -374,7 +375,7 @@ class rcube_template extends rcube_html_page
);
}
$output = $this->parse_with_globals($output);
- $this->write(trim($output), $skin_path);
+ $this->write(trim($output));
if ($exit) {
exit;
}