From ecf6c79d00a8ed722a6664f276a0f015de4d13c2 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 09 Dec 2014 04:43:25 -0500
Subject: [PATCH] Bump up version number, remove package.xml file
---
program/include/rcmail_output_html.php | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php
index a848246..026e9f8 100644
--- a/program/include/rcmail_output_html.php
+++ b/program/include/rcmail_output_html.php
@@ -187,6 +187,8 @@
$valid = !$skin;
}
+ $skin_path = rtrim($skin_path, '/');
+
$this->config->set('skin_path', $skin_path);
$this->base_path = $skin_path;
@@ -460,6 +462,8 @@
{
$plugin = false;
$realname = $name;
+ $plugin_skin_paths = array();
+
$this->template_name = $realname;
$temp = explode('.', $name, 2);
@@ -469,7 +473,6 @@
$skin_dir = $plugin . '/skins/' . $this->config->get('skin');
// apply skin search escalation list to plugin directory
- $plugin_skin_paths = array();
foreach ($this->skin_paths as $skin_path) {
$plugin_skin_paths[] = $this->app->plugins->url . $plugin . '/' . $skin_path;
}
@@ -480,7 +483,7 @@
$plugin_skin_paths[] = $this->app->plugins->url . $skin_dir;
}
- // add plugin skin paths to search list
+ // prepend plugin skin paths to search list
$this->skin_paths = array_merge($plugin_skin_paths, $this->skin_paths);
}
@@ -523,6 +526,8 @@
'file' => __FILE__,
'message' => 'Error loading template for '.$realname
), true, $write);
+
+ $this->skin_paths = array_slice($this->skin_paths, count($plugin_skin_paths));
return false;
}
@@ -546,6 +551,9 @@
// 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);
+
+ // remove plugin skin paths from current context
+ $this->skin_paths = array_slice($this->skin_paths, count($plugin_skin_paths));
if (!$write) {
return $output;
@@ -927,17 +935,17 @@
$attrib['name'] = $this->eval_expression($attrib['expression']);
if ($attrib['name'] || $attrib['command']) {
- // @FIXME: 'noshow' is useless, remove?
- if ($attrib['noshow']) {
- return '';
- }
-
$vars = $attrib + array('product' => $this->config->get('product_name'));
unset($vars['name'], $vars['command']);
$label = $this->app->gettext($attrib + array('vars' => $vars));
$quoting = !empty($attrib['quoting']) ? strtolower($attrib['quoting']) : (rcube_utils::get_boolean((string)$attrib['html']) ? 'no' : '');
+ // 'noshow' can be used in skins to define new labels
+ if ($attrib['noshow']) {
+ return '';
+ }
+
switch ($quoting) {
case 'no':
case 'raw':
--
Gitblit v1.9.1