From 9b6663f87a7e679ffba691cf516191fc840cf978 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 24 Nov 2009 19:20:36 -0800 Subject: Update to Kohana r4684 which is now Kohana 2.4 and has substantial changes. --- system/config/cache.php | 6 +- system/config/cache_memcache.php | 20 ------- system/config/cache_sqlite.php | 10 ---- system/config/cache_xcache.php | 12 ---- system/config/cookie.php | 12 +++- system/config/database.php | 2 +- system/config/email.php | 22 -------- system/config/inflector.php | 2 + system/config/locale.php | 5 +- system/config/log.php | 19 +++++++ system/config/mimes.php | 2 +- system/config/pagination.php | 25 --------- system/config/profiler.php | 4 ++ system/config/session.php | 5 +- system/config/sql_types.php | 115 +++++++++++++++++++++++++-------------- system/config/view.php | 1 + 16 files changed, 119 insertions(+), 143 deletions(-) delete mode 100644 system/config/cache_memcache.php delete mode 100644 system/config/cache_sqlite.php delete mode 100644 system/config/cache_xcache.php delete mode 100644 system/config/email.php create mode 100644 system/config/log.php delete mode 100644 system/config/pagination.php (limited to 'system/config') diff --git a/system/config/cache.php b/system/config/cache.php index ccd3da4d..68682c0a 100644 --- a/system/config/cache.php +++ b/system/config/cache.php @@ -19,14 +19,10 @@ * thirty minutes. Specific lifetime can also be set when creating a new cache. * Setting this to 0 will never automatically delete caches. * - * requests - Average number of cache requests that will processed before all expired - * caches are deleted. This is commonly referred to as "garbage collection". - * Setting this to 0 or a negative number will disable automatic garbage collection. */ $config['default'] = array ( 'driver' => 'file', - 'params' => APPPATH.'cache', + 'params' => array('directory' => APPPATH.'cache', 'gc_probability' => 1000), 'lifetime' => 1800, - 'requests' => 1000 ); diff --git a/system/config/cache_memcache.php b/system/config/cache_memcache.php deleted file mode 100644 index 43d8f205..00000000 --- a/system/config/cache_memcache.php +++ /dev/null @@ -1,20 +0,0 @@ - '127.0.0.1', - 'port' => 11211, - 'persistent' => FALSE, - ) -); - -/** - * Enable cache data compression. - */ -$config['compression'] = FALSE; diff --git a/system/config/cache_sqlite.php b/system/config/cache_sqlite.php deleted file mode 100644 index 818b8932..00000000 --- a/system/config/cache_sqlite.php +++ /dev/null @@ -1,10 +0,0 @@ - TRUE, + 'benchmark' => FALSE, 'persistent' => FALSE, 'connection' => array ( diff --git a/system/config/email.php b/system/config/email.php deleted file mode 100644 index c768367c..00000000 --- a/system/config/email.php +++ /dev/null @@ -1,22 +0,0 @@ - 1, + 'alert' => 2, + 'info' => 3, + 'debug' => 4, +); + +// See different log levels above +$config['log_threshold'] = 1; + +$config['date_format'] = 'Y-m-d H:i:s P'; + +// We can define multiple logging backends at the same time. +$config['drivers'] = array('file'); \ No newline at end of file diff --git a/system/config/mimes.php b/system/config/mimes.php index 6a960f24..c4318d58 100644 --- a/system/config/mimes.php +++ b/system/config/mimes.php @@ -6,7 +6,7 @@ * the operating system MIME list. * * If there are any missing options, please create a ticket on our issue tracker, - * http://kohanaphp.com/trac/newticket. Be sure to give the filename and + * http://dev.kohanaphp.com/projects/kohana2. Be sure to give the filename and * expected MIME type, as well as any additional information you can provide. */ $config = array diff --git a/system/config/pagination.php b/system/config/pagination.php deleted file mode 100644 index 808fc315..00000000 --- a/system/config/pagination.php +++ /dev/null @@ -1,25 +0,0 @@ - 'pagination', - 'style' => 'classic', - 'uri_segment' => 3, - 'query_string' => '', - 'items_per_page' => 20, - 'auto_hide' => FALSE, -); diff --git a/system/config/profiler.php b/system/config/profiler.php index 98ab5a49..90532f07 100644 --- a/system/config/profiler.php +++ b/system/config/profiler.php @@ -6,3 +6,7 @@ * Built in sections are benchmarks, database, session, post and cookies, custom sections can be used too. */ $config['show'] = TRUE; + +$config['time_decimals'] = 3; + +$config['memory_decimals'] = 2; \ No newline at end of file diff --git a/system/config/session.php b/system/config/session.php index e287bae8..29eeafbd 100644 --- a/system/config/session.php +++ b/system/config/session.php @@ -25,7 +25,6 @@ $config['validate'] = array('user_agent'); /** * Enable or disable session encryption. * Note: this has no effect on the native session driver. - * Note: the cookie driver always encrypts session data. Set to TRUE for stronger encryption. */ $config['encryption'] = FALSE; @@ -38,8 +37,10 @@ $config['expiration'] = 7200; /** * Number of page loads before the session id is regenerated. * A value of 0 will disable automatic session id regeneration. + * NOTE: Enabling automatic session regeneration can cause a race condition see the + * docs for details: http://docs.kohanaphp.com/libraries/session#regenerate */ -$config['regenerate'] = 3; +$config['regenerate'] = 0; /** * Percentage probability that the gc (garbage collection) routine is started. diff --git a/system/config/sql_types.php b/system/config/sql_types.php index 4034c6f5..43a13c27 100644 --- a/system/config/sql_types.php +++ b/system/config/sql_types.php @@ -4,55 +4,90 @@ * * SQL data types. If there are missing values, please report them: * - * @link http://trac.kohanaphp.com/newticket + * @link http://dev.kohanaphp.com/projects/kohana2 */ $config = array ( - 'tinyint' => array('type' => 'int', 'max' => 127), - 'smallint' => array('type' => 'int', 'max' => 32767), - 'mediumint' => array('type' => 'int', 'max' => 8388607), - 'int' => array('type' => 'int', 'max' => 2147483647), - 'integer' => array('type' => 'int', 'max' => 2147483647), - 'bigint' => array('type' => 'int', 'max' => 9223372036854775807), - 'float' => array('type' => 'float'), - 'float unsigned' => array('type' => 'float', 'min' => 0), - 'boolean' => array('type' => 'boolean'), - 'time' => array('type' => 'string', 'format' => '00:00:00'), - 'time with time zone' => array('type' => 'string'), - 'date' => array('type' => 'string', 'format' => '0000-00-00'), - 'year' => array('type' => 'string', 'format' => '0000'), - 'datetime' => array('type' => 'string', 'format' => '0000-00-00 00:00:00'), + // SQL-92 + 'bit' => array('type' => 'string', 'exact' => TRUE), + 'bit varying' => array('type' => 'string'), + 'character' => array('type' => 'string', 'exact' => TRUE), + 'character varying' => array('type' => 'string'), + 'date' => array('type' => 'string'), + 'decimal' => array('type' => 'float', 'exact' => TRUE), + 'double precision' => array('type' => 'float'), + 'float' => array('type' => 'float'), + 'integer' => array('type' => 'int', 'min' => -2147483648, 'max' => 2147483647), + 'interval' => array('type' => 'string'), + 'national character' => array('type' => 'string', 'exact' => TRUE), + 'national character varying' => array('type' => 'string'), + 'numeric' => array('type' => 'float', 'exact' => TRUE), + 'real' => array('type' => 'float'), + 'smallint' => array('type' => 'int', 'min' => -32768, 'max' => 32767), + 'time' => array('type' => 'string'), + 'time with time zone' => array('type' => 'string'), + 'timestamp' => array('type' => 'string'), 'timestamp with time zone' => array('type' => 'string'), - 'char' => array('type' => 'string', 'exact' => TRUE), - 'binary' => array('type' => 'string', 'binary' => TRUE, 'exact' => TRUE), - 'varchar' => array('type' => 'string'), - 'varbinary' => array('type' => 'string', 'binary' => TRUE), - 'blob' => array('type' => 'string', 'binary' => TRUE), - 'text' => array('type' => 'string') -); -// DOUBLE -$config['double'] = $config['double precision'] = $config['decimal'] = $config['real'] = $config['numeric'] = $config['float']; -$config['double unsigned'] = $config['float unsigned']; + // SQL:1999 + //'array','ref','row' + 'binary large object' => array('type' => 'string', 'binary' => TRUE), + 'boolean' => array('type' => 'boolean'), + 'character large object' => array('type' => 'string'), + 'national character large object' => array('type' => 'string'), -// BIT -$config['bit'] = $config['boolean']; + // SQL:2003 + 'bigint' => array('type' => 'int', 'min' => -9223372036854775808, 'max' => 9223372036854775807), -// TIMESTAMP -$config['timestamp'] = $config['timestamp without time zone'] = $config['datetime']; + // SQL:2008 + 'binary' => array('type' => 'string', 'binary' => TRUE, 'exact' => TRUE), + 'binary varying' => array('type' => 'string', 'binary' => TRUE), -// ENUM -$config['enum'] = $config['set'] = $config['varchar']; + // MySQL + 'bigint unsigned' => array('type' => 'int', 'min' => 0, 'max' => 18446744073709551615), + 'decimal unsigned' => array('type' => 'float', 'exact' => TRUE, 'min' => 0.0), + 'double unsigned' => array('type' => 'float', 'min' => 0.0), + 'float unsigned' => array('type' => 'float', 'min' => 0.0), + 'integer unsigned' => array('type' => 'int', 'min' => 0, 'max' => 4294967295), + 'mediumint' => array('type' => 'int', 'min' => -8388608, 'max' => 8388607), + 'mediumint unsigned' => array('type' => 'int', 'min' => 0, 'max' => 16777215), + 'real unsigned' => array('type' => 'float', 'min' => 0.0), + 'smallint unsigned' => array('type' => 'int', 'min' => 0, 'max' => 65535), + 'text' => array('type' => 'string'), + 'tinyint' => array('type' => 'int', 'min' => -128, 'max' => 127), + 'tinyint unsigned' => array('type' => 'int', 'min' => 0, 'max' => 255), + 'year' => array('type' => 'string'), +); -// TEXT -$config['tinytext'] = $config['mediumtext'] = $config['longtext'] = $config['text']; +// SQL-92 +$config['char'] = $config['character']; +$config['char varying'] = $config['character varying']; +$config['dec'] = $config['decimal']; +$config['int'] = $config['integer']; +$config['nchar'] = $config['national char'] = $config['national character']; +$config['nchar varying'] = $config['national char varying'] = $config['national character varying']; +$config['varchar'] = $config['character varying']; -// BLOB -$config['tsvector'] = $config['tinyblob'] = $config['mediumblob'] = $config['longblob'] = $config['clob'] = $config['bytea'] = $config['blob']; +// SQL:1999 +$config['blob'] = $config['binary large object']; +$config['clob'] = $config['char large object'] = $config['character large object']; +$config['nclob'] = $config['nchar large object'] = $config['national character large object']; +$config['time without time zone'] = $config['time']; +$config['timestamp without time zone'] = $config['timestamp']; -// CHARACTER -$config['character'] = $config['char']; -$config['character varying'] = $config['varchar']; +// SQL:2008 +$config['varbinary'] = $config['binary varying']; -// TIME -$config['time without time zone'] = $config['time']; +// MySQL +$config['bool'] = $config['boolean']; +$config['datetime'] = $config['timestamp']; +$config['double'] = $config['double precision']; +$config['double precision unsigned'] = $config['double unsigned']; +$config['enum'] = $config['set'] = $config['character varying']; +$config['fixed'] = $config['decimal']; +$config['fixed unsigned'] = $config['decimal unsigned']; +$config['int unsigned'] = $config['integer unsigned']; +$config['longblob'] = $config['mediumblob'] = $config['tinyblob'] = $config['binary large object']; +$config['longtext'] = $config['mediumtext'] = $config['tinytext'] = $config['text']; +$config['numeric unsigned'] = $config['decimal unsigned']; +$config['nvarchar'] = $config['national varchar'] = $config['national character varying']; diff --git a/system/config/view.php b/system/config/view.php index 6bed22e0..a77af878 100644 --- a/system/config/view.php +++ b/system/config/view.php @@ -3,6 +3,7 @@ * @package Core * * Allowed non-php view types. Most file extensions are supported. + * Do not forget to add a valid MIME type in mimes.php */ $config['allowed_filetypes'] = array ( -- cgit v1.2.3