Changeset 01accaf in github


Ignore:
Timestamp:
Oct 28, 2009 6:53:40 PM (4 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
531e886
Parents:
2b96b67e
Message:

Add fallback to default skin if the selected one is not available in plugin directory

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/archive/archive.php

    r93a88c9 r01accaf  
    2525      && ($archive_folder = $rcmail->config->get('archive_mbox'))) { 
    2626 
    27       $skin_path = 'skins/'.$rcmail->output->config['skin']; 
    28  
     27      $skin_path = $this->local_skin_path(); 
     28       
    2929      $this->include_script('archive.js'); 
    3030      $this->add_texts('localization', true); 
  • plugins/markasjunk/markasjunk.php

    r2cb5b5a r01accaf  
    2020    $rcmail = rcmail::get_instance(); 
    2121    if ($rcmail->action == '' || $rcmail->action == 'show') { 
    22       $skin_path = 'skins/'.$rcmail->output->config['skin']; 
     22      $skin_path = $this->local_skin_path();; 
    2323      $this->include_script('markasjunk.js'); 
    2424      $this->add_texts('localization', true); 
  • program/include/rcube_plugin.php

    r24e219d r01accaf  
    232232      return $fn; 
    233233  } 
     234   
     235  /** 
     236   * Provide path to the currently selected skin folder within the plugin directory 
     237   * with a fallback to the default skin folder. 
     238   * 
     239   * @return string Skin path relative to plugins directory 
     240   */ 
     241  protected function local_skin_path() 
     242  { 
     243      $skin_path = 'skins/'.$this->api->output->config['skin']; 
     244      if (!is_dir(realpath(slashify($this->home) . $skin_path))) 
     245        $skin_path = 'skins/default'; 
     246    return $skin_path; 
     247  } 
    234248 
    235249  /** 
Note: See TracChangeset for help on using the changeset viewer.