Changeset 3163 for trunk/modules

Show
Ignore:
Timestamp:
07/20/2008 11:15:31 AM (5 months ago)
Author:
Shadowhand
Message:

Follow up to r3160, updated modules

Location:
trunk/modules
Files:
31 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/archive/libraries/Archive.php

    r3138 r3163  
    4343                        throw new Kohana_Exception('core.driver_implements', $type, get_class($this), 'Archive_Driver'); 
    4444 
    45                 Log::add('debug', 'Archive Library initialized'); 
     45                Kohana::log('debug', 'Archive Library initialized'); 
    4646        } 
    4747 
  • trunk/modules/auth/libraries/Auth.php

    r3114 r3163  
    5050        { 
    5151                // Append default auth configuration 
    52                 $config += Config::item('auth'); 
     52                $config += Kohana::config('auth'); 
    5353 
    5454                // Clean up the salt pattern and split it into an array 
    55                 $config['salt_pattern'] = preg_split('/,\s*/', Config::item('auth.salt_pattern')); 
     55                $config['salt_pattern'] = preg_split('/,\s*/', Kohana::config('auth.salt_pattern')); 
    5656 
    5757                // Save the config in the object 
     
    7373                $this->driver = $driver; 
    7474 
    75                 Log::add('debug', 'Auth Library loaded'); 
     75                Kohana::log('debug', 'Auth Library loaded'); 
    7676        } 
    7777 
  • trunk/modules/forge/libraries/Form_Upload.php

    r3011 r3163  
    6464        { 
    6565                // Use the global upload directory by default 
    66                 empty($dir) and $dir = Config::item('upload.directory'); 
     66                empty($dir) and $dir = Kohana::config('upload.directory'); 
    6767 
    6868                // Make the path asbolute and normalize it 
     
    8989                        $filename = $this->upload['name']; 
    9090 
    91                         if (Config::item('upload.remove_spaces')) 
     91                        if (Kohana::config('upload.remove_spaces')) 
    9292                        { 
    9393                                // Remove spaces, due to global upload configuration 
     
    142142                { 
    143143                        // Load the mime types 
    144                         $type = Config::item('mimes.'.$type); 
     144                        $type = Kohana::config('mimes.'.$type); 
    145145 
    146146                        if (is_array($type) AND in_array($mime, $type)) 
  • trunk/modules/gmaps/libraries/Gmap.php

    r3158 r3163  
    6666                                '&output=xml'. 
    6767                                '&oe=utf-8'. 
    68                                 '&key='.Config::item('gmaps.api_key'). // Get the API key 
     68                                '&key='.Kohana::config('gmaps.api_key'). // Get the API key 
    6969                                '&q='.rawurlencode($address) // Send the address URL encoded 
    7070                        ); 
     
    101101        public static function static_map($lat = 0, $lon = 0, $zoom = 6, $type = 'roadmap', $width = 300, $height = 300) 
    102102        { 
    103                 $api_url = 'http://maps.google.com/staticmap?key='.Config::item('gmaps.api_key'); 
     103                $api_url = 'http://maps.google.com/staticmap?key='.Kohana::config('gmaps.api_key'); 
    104104 
    105105                $types = array('roadmap', 'mobile'); 
     
    166166         public function api_uri() 
    167167         { 
    168             return 'http://www.google.com/jsapi?key='.Config::item('gmaps.api_key').'&oe=utf-8'; 
     168            return 'http://www.google.com/jsapi?key='.Kohana::config('gmaps.api_key').'&oe=utf-8'; 
    169169         } 
    170170 
  • trunk/modules/gmaps/views/gmaps/javascript.php

    r3151 r3163  
    1 google.load("maps", "2.x", {"language" : "<?php echo substr(Config::item('locale.language.0'), 0, 2);?>"}); 
     1google.load("maps", "2.x", {"language" : "<?php echo substr(Kohana::config('locale.language.0'), 0, 2);?>"}); 
    22function initialize() { 
    33    if (GBrowserIsCompatible()) { 
  • trunk/modules/gmaps/views/gmaps/jquery_javascript.php

    r3151 r3163  
    1 google.load("maps", "2.x", {"language" : "<?php echo substr(Config::item('locale.language.0'), 0, 2);?>"}); 
     1google.load("maps", "2.x", {"language" : "<?php echo substr(Kohana::config('locale.language.0'), 0, 2);?>"}); 
    22 
    33$(function() 
  • trunk/modules/kodoc/controllers/kodoc.php

    r2593 r3163  
    7777                                else 
    7878                                { 
    79                                         foreach (array_reverse(Config::include_paths()) as $path) 
     79                                        foreach (array_reverse(Kohana::include_paths()) as $path) 
    8080                                        { 
    8181                                                if (is_file($path.$type.'/'.$file.EXT)) 
  • trunk/modules/kodoc/libraries/Kodoc.php

    r2593 r3163  
    542542                } 
    543543 
    544                 Log::add('debug', 'Kodoc Library initialized'); 
     544                Kohana::log('debug', 'Kodoc Library initialized'); 
    545545        } 
    546546 
  • trunk/modules/media/controllers/media.php

    r2544 r3163  
    2929                parent::__construct(); 
    3030 
    31                 $this->separator = Config::item('media.separator') OR $this->separator = ','; 
    32  
    33                 $cache = Config::item('media.cache'); 
     31                $this->separator = Kohana::config('media.separator') OR $this->separator = ','; 
     32 
     33                $cache = Kohana::config('media.cache'); 
    3434                $this->use_cache = ($cache > 0); 
    3535 
     
    4040                else 
    4141                { 
    42                         $this->cache_lifetime = Config::item('cache.lifetime') OR $this->cache_lifetime = 1800; 
     42                        $this->cache_lifetime = Kohana::config('cache.lifetime') OR $this->cache_lifetime = 1800; 
    4343                } 
    4444 
     
    4848                } 
    4949 
    50                 $this->pack_css = (bool) Config::item('media.pack_css'); 
    51                 $this->pack_js = Config::item('media.pack_js'); 
     50                $this->pack_css = (bool) Kohana::config('media.pack_css'); 
     51                $this->pack_js = Kohana::config('media.pack_js'); 
    5252                ($this->pack_js === TRUE) AND $this->pack_js = 'Normal'; 
    5353        } 
     
    6060                $files = explode($this->separator, $querystr); 
    6161 
    62                 $mimetype = Config::item('mimes.css'); 
     62                $mimetype = Kohana::config('mimes.css'); 
    6363                $mimetype = (isset($mimetype[0])) ? $mimetype[0] : 'text/css'; 
    6464 
     
    9393                $files = explode($this->separator, $querystr); 
    9494 
    95                 $mimetype = Config::item('mimes.js'); 
     95                $mimetype = Kohana::config('mimes.js'); 
    9696                $mimetype = (isset($mimetype[0])) ? $mimetype[0] : 'application/x-javascript'; 
    9797 
  • trunk/modules/media/helpers/media.php

    r2987 r3163  
    2222        public static function stylesheet($style, $media = FALSE, $index = TRUE) 
    2323        { 
    24                 $separator = Config::item('media.separator') or $separator = ','; 
     24                $separator = Kohana::config('media.separator') or $separator = ','; 
    2525 
    2626                if (is_array($style)) 
     
    3434        public static function script($script, $index = TRUE) 
    3535        { 
    36                 $separator = Config::item('media.separator') or $separator = ','; 
     36                $separator = Kohana::config('media.separator') or $separator = ','; 
    3737 
    3838                if (is_array($script)) 
  • trunk/modules/object_db/libraries/Database.php

    r2964 r3163  
    3737                { 
    3838                        // Load default configuration 
    39                         $config = Config::item('database.default'); 
     39                        $config = Kohana::config('database.default'); 
    4040                } 
    4141 
  • trunk/modules/object_db/libraries/Database_Select.php

    r2964 r3163  
    262262                if (is_string($group)) // group name was passed 
    263263                { 
    264                         $config = Config::item('database.'.$group); 
     264                        $config = Kohana::config('database.'.$group); 
    265265                        $conn = Database::parse_con_string($config['connection']); 
    266266                        $driver = $conn['type']; 
  • trunk/modules/object_db/libraries/Database_Where.php

    r2964 r3163  
    7979                if (is_string($group)) // group name was passed 
    8080                { 
    81                         $config = Config::item('database.'.$group); 
     81                        $config = Kohana::config('database.'.$group); 
    8282                        $conn = Database::parse_con_string($config['connection']); 
    8383                        $driver = $conn['type']; 
  • trunk/modules/object_db/libraries/drivers/Database.php

    r2964 r3163  
    359359                { 
    360360                        // Load SQL data types 
    361                         $sql_types = Config::item('sql_types'); 
     361                        $sql_types = Kohana::config('sql_types'); 
    362362                } 
    363363 
     
    419419                } 
    420420 
    421                 Log::add('debug', 'Database cache cleared: '.get_class($this)); 
     421                Kohana::log('debug', 'Database cache cleared: '.get_class($this)); 
    422422 
    423423                return $this; 
  • trunk/modules/object_db/libraries/drivers/Database/Mssql.php

    r2932 r3163  
    2929                $this->db_config = $config; 
    3030 
    31                 Log::add('debug', 'MSSQL Database Driver Initialized'); 
     31                Kohana::log('debug', 'MSSQL Database Driver Initialized'); 
    3232        } 
    3333         
  • trunk/modules/object_db/libraries/drivers/Database/Mysqli.php

    r2932 r3163  
    2626                $this->db_config = $config; 
    2727 
    28                 Log::add('debug', 'MySQLi Database Driver Initialized'); 
     28                Kohana::log('debug', 'MySQLi Database Driver Initialized'); 
    2929        } 
    3030 
  • trunk/modules/object_db/libraries/drivers/Database/Pdosqlite.php

    r2932 r3163  
    3030                $this->db_config = $config; 
    3131 
    32                 Log::add('debug', 'PDO:Sqlite Database Driver Initialized'); 
     32                Kohana::log('debug', 'PDO:Sqlite Database Driver Initialized'); 
    3333        } 
    3434 
     
    260260        public function field_data($table) 
    261261        { 
    262                 Log::add('error', 'This method is under developing'); 
     262                Kohana::log('error', 'This method is under developing'); 
    263263        } 
    264264        /** 
     
    327327                        if (preg_match('/^SELECT|PRAGMA|EXPLAIN/i', $sql)) 
    328328                        { 
    329                                 //Log::add('debug','it was a SELECT, SHOW, DESCRIBE, EXPLAIN query'); 
     329                                //Kohana::log('debug','it was a SELECT, SHOW, DESCRIBE, EXPLAIN query'); 
    330330                                $this->result = $result; 
    331331                                $this->current_row = 0; 
     
    337337                        elseif (preg_match('/^DELETE|INSERT|UPDATE/i', $sql)) 
    338338                        { 
    339                                 //Log::add('debug','Its an DELETE, INSERT, REPLACE, or UPDATE query'); 
     339                                //Kohana::log('debug','Its an DELETE, INSERT, REPLACE, or UPDATE query'); 
    340340                                $this->insert_id  = $link->lastInsertId(); 
    341341                        } 
     
    458458                //~ AND BEFORE you fetch the query result!! 
    459459                //~ You should really use Database_PdoSqlite::list_fields instead of PdoSqlite_Result::list_fields() 
    460                 Log::add('debug','If Sqlite_Result::list_fields() do NOT work as what you expect,read the method\'s comment plz'); 
     460                Kohana::log('debug','If Sqlite_Result::list_fields() do NOT work as what you expect,read the method\'s comment plz'); 
    461461 
    462462                $field_names = array(); 
     
    482482        { 
    483483                //~ Now only work after calling result() or result_array(); 
    484                 Log::add('debug', 'Now only work after calling result() or result_array()'); 
     484                Kohana::log('debug', 'Now only work after calling result() or result_array()'); 
    485485                return $this->total_rows; 
    486486        } 
     
    488488        public function num_rows() 
    489489        { 
    490                 Log::add('error', 'You should really be using "count($result)" instead of "$result->num_rows()". Fix your code!'); 
     490                Kohana::log('error', 'You should really be using "count($result)" instead of "$result->num_rows()". Fix your code!'); 
    491491 
    492492                return $this->total_rows; 
     
    645645                //~ you must set the PDO::ATTR_CURSOR attribute to PDO::CURSOR_SCROLL 
    646646                //~ when you prepare the SQL statement with PDO->prepare(). 
    647                 Log::add('error','this method do not work now,please read the comment of that.'); 
     647                Kohana::log('error','this method do not work now,please read the comment of that.'); 
    648648                //return $this->current_row = 0; 
    649649        } 
  • trunk/modules/object_db/libraries/drivers/Database/Pgsql.php

    r2932 r3163  
    2525                $this->db_config = $config; 
    2626 
    27                 Log::add('debug', 'PgSQL Database Driver Initialized'); 
     27                Kohana::log('debug', 'PgSQL Database Driver Initialized'); 
    2828        } 
    2929 
  • trunk/modules/payment/libraries/Payment.php

    r3108 r3163  
    6060                { 
    6161                        // Load the default group 
    62                         $config = Config::item('payment.default'); 
     62                        $config = Kohana::config('payment.default'); 
    6363                } 
    6464                elseif (is_string($config)) 
     
    7878 
    7979                // Get the driver specific settings 
    80                 $this->config = array_merge($this->config, Config::item('payment.'.$this->config['driver'])); 
     80                $this->config = array_merge($this->config, Kohana::config('payment.'.$this->config['driver'])); 
    8181 
    8282                // Initialize the driver 
  • trunk/modules/payment/libraries/drivers/Payment/Authorize.php

    r2593 r3163  
    5757                $this->test_mode = $config['test_mode']; 
    5858 
    59                 Log::add('debug', 'Authorize.net Payment Driver Initialized'); 
     59                Kohana::log('debug', 'Authorize.net Payment Driver Initialized'); 
    6060        } 
    6161 
  • trunk/modules/payment/libraries/drivers/Payment/Paypal.php

    r2896 r3163  
    224224                $this->session = Session::instance(); 
    225225 
    226                 Log::add('debug', 'PayPal Payment Driver Initialized'); 
     226                Kohana::log('debug', 'PayPal Payment Driver Initialized'); 
    227227        } 
    228228 
     
    351351                        throw new Kohana_User_Exception('SetExpressCheckout ERROR', Kohana::debug($response_array)); 
    352352 
    353                         Log::add('error', Kohana::debug('SetExpressCheckout response:'.$response_array)); 
     353                        Kohana::log('error', Kohana::debug('SetExpressCheckout response:'.$response_array)); 
    354354                        //url::redirect($this->api_connection_fields['ERRORURL']); 
    355355                } 
     
    377377                        throw new Kohana_User_Exception('GetExpressCheckout ERROR', Kohana::debug($this->get_express_checkout_response)); 
    378378 
    379                         Log::add('error', Kohana::debug('GetExpressCheckout response:'.$response)); 
     379                        Kohana::log('error', Kohana::debug('GetExpressCheckout response:'.$response)); 
    380380                        url::redirect($this->api_connection_fields['ERRORURL']); 
    381381                } 
     
    399399                        throw new Kohana_User_Exception('DoExpressCheckoutPayment ERROR', Kohana::debug($this->nvp_response_array)); 
    400400 
    401                         Log::add('error', Kohana::debug('GetExpressCheckout response:'.$response)); 
     401                        Kohana::log('error', Kohana::debug('GetExpressCheckout response:'.$response)); 
    402402                        url::redirect($this->api_connection_fields['ERRORURL']); 
    403403                } 
     
    417417                parse_str(urldecode($postdata),$nvpstr); 
    418418 
    419                 Log::add('debug', 'Connecting to '.$this->api_connection_fields['ENDPOINT']); 
     419                Kohana::log('debug', 'Connecting to '.$this->api_connection_fields['ENDPOINT']); 
    420420 
    421421                $ch = curl_init($this->api_connection_fields['ENDPOINT']); 
  • trunk/modules/payment/libraries/drivers/Payment/Paypalpro.php

    r2593 r3163  
    145145                $this->curl_config = $config['curl_config']; 
    146146 
    147                 Log::add('debug', 'Paypalpro Payment Driver Initialized'); 
     147                Kohana::log('debug', 'Paypalpro Payment Driver Initialized'); 
    148148        } 
    149149 
  • trunk/modules/payment/libraries/drivers/Payment/Trident.php

    r2593 r3163  
    5252                $this->test_mode = $config['test_mode']; 
    5353 
    54                 Log::add('debug', 'Trident Payment Driver Initialized'); 
     54                Kohana::log('debug', 'Trident Payment Driver Initialized'); 
    5555        } 
    5656 
  • trunk/modules/payment/libraries/drivers/Payment/Trustcommerce.php

    r2593 r3163  
    5252                        } 
    5353                } 
    54                 Log::add('debug', 'TrustCommerce Payment Driver Initialized'); 
     54                Kohana::log('debug', 'TrustCommerce Payment Driver Initialized'); 
    5555        } 
    5656 
  • trunk/modules/payment/libraries/drivers/Payment/Yourpay.php

    r2593 r3163  
    6464                $this->test_mode = $config['test_mode']; 
    6565 
    66                 Log::add('debug', 'YourPay.net Payment Driver Initialized'); 
     66                Kohana::log('debug', 'YourPay.net Payment Driver Initialized'); 
    6767        } 
    6868 
  • trunk/modules/smarty/libraries/MY_Controller.php

    r2532 r3163  
    77                parent::__construct(); 
    88         
    9                 if (Config::item('smarty.integration') == TRUE) 
     9                if (Kohana::config('smarty.integration') == TRUE) 
    1010                { 
    1111                        $this->MY_Smarty = new MY_Smarty; 
     
    1818                        return; 
    1919 
    20                 if (substr(strrchr($template, '.'), 1) === Config::item('smarty.templates_ext'))  
     20                if (substr(strrchr($template, '.'), 1) === Kohana::config('smarty.templates_ext'))  
    2121                { 
    2222                        // Assign variables to the template 
  • trunk/modules/smarty/libraries/MY_Smarty.php