- skin_path fix after last changes

release-0.6
alecpl 17 years ago
parent 7e77b4f893
commit 23bea9d4e9

@ -58,10 +58,7 @@ class rcube_template extends rcube_html_page
$this->set_env('task', $task); $this->set_env('task', $task);
// load the correct skin (in case user-defined) // load the correct skin (in case user-defined)
if (empty($this->config['skin']) || !is_readable('skins/'.$this->config['skin'])) $this->set_skin($this->config['skin']);
$this->config['skin'] = 'default';
$this->config['skin_path'] = 'skins/'.$this->config['skin'];
// add common javascripts // add common javascripts
$javascript = 'var '.JS_OBJECT_NAME.' = new rcube_webmail();'; $javascript = 'var '.JS_OBJECT_NAME.' = new rcube_webmail();';
@ -114,7 +111,12 @@ class rcube_template extends rcube_html_page
public function set_skin($skin) public function set_skin($skin)
{ {
if (!empty($skin) && is_dir('skins/'.$skin) && is_readable('skins/'.$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;
} }
/** /**

Loading…
Cancel
Save