Add fallback to default skin if the selected one is not available in plugin directory
| | |
| | | if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show') |
| | | && ($archive_folder = $rcmail->config->get('archive_mbox'))) { |
| | | |
| | | $skin_path = 'skins/'.$rcmail->output->config['skin']; |
| | | $skin_path = $this->local_skin_path(); |
| | | |
| | | $this->include_script('archive.js'); |
| | | $this->add_texts('localization', true); |
| | |
| | | |
| | | $rcmail = rcmail::get_instance(); |
| | | if ($rcmail->action == '' || $rcmail->action == 'show') { |
| | | $skin_path = 'skins/'.$rcmail->output->config['skin']; |
| | | $skin_path = $this->local_skin_path();; |
| | | $this->include_script('markasjunk.js'); |
| | | $this->add_texts('localization', true); |
| | | $this->add_button(array( |
| | |
| | | else |
| | | return $fn; |
| | | } |
| | | |
| | | /** |
| | | * Provide path to the currently selected skin folder within the plugin directory |
| | | * with a fallback to the default skin folder. |
| | | * |
| | | * @return string Skin path relative to plugins directory |
| | | */ |
| | | protected function local_skin_path() |
| | | { |
| | | $skin_path = 'skins/'.$this->api->output->config['skin']; |
| | | if (!is_dir(realpath(slashify($this->home) . $skin_path))) |
| | | $skin_path = 'skins/default'; |
| | | return $skin_path; |
| | | } |
| | | |
| | | /** |
| | | * Callback function for array_map |