Changeset 3163 for trunk/modules
- Timestamp:
- 07/20/2008 11:15:31 AM (5 months ago)
- Location:
- trunk/modules
- Files:
-
- 31 modified
-
archive/libraries/Archive.php (modified) (1 diff)
-
auth/libraries/Auth.php (modified) (2 diffs)
-
forge/libraries/Form_Upload.php (modified) (3 diffs)
-
gmaps/libraries/Gmap.php (modified) (3 diffs)
-
gmaps/views/gmaps/javascript.php (modified) (1 diff)
-
gmaps/views/gmaps/jquery_javascript.php (modified) (1 diff)
-
kodoc/controllers/kodoc.php (modified) (1 diff)
-
kodoc/libraries/Kodoc.php (modified) (1 diff)
-
media/controllers/media.php (modified) (5 diffs)
-
media/helpers/media.php (modified) (2 diffs)
-
object_db/libraries/Database.php (modified) (1 diff)
-
object_db/libraries/Database_Select.php (modified) (1 diff)
-
object_db/libraries/Database_Where.php (modified) (1 diff)
-
object_db/libraries/drivers/Database.php (modified) (2 diffs)
-
object_db/libraries/drivers/Database/Mssql.php (modified) (1 diff)
-
object_db/libraries/drivers/Database/Mysqli.php (modified) (1 diff)
-
object_db/libraries/drivers/Database/Pdosqlite.php (modified) (8 diffs)
-
object_db/libraries/drivers/Database/Pgsql.php (modified) (1 diff)
-
payment/libraries/Payment.php (modified) (2 diffs)
-
payment/libraries/drivers/Payment/Authorize.php (modified) (1 diff)
-
payment/libraries/drivers/Payment/Paypal.php (modified) (5 diffs)
-
payment/libraries/drivers/Payment/Paypalpro.php (modified) (1 diff)
-
payment/libraries/drivers/Payment/Trident.php (modified) (1 diff)
-
payment/libraries/drivers/Payment/Trustcommerce.php (modified) (1 diff)
-
payment/libraries/drivers/Payment/Yourpay.php (modified) (1 diff)
-
smarty/libraries/MY_Controller.php (modified) (2 diffs)
-
smarty/libraries/MY_Smarty.php (modified) (3 diffs)
-
smarty/libraries/MY_View.php (modified) (1 diff)
-
unit_test/libraries/Unit_Test.php (modified) (2 diffs)
-
user_guide/controllers/user_guide.php (modified) (1 diff)
-
user_guide/views/user_guide/template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/archive/libraries/Archive.php
r3138 r3163 43 43 throw new Kohana_Exception('core.driver_implements', $type, get_class($this), 'Archive_Driver'); 44 44 45 Log::add('debug', 'Archive Library initialized');45 Kohana::log('debug', 'Archive Library initialized'); 46 46 } 47 47 -
trunk/modules/auth/libraries/Auth.php
r3114 r3163 50 50 { 51 51 // Append default auth configuration 52 $config += Config::item('auth');52 $config += Kohana::config('auth'); 53 53 54 54 // 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')); 56 56 57 57 // Save the config in the object … … 73 73 $this->driver = $driver; 74 74 75 Log::add('debug', 'Auth Library loaded');75 Kohana::log('debug', 'Auth Library loaded'); 76 76 } 77 77 -
trunk/modules/forge/libraries/Form_Upload.php
r3011 r3163 64 64 { 65 65 // 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'); 67 67 68 68 // Make the path asbolute and normalize it … … 89 89 $filename = $this->upload['name']; 90 90 91 if ( Config::item('upload.remove_spaces'))91 if (Kohana::config('upload.remove_spaces')) 92 92 { 93 93 // Remove spaces, due to global upload configuration … … 142 142 { 143 143 // Load the mime types 144 $type = Config::item('mimes.'.$type);144 $type = Kohana::config('mimes.'.$type); 145 145 146 146 if (is_array($type) AND in_array($mime, $type)) -
trunk/modules/gmaps/libraries/Gmap.php
r3158 r3163 66 66 '&output=xml'. 67 67 '&oe=utf-8'. 68 '&key='. Config::item('gmaps.api_key'). // Get the API key68 '&key='.Kohana::config('gmaps.api_key'). // Get the API key 69 69 '&q='.rawurlencode($address) // Send the address URL encoded 70 70 ); … … 101 101 public static function static_map($lat = 0, $lon = 0, $zoom = 6, $type = 'roadmap', $width = 300, $height = 300) 102 102 { 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'); 104 104 105 105 $types = array('roadmap', 'mobile'); … … 166 166 public function api_uri() 167 167 { 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'; 169 169 } 170 170 -
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);?>"});1 google.load("maps", "2.x", {"language" : "<?php echo substr(Kohana::config('locale.language.0'), 0, 2);?>"}); 2 2 function initialize() { 3 3 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);?>"});1 google.load("maps", "2.x", {"language" : "<?php echo substr(Kohana::config('locale.language.0'), 0, 2);?>"}); 2 2 3 3 $(function() -
trunk/modules/kodoc/controllers/kodoc.php
r2593 r3163 77 77 else 78 78 { 79 foreach (array_reverse( Config::include_paths()) as $path)79 foreach (array_reverse(Kohana::include_paths()) as $path) 80 80 { 81 81 if (is_file($path.$type.'/'.$file.EXT)) -
trunk/modules/kodoc/libraries/Kodoc.php
r2593 r3163 542 542 } 543 543 544 Log::add('debug', 'Kodoc Library initialized');544 Kohana::log('debug', 'Kodoc Library initialized'); 545 545 } 546 546 -
trunk/modules/media/controllers/media.php
r2544 r3163 29 29 parent::__construct(); 30 30 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'); 34 34 $this->use_cache = ($cache > 0); 35 35 … … 40 40 else 41 41 { 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; 43 43 } 44 44 … … 48 48 } 49 49 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'); 52 52 ($this->pack_js === TRUE) AND $this->pack_js = 'Normal'; 53 53 } … … 60 60 $files = explode($this->separator, $querystr); 61 61 62 $mimetype = Config::item('mimes.css');62 $mimetype = Kohana::config('mimes.css'); 63 63 $mimetype = (isset($mimetype[0])) ? $mimetype[0] : 'text/css'; 64 64 … … 93 93 $files = explode($this->separator, $querystr); 94 94 95 $mimetype = Config::item('mimes.js');95 $mimetype = Kohana::config('mimes.js'); 96 96 $mimetype = (isset($mimetype[0])) ? $mimetype[0] : 'application/x-javascript'; 97 97 -
trunk/modules/media/helpers/media.php
r2987 r3163 22 22 public static function stylesheet($style, $media = FALSE, $index = TRUE) 23 23 { 24 $separator = Config::item('media.separator') or $separator = ',';24 $separator = Kohana::config('media.separator') or $separator = ','; 25 25 26 26 if (is_array($style)) … … 34 34 public static function script($script, $index = TRUE) 35 35 { 36 $separator = Config::item('media.separator') or $separator = ',';36 $separator = Kohana::config('media.separator') or $separator = ','; 37 37 38 38 if (is_array($script)) -
trunk/modules/object_db/libraries/Database.php
r2964 r3163 37 37 { 38 38 // Load default configuration 39 $config = Config::item('database.default');39 $config = Kohana::config('database.default'); 40 40 } 41 41 -
trunk/modules/object_db/libraries/Database_Select.php
r2964 r3163 262 262 if (is_string($group)) // group name was passed 263 263 { 264 $config = Config::item('database.'.$group);264 $config = Kohana::config('database.'.$group); 265 265 $conn = Database::parse_con_string($config['connection']); 266 266 $driver = $conn['type']; -
trunk/modules/object_db/libraries/Database_Where.php
r2964 r3163 79 79 if (is_string($group)) // group name was passed 80 80 { 81 $config = Config::item('database.'.$group);81 $config = Kohana::config('database.'.$group); 82 82 $conn = Database::parse_con_string($config['connection']); 83 83 $driver = $conn['type']; -
trunk/modules/object_db/libraries/drivers/Database.php
r2964 r3163 359 359 { 360 360 // Load SQL data types 361 $sql_types = Config::item('sql_types');361 $sql_types = Kohana::config('sql_types'); 362 362 } 363 363 … … 419 419 } 420 420 421 Log::add('debug', 'Database cache cleared: '.get_class($this));421 Kohana::log('debug', 'Database cache cleared: '.get_class($this)); 422 422 423 423 return $this; -
trunk/modules/object_db/libraries/drivers/Database/Mssql.php
r2932 r3163 29 29 $this->db_config = $config; 30 30 31 Log::add('debug', 'MSSQL Database Driver Initialized');31 Kohana::log('debug', 'MSSQL Database Driver Initialized'); 32 32 } 33 33 -
trunk/modules/object_db/libraries/drivers/Database/Mysqli.php
r2932 r3163 26 26 $this->db_config = $config; 27 27 28 Log::add('debug', 'MySQLi Database Driver Initialized');28 Kohana::log('debug', 'MySQLi Database Driver Initialized'); 29 29 } 30 30 -
trunk/modules/object_db/libraries/drivers/Database/Pdosqlite.php
r2932 r3163 30 30 $this->db_config = $config; 31 31 32 Log::add('debug', 'PDO:Sqlite Database Driver Initialized');32 Kohana::log('debug', 'PDO:Sqlite Database Driver Initialized'); 33 33 } 34 34 … … 260 260 public function field_data($table) 261 261 { 262 Log::add('error', 'This method is under developing');262 Kohana::log('error', 'This method is under developing'); 263 263 } 264 264 /** … … 327 327 if (preg_match('/^SELECT|PRAGMA|EXPLAIN/i', $sql)) 328 328 { 329 // Log::add('debug','it was a SELECT, SHOW, DESCRIBE, EXPLAIN query');329 //Kohana::log('debug','it was a SELECT, SHOW, DESCRIBE, EXPLAIN query'); 330 330 $this->result = $result; 331 331 $this->current_row = 0; … … 337 337 elseif (preg_match('/^DELETE|INSERT|UPDATE/i', $sql)) 338 338 { 339 // Log::add('debug','Its an DELETE, INSERT, REPLACE, or UPDATE query');339 //Kohana::log('debug','Its an DELETE, INSERT, REPLACE, or UPDATE query'); 340 340 $this->insert_id = $link->lastInsertId(); 341 341 } … … 458 458 //~ AND BEFORE you fetch the query result!! 459 459 //~ 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'); 461 461 462 462 $field_names = array(); … … 482 482 { 483 483 //~ 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()'); 485 485 return $this->total_rows; 486 486 } … … 488 488 public function num_rows() 489 489 { 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!'); 491 491 492 492 return $this->total_rows; … … 645 645 //~ you must set the PDO::ATTR_CURSOR attribute to PDO::CURSOR_SCROLL 646 646 //~ 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.'); 648 648 //return $this->current_row = 0; 649 649 } -
trunk/modules/object_db/libraries/drivers/Database/Pgsql.php
r2932 r3163 25 25 $this->db_config = $config; 26 26 27 Log::add('debug', 'PgSQL Database Driver Initialized');27 Kohana::log('debug', 'PgSQL Database Driver Initialized'); 28 28 } 29 29 -
trunk/modules/payment/libraries/Payment.php
r3108 r3163 60 60 { 61 61 // Load the default group 62 $config = Config::item('payment.default');62 $config = Kohana::config('payment.default'); 63 63 } 64 64 elseif (is_string($config)) … … 78 78 79 79 // 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'])); 81 81 82 82 // Initialize the driver -
trunk/modules/payment/libraries/drivers/Payment/Authorize.php
r2593 r3163 57 57 $this->test_mode = $config['test_mode']; 58 58 59 Log::add('debug', 'Authorize.net Payment Driver Initialized');59 Kohana::log('debug', 'Authorize.net Payment Driver Initialized'); 60 60 } 61 61 -
trunk/modules/payment/libraries/drivers/Payment/Paypal.php
r2896 r3163 224 224 $this->session = Session::instance(); 225 225 226 Log::add('debug', 'PayPal Payment Driver Initialized');226 Kohana::log('debug', 'PayPal Payment Driver Initialized'); 227 227 } 228 228 … … 351 351 throw new Kohana_User_Exception('SetExpressCheckout ERROR', Kohana::debug($response_array)); 352 352 353 Log::add('error', Kohana::debug('SetExpressCheckout response:'.$response_array));353 Kohana::log('error', Kohana::debug('SetExpressCheckout response:'.$response_array)); 354 354 //url::redirect($this->api_connection_fields['ERRORURL']); 355 355 } … … 377 377 throw new Kohana_User_Exception('GetExpressCheckout ERROR', Kohana::debug($this->get_express_checkout_response)); 378 378 379 Log::add('error', Kohana::debug('GetExpressCheckout response:'.$response));379 Kohana::log('error', Kohana::debug('GetExpressCheckout response:'.$response)); 380 380 url::redirect($this->api_connection_fields['ERRORURL']); 381 381 } … … 399 399 throw new Kohana_User_Exception('DoExpressCheckoutPayment ERROR', Kohana::debug($this->nvp_response_array)); 400 400 401 Log::add('error', Kohana::debug('GetExpressCheckout response:'.$response));401 Kohana::log('error', Kohana::debug('GetExpressCheckout response:'.$response)); 402 402 url::redirect($this->api_connection_fields['ERRORURL']); 403 403 } … … 417 417 parse_str(urldecode($postdata),$nvpstr); 418 418 419 Log::add('debug', 'Connecting to '.$this->api_connection_fields['ENDPOINT']);419 Kohana::log('debug', 'Connecting to '.$this->api_connection_fields['ENDPOINT']); 420 420 421 421 $ch = curl_init($this->api_connection_fields['ENDPOINT']); -
trunk/modules/payment/libraries/drivers/Payment/Paypalpro.php
r2593 r3163 145 145 $this->curl_config = $config['curl_config']; 146 146 147 Log::add('debug', 'Paypalpro Payment Driver Initialized');147 Kohana::log('debug', 'Paypalpro Payment Driver Initialized'); 148 148 } 149 149 -
trunk/modules/payment/libraries/drivers/Payment/Trident.php
r2593 r3163 52 52 $this->test_mode = $config['test_mode']; 53 53 54 Log::add('debug', 'Trident Payment Driver Initialized');54 Kohana::log('debug', 'Trident Payment Driver Initialized'); 55 55 } 56 56 -
trunk/modules/payment/libraries/drivers/Payment/Trustcommerce.php
r2593 r3163 52 52 } 53 53 } 54 Log::add('debug', 'TrustCommerce Payment Driver Initialized');54 Kohana::log('debug', 'TrustCommerce Payment Driver Initialized'); 55 55 } 56 56 -
trunk/modules/payment/libraries/drivers/Payment/Yourpay.php
r2593 r3163 64 64 $this->test_mode = $config['test_mode']; 65 65 66 Log::add('debug', 'YourPay.net Payment Driver Initialized');66 Kohana::log('debug', 'YourPay.net Payment Driver Initialized'); 67 67 } 68 68 -
trunk/modules/smarty/libraries/MY_Controller.php
r2532 r3163 7 7 parent::__construct(); 8 8 9 if ( Config::item('smarty.integration') == TRUE)9 if (Kohana::config('smarty.integration') == TRUE) 10 10 { 11 11 $this->MY_Smarty = new MY_Smarty; … … 18 18 return; 19 19 20 if (substr(strrchr($template, '.'), 1) === Config::item('smarty.templates_ext'))20 if (substr(strrchr($template, '.'), 1) === Kohana::config('smarty.templates_ext')) 21 21 { 22 22 // Assign variables to the template -
trunk/modules/smarty/libraries/MY_Smarty.php
