Changeset 2530

Show
Ignore:
Timestamp:
04/18/2008 02:38:38 AM (7 months ago)
Author:
armen
Message:

Re structured smarty config file.

Location:
trunk/modules/smarty
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/smarty/config/smarty.php

    r2480 r2530  
    55        'integration'           => TRUE,        // Enable/Disable Smarty integration 
    66        'templates_ext'         => 'tpl', 
    7         'cache_path'            => APPPATH.'cache/', 
    87        'global_templates_path' => APPPATH.'views/', 
     8        'cache_path'            => APPPATH.'cache/smarty_cache/', 
     9        'compile_path'          => APPPATH.'cache/smarty_compile/', 
     10        'configs_path'          => APPPATH.'views/smarty_configs/', 
     11        'plugins_path'          => APPPATH.'views/smarty_plugins/', 
     12        'debug_tpl'             => APPPATH.'views/debug.tpl', 
    913        'debugging_ctrl'        => FALSE, 
    1014        'debugging'             => TRUE, 
  • trunk/modules/smarty/libraries/MY_Controller.php

    r2480 r2530  
    77                parent::__construct(); 
    88         
    9                 if (Config::item('smarty.integration') == TRUE) { 
     9                if (Config::item('smarty.integration') == TRUE) 
     10                { 
    1011                        $this->MY_Smarty = new MY_Smarty; 
    1112                } 
     
    2223                        if (is_array($vars) AND count($vars) > 0)  
    2324                        { 
    24                                 foreach ($vars as $key => $val)  
     25                                foreach ($vars AS $key => $val) 
    2526                                { 
    2627                                        $this->MY_Smarty->assign($key, $val); 
  • trunk/modules/smarty/libraries/MY_Smarty.php

    r2480 r2530  
    1414                parent::Smarty(); 
    1515 
    16                 $this->cache_dir      = Config::item('smarty.cache_path') . 'smarty_cache/'; 
    17                 $this->compile_dir    = Config::item('smarty.cache_path') . 'smarty_compile/'; 
    18                 $this->config_dir     = Config::item('smarty.global_templates_path') . 'smarty_configs/'; 
    19                 $this->plugins_dir[]  = Config::item('smarty.global_templates_path') . 'smarty_plugins/'; 
    20                 $this->debug_tpl      = Config::item('smarty.global_templates_path') . 'debug.tpl'; 
     16                $this->cache_dir      = Config::item('smarty.cache_path'); 
     17                $this->compile_dir    = Config::item('smarty.compile_path'); 
     18                $this->config_dir     = Config::item('smarty.configs_path'); 
     19                $this->plugins_dir[]  = Config::item('smarty.plugins_path'); 
     20                $this->debug_tpl      = Config::item('smarty.debug_tpl'); 
    2121                $this->debugging_ctrl = Config::item('smarty.debugging_ctrl'); 
    2222                $this->debugging      = Config::item('smarty.debugging'); 
     
    2626 
    2727                // check if cache directory is exists 
    28                 $this->checkDirectory(Config::item('smarty.cache_path')); 
     28                $this->checkDirectory($this->cache_dir); 
    2929 
    3030                // check if smarty_compile directory is exists