summaryrefslogtreecommitdiff
path: root/program/include/rcube_output_html.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcube_output_html.php')
-rw-r--r--program/include/rcube_output_html.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php
index d80d28a9b..ac07d58e9 100644
--- a/program/include/rcube_output_html.php
+++ b/program/include/rcube_output_html.php
@@ -457,7 +457,7 @@ class rcube_output_html extends rcube_output
if (is_readable($path)) {
$this->config->set('skin_path', $skin_path);
- $this->base_path = $skin_path;
+ $this->base_path = preg_replace('!plugins/\w+/!', '', $skin_path); // set base_path to core skin directory (not plugin's skin)
break;
}
else {
@@ -494,8 +494,6 @@ class rcube_output_html extends rcube_output
$output = $hook['content'];
unset($hook['content']);
- $output = $this->parse_with_globals($this->fix_paths($output));
-
// make sure all <form> tags have a valid request token
$output = preg_replace_callback('/<form\s+([^>]+)>/Ui', array($this, 'alter_form_tag'), $output);
$this->footer = preg_replace_callback('/<form\s+([^>]+)>/Ui', array($this, 'alter_form_tag'), $this->footer);
@@ -856,7 +854,7 @@ class rcube_output_html extends rcube_output
case 'include':
$old_base_path = $this->base_path;
if ($path = $this->get_skin_file($attrib['file'], $skin_path, $attrib['skinpath'])) {
- $this->base_path = $skin_path;
+ $this->base_path = preg_replace('!plugins/\w+/!', '', $skin_path); // set base_path to core skin directory (not plugin's skin)
$path = realpath($path);
}
@@ -1089,7 +1087,7 @@ class rcube_output_html extends rcube_output
// make valid href to specific buttons
if (in_array($attrib['command'], rcmail::$main_tasks)) {
$attrib['href'] = $this->app->url(array('task' => $attrib['command']));
- $attrib['onclick'] = sprintf("%s.command('switch-task','%s',null,event); return false", rcmail::JS_OBJECT_NAME, $attrib['command']);
+ $attrib['onclick'] = sprintf("return %s.command('switch-task','%s',this,event)", rcmail::JS_OBJECT_NAME, $attrib['command']);
}
else if ($attrib['task'] && in_array($attrib['task'], rcmail::$main_tasks)) {
$attrib['href'] = $this->app->url(array('action' => $attrib['command'], 'task' => $attrib['task']));
@@ -1357,6 +1355,8 @@ class rcube_output_html extends rcube_output
$output = substr_replace($output, $css, $pos, 0);
}
+ $output = $this->parse_with_globals($this->fix_paths($output));
+
// trigger hook with final HTML content to be sent
$hook = $this->app->plugins->exec_hook("send_page", array('content' => $output));
if (!$hook['abort']) {