Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 130068 | Differences between
and this patch

Collapse All | Expand All

(-)maia-1.0.1/php/smarty.php (-3 / +11 lines)
Lines 85-91 Link Here
85
    class ThemeSmarty extends Smarty {
85
    class ThemeSmarty extends Smarty {
86
        var $_basedir = '';
86
        var $_basedir = '';
87
        
87
        
88
        function ThemeSmarty($theme = 'default') {
88
        function ThemeSmarty($theme = 'default', $spath = '') {
89
            $this->Smarty();
89
            $this->Smarty();
90
            $this->_basedir = 'themes/'.$theme.'/';
90
            $this->_basedir = 'themes/'.$theme.'/';
91
            $basedir = 'bla';
91
            $basedir = 'bla';
Lines 94-100 Link Here
94
            $this->config_dir = $this->_basedir.'config';
94
            $this->config_dir = $this->_basedir.'config';
95
            $this->cache_dir = $this->_basedir.'cached/';
95
            $this->cache_dir = $this->_basedir.'cached/';
96
            $this->caching = false;
96
            $this->caching = false;
97
            $this->plugins_dir = array($this->_basedir.'code/', "Smarty/plugins");
97
            if (!empty($spath)) {
98
                $this->plugins_dir = $smarty->plugins_dir[] = $spath . '/plugins';
99
            } else {
100
                $this->plugins_dir = array($this->_basedir.'code/', "Smarty/plugins");
101
            }
98
            $this->assign('template_dir', 'themes/'.$theme.'/');
102
            $this->assign('template_dir', 'themes/'.$theme.'/');
99
        }
103
        }
100
        
104
        
Lines 163-169 Link Here
163
    
167
    
164
    // create new smarty-instance
168
    // create new smarty-instance
165
    //$smarty =& new ThemeSmarty('default');
169
    //$smarty =& new ThemeSmarty('default');
166
    $smarty =& new ThemeSmarty($path);
170
    if (isset($smarty_path)) {
171
        $smarty =& new ThemeSmarty($path, $smarty_path);
172
    } else {
173
        $smarty =& new ThemeSmarty($path);
174
    }
167
    
175
    
168
    $include = $smarty->getBaseDir()."code/smarty.php";
176
    $include = $smarty->getBaseDir()."code/smarty.php";
169
    if(file_exists($include) && is_readable($include)) {
177
    if(file_exists($include) && is_readable($include)) {

Return to bug 130068