summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-06-15 14:18:55 +0000
committeralecpl <alec@alec.pl>2008-06-15 14:18:55 +0000
commit23bea9d4e95c5381fcc8f05739dc60c9eb273049 (patch)
treee6251e2dc7986bf312be589382a8c6aa9cca9626 /program
parent7e77b4f893e377073e3520bc9b59fbf33ee1146b (diff)
- skin_path fix after last changes
Diffstat (limited to 'program')
-rwxr-xr-xprogram/include/rcube_template.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 6cf9a9ad4..5bae3f790 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -58,10 +58,7 @@ class rcube_template extends rcube_html_page
$this->set_env('task', $task);
// load the correct skin (in case user-defined)
- if (empty($this->config['skin']) || !is_readable('skins/'.$this->config['skin']))
- $this->config['skin'] = 'default';
-
- $this->config['skin_path'] = 'skins/'.$this->config['skin'];
+ $this->set_skin($this->config['skin']);
// add common javascripts
$javascript = 'var '.JS_OBJECT_NAME.' = new rcube_webmail();';
@@ -114,7 +111,12 @@ class rcube_template extends rcube_html_page
public function set_skin($skin)
{
if (!empty($skin) && is_dir('skins/'.$skin) && is_readable('skins/'.$skin))
- $this->config['skin_path'] = 'skins/'.$skin;
+ $skin_path = 'skins/'.$skin;
+ else
+ $skin_path = $this->config['skin_path'] ? $this->config['skin_path'] : 'skins/default';
+
+ $this->app->config->set('skin_path', $skin_path);
+ $this->config['skin_path'] = $skin_path;
}
/**