diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-15 14:18:55 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-15 14:18:55 +0000 |
| commit | 60845e4343fb92e0c9e97fdab6bf7e5f73d8f17a (patch) | |
| tree | 10155f0f2bfd05f4a100ee315e86bd4cfa1790b8 /roundcubemail/program/include | |
| parent | aed88ddb9fd66e2a6403cfe447f7e66143d70519 (diff) | |
- skin_path fix after last changes
git-svn-id: https://svn.roundcube.net/trunk@1547 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rwxr-xr-x | roundcubemail/program/include/rcube_template.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/roundcubemail/program/include/rcube_template.php b/roundcubemail/program/include/rcube_template.php index 6cf9a9ad4..5bae3f790 100755 --- a/roundcubemail/program/include/rcube_template.php +++ b/roundcubemail/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; } /** |
