Changeset 2519 in subversion


Ignore:
Timestamp:
May 22, 2009 3:59:37 AM (4 years ago)
Author:
thomasb
Message:

Fix URLs to plugin skin directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_template.php

    r2515 r2519  
    339339            $plugin = $temp[0]; 
    340340            $name = $temp[1]; 
    341             $skin_path = $this->config['plugins_dir'] . '/' . $temp[0] . '/skins/' . $this->config['skin']; 
    342             if (!is_dir($skin_path))  // fallback to default skin 
    343                 $skin_path = $this->config['plugins_dir'] . '/' . $temp[0] . '/skins/default'; 
     341            $skin_dir = $plugin . '/skins/' . $this->config['skin']; 
     342            $skin_path = $this->config['plugins_dir'] . '/' . $skin_dir; 
     343            if (!is_dir($skin_path)) {  // fallback to default skin 
     344                $skin_dir = $plugin . '/skins/default'; 
     345                $skin_path = $this->config['plugins_dir'] . '/' . $skin_dir; 
     346            } 
    344347        } 
    345348         
     
    361364        // and /this/ to the current plugin skin directory 
    362365        if ($plugin) { 
    363             $templ = preg_replace(array('/\bplugins\//', '/(["\']?)\/this\//'), array($this->config['plugins_dir'].'/', "\\1$skin_path/"), $templ); 
     366            $templ = preg_replace(array('/\bplugins\//', '/(["\']?)\/this\//'), array($this->app->plugins->url, '\\1'.$this->app->plugins->url.$skin_dir.'/'), $templ); 
    364367        } 
    365368 
Note: See TracChangeset for help on using the changeset viewer.