Fix special vars replacement in templates

pull/1/head
thomascube 13 years ago
parent 77c779a2b8
commit f6a7491fa1

@ -284,7 +284,6 @@ class rcube_html_page
$output = preg_replace_callback( $output = preg_replace_callback(
'!(src|href|background)=(["\']?)([a-z0-9/_.-]+)(["\'\s>])!i', '!(src|href|background)=(["\']?)([a-z0-9/_.-]+)(["\'\s>])!i',
array($this, 'file_callback'), $output); array($this, 'file_callback'), $output);
$output = str_replace('$__skin_path', $base_path, $output);
// trigger hook with final HTML content to be sent // trigger hook with final HTML content to be sent
$hook = rcmail::get_instance()->plugins->exec_hook("send_page", array('content' => $output)); $hook = rcmail::get_instance()->plugins->exec_hook("send_page", array('content' => $output));

@ -528,6 +528,7 @@ class rcube_template extends rcube_html_page
{ {
$GLOBALS['__version'] = Q(RCMAIL_VERSION); $GLOBALS['__version'] = Q(RCMAIL_VERSION);
$GLOBALS['__comm_path'] = Q($this->app->comm_path); $GLOBALS['__comm_path'] = Q($this->app->comm_path);
$GLOBALS['__skin_path'] = Q($this->config['skin_path']);
return preg_replace_callback('/\$(__[a-z0-9_\-]+)/', return preg_replace_callback('/\$(__[a-z0-9_\-]+)/',
array($this, 'globals_callback'), $input); array($this, 'globals_callback'), $input);
} }

Loading…
Cancel
Save