Permalink
Browse files

Merge branch 'develop' of github.com:/EllisLab/CodeIgniter into load_…

…config_units
  • Loading branch information...
2 parents eeb6a48 + e8bc5f4 commit 2716398bd2f2ae36d7420c591fc759e0951ba0e2 @dchill42 committed Oct 10, 2012
Showing with 1,856 additions and 896 deletions.
  1. +2 −1 .gitignore
  2. +5 −0 .travis.yml
  3. +23 −6 application/config/autoload.php
  4. +15 −6 application/config/config.php
  5. +8 −8 application/config/constants.php
  6. +2 −0 application/config/database.php
  7. +12 −12 application/config/foreign_chars.php
  8. +3 −1 application/config/mimes.php
  9. +5 −3 application/views/errors/error_404.php
  10. +5 −3 application/views/errors/error_db.php
  11. +5 −3 application/views/errors/error_general.php
  12. +7 −6 application/views/welcome_message.php
  13. +4 −1 composer.json
  14. +92 −0 contributing.md
  15. +0 −160 readme.rst
  16. +7 −12 system/core/Common.php
  17. +1 −1 system/core/Config.php
  18. +97 −46 system/core/Input.php
  19. +3 −3 system/core/Loader.php
  20. +2 −2 system/core/Output.php
  21. +14 −3 system/database/DB_driver.php
  22. +9 −10 system/database/DB_query_builder.php
  23. +22 −4 system/database/drivers/cubrid/cubrid_driver.php
  24. +0 −20 system/database/drivers/ibase/ibase_driver.php
  25. +0 −20 system/database/drivers/mssql/mssql_driver.php
  26. +36 −6 system/database/drivers/mysql/mysql_driver.php
  27. +50 −4 system/database/drivers/mysqli/mysqli_driver.php
  28. +0 −20 system/database/drivers/oci8/oci8_driver.php
  29. +0 −18 system/database/drivers/odbc/odbc_driver.php
  30. +0 −4 system/database/drivers/pdo/pdo_driver.php
  31. +0 −16 system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
  32. +20 −4 system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
  33. +0 −16 system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
  34. +0 −16 system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php
  35. +0 −16 system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
  36. +0 −16 system/database/drivers/pdo/subdrivers/pdo_informix_driver.php
  37. +20 −4 system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
  38. +0 −16 system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
  39. +0 −17 system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php
  40. +0 −16 system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
  41. +0 −16 system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
  42. +0 −20 system/database/drivers/postgre/postgre_driver.php
  43. +0 −4 system/database/drivers/sqlite/sqlite_driver.php
  44. +6 −19 system/database/drivers/sqlite3/sqlite3_driver.php
  45. +0 −20 system/database/drivers/sqlsrv/sqlsrv_driver.php
  46. +1 −2 system/helpers/captcha_helper.php
  47. +131 −0 system/helpers/date_helper.php
  48. +1 −1 system/helpers/directory_helper.php
  49. +2 −1 system/helpers/text_helper.php
  50. +1 −1 system/helpers/url_helper.php
  51. +14 −14 system/language/english/date_lang.php
  52. +2 −2 system/language/english/form_validation_lang.php
  53. +2 −2 system/libraries/Driver.php
  54. +22 −14 system/libraries/Email.php
  55. +2 −2 system/libraries/Encrypt.php
  56. +7 −0 system/libraries/Image_lib.php
  57. +10 −9 system/libraries/Pagination.php
  58. +133 −49 system/libraries/Session/Session.php
  59. +82 −67 system/libraries/Session/drivers/Session_cookie.php
  60. +47 −27 system/libraries/Session/drivers/Session_native.php
  61. +5 −0 system/libraries/Unit_test.php
  62. +5 −5 system/libraries/Xmlrpc.php
  63. +1 −0 tests/Bootstrap.php
  64. +2 −2 tests/codeigniter/database/query_builder/escape_test.php
  65. +23 −0 tests/codeigniter/helpers/date_helper_test.php
  66. +3 −1 tests/codeigniter/helpers/directory_helper_test.php
  67. +204 −0 tests/codeigniter/libraries/Calendar_test.php
  68. +6 −11 tests/codeigniter/libraries/Session_test.php
  69. +270 −0 tests/codeigniter/libraries/Upload_test.php
  70. +10 −0 tests/mocks/core/input.php
  71. +15 −0 tests/mocks/core/lang.php
  72. +25 −0 tests/mocks/libraries/calendar.php
  73. +3 −0 tests/mocks/libraries/upload.php
  74. BIN tests/mocks/uploads/ci_logo.gif
  75. +1 −1 tests/travis/mysql.phpunit.xml
  76. +1 −1 tests/travis/pdo/mysql.phpunit.xml
  77. +1 −1 tests/travis/pdo/pgsql.phpunit.xml
  78. +1 −1 tests/travis/pdo/sqlite.phpunit.xml
  79. +1 −1 tests/travis/pgsql.phpunit.xml
  80. +1 −1 tests/travis/sqlite.phpunit.xml
  81. +102 −46 user_guide_src/source/changelog.rst
  82. +6 −1 user_guide_src/source/database/configuration.rst
  83. +1 −1 user_guide_src/source/general/cli.rst
  84. +1 −1 user_guide_src/source/general/reserved_names.rst
  85. +1 −1 user_guide_src/source/helpers/captcha_helper.rst
  86. +24 −0 user_guide_src/source/helpers/date_helper.rst
  87. +5 −1 user_guide_src/source/helpers/url_helper.rst
  88. BIN user_guide_src/source/images/codeigniter_1.7.1_library_reference.png
  89. +21 −5 user_guide_src/source/installation/upgrade_300.rst
  90. +7 −0 user_guide_src/source/libraries/email.rst
  91. +1 −0 user_guide_src/source/libraries/file_uploading.rst
  92. +15 −4 user_guide_src/source/libraries/form_validation.rst
  93. +11 −12 user_guide_src/source/libraries/image_lib.rst
  94. +1 −1 user_guide_src/source/libraries/loader.rst
  95. +133 −1 user_guide_src/source/libraries/migration.rst
  96. +3 −0 user_guide_src/source/libraries/output.rst
  97. +2 −2 user_guide_src/source/libraries/pagination.rst
  98. +1 −1 user_guide_src/source/libraries/trackback.rst
  99. +11 −4 user_guide_src/source/overview/cheatsheets.rst
View
@@ -11,4 +11,5 @@ application/logs/*
user_guide_src/build/*
user_guide_src/cilexer/build/*
user_guide_src/cilexer/dist/*
-user_guide_src/cilexer/pycilexer.egg-info/*
+user_guide_src/cilexer/pycilexer.egg-info/*
+/vendor/
View
@@ -3,6 +3,11 @@ language: php
php:
- 5.3
- 5.4
+
+services:
+ - mysql
+ - postgresql
+ - sqlite
env:
- DB=mysql
@@ -46,10 +46,11 @@
|
| 1. Packages
| 2. Libraries
-| 3. Helper files
-| 4. Custom config files
-| 5. Language files
-| 6. Models
+| 3. Drivers
+| 4. Helper files
+| 5. Custom config files
+| 6. Language files
+| 7. Models
|
*/
@@ -75,14 +76,30 @@
|
| Prototype:
|
-| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
+| $autoload['libraries'] = array('database', 'email', 'xmlrpc');
*/
$autoload['libraries'] = array();
/*
| -------------------------------------------------------------------
+| Auto-load Drivers
+| -------------------------------------------------------------------
+| These classes are located in the system/libraries folder or in your
+| application/libraries folder within their own subdirectory. They
+| offer multiple interchangeable driver options.
+|
+| Prototype:
+|
+| $autoload['drivers'] = array('session', 'cache');
+*/
+
+$autoload['drivers'] = array();
+
+
+/*
+| -------------------------------------------------------------------
| Auto-load Helper Files
| -------------------------------------------------------------------
| Prototype:
@@ -139,4 +156,4 @@
/* End of file autoload.php */
-/* Location: ./application/config/autoload.php */
+/* Location: ./application/config/autoload.php */
@@ -265,6 +265,9 @@
| Session Variables
|--------------------------------------------------------------------------
|
+| 'sess_driver' = the driver to load: cookie (Classic), native (PHP sessions),
+| or your custom driver name
+| 'sess_valid_drivers' = additional valid drivers which may be loaded
| 'sess_cookie_name' = the name you want for the cookie
| 'sess_expiration' = the number of SECONDS you want the session to last.
| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
@@ -278,6 +281,8 @@
| 'sess_time_to_update' = how many seconds between CI refreshing Session Information
|
*/
+$config['sess_driver'] = 'cookie';
+$config['sess_valid_drivers'] = array();
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = FALSE;
@@ -401,15 +406,19 @@
| Reverse Proxy IPs
|--------------------------------------------------------------------------
|
-| If your server is behind a reverse proxy, you must whitelist the proxy IP
-| addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
-| header in order to properly identify the visitor's IP address.
-| Comma-delimited, e.g. '10.0.1.200,10.0.1.201'
+| If your server is behind a reverse proxy, you must whitelist the proxy
+| IP addresses from which CodeIgniter should trust headers such as
+| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
+| the visitor's IP address.
|
+| You can use both an array or a comma-separated list of proxy addresses,
+| as well as specifying whole subnets. Here are a few examples:
+|
+| Comma-separated: '10.0.1.200,192.168.5.0/24'
+| Array: array('10.0.1.200', '192.168.5.0/24')
*/
$config['proxy_ips'] = '';
-
/* End of file config.php */
-/* Location: ./application/config/config.php */
+/* Location: ./application/config/config.php */
@@ -52,14 +52,14 @@
|
*/
-define('FOPEN_READ', 'rb');
-define('FOPEN_READ_WRITE', 'r+b');
-define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
-define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
-define('FOPEN_WRITE_CREATE', 'ab');
-define('FOPEN_READ_WRITE_CREATE', 'a+b');
-define('FOPEN_WRITE_CREATE_STRICT', 'xb');
-define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
+define('FOPEN_READ', 'rb');
+define('FOPEN_READ_WRITE', 'r+b');
+define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
+define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
+define('FOPEN_WRITE_CREATE', 'ab');
+define('FOPEN_READ_WRITE_CREATE', 'a+b');
+define('FOPEN_WRITE_CREATE_STRICT', 'xb');
+define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
/*
|--------------------------------------------------------------------------
@@ -63,6 +63,7 @@
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
| ['autoinit'] Whether or not to automatically initialize the database.
+| ['compress'] Whether or not to use client compression (only MySQL and MySQLi)
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
| - good for ensuring strict SQL while developing
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
@@ -93,6 +94,7 @@
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'autoinit' => TRUE,
+ 'compress' => TRUE,
'stricton' => FALSE,
'failover' => array()
);
@@ -40,20 +40,20 @@
'/Ä/' => 'Ae',
'/Ü/' => 'Ue',
'/Ö/' => 'Oe',
- '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά/' => 'A',
- '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά/' => 'a',
+ '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ/' => 'A',
+ '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ/' => 'a',
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
'/ç|ć|ĉ|ċ|č/' => 'c',
'/Ð|Ď|Đ|Δ/' => 'Dj',
'/ð|ď|đ|δ/' => 'dj',
- '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ/' => 'E',
- '/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε/' => 'e',
+ '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ/' => 'E',
+ '/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ/' => 'e',
'/Ĝ|Ğ|Ġ|Ģ|Γ/' => 'G',
'/ĝ|ğ|ġ|ģ|γ/' => 'g',
'/Ĥ|Ħ/' => 'H',
'/ĥ|ħ/' => 'h',
- '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ/' => 'I',
- '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ/' => 'i',
+ '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị/' => 'I',
+ '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị/' => 'i',
'/Ĵ/' => 'J',
'/ĵ/' => 'j',
'/Ķ|Κ/' => 'K',
@@ -62,18 +62,18 @@
'/ĺ|ļ|ľ|ŀ|ł|λ/' => 'l',
'/Ñ|Ń|Ņ|Ň|Ν/' => 'N',
'/ñ|ń|ņ|ň|ʼn|ν/' => 'n',
- '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ/' => 'O',
- '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ/' => 'o',
+ '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ/' => 'O',
+ '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ/' => 'o',
'/Ŕ|Ŗ|Ř|Ρ/' => 'R',
'/ŕ|ŗ|ř|ρ/' => 'r',
'/Ś|Ŝ|Ş|Ș|Š|Σ/' => 'S',
'/ś|ŝ|ş|ș|š|ſ|σ|ς/' => 's',
'/Ț|Ţ|Ť|Ŧ|τ/' => 'T',
'/ț|ţ|ť|ŧ/' => 't',
- '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U',
- '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ/' => 'u',
- '/Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ/' => 'Y',
- '/ý|ÿ|ŷ/' => 'y',
+ '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự/' => 'U',
+ '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự/' => 'u',
+ '/Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ/' => 'Y',
+ '/ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ/' => 'y',
'/Ŵ/' => 'W',
'/ŵ/' => 'w',
'/Ź|Ż|Ž|Ζ/' => 'Z',
@@ -49,7 +49,7 @@
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
- 'pdf' => array('application/pdf', 'application/x-download'),
+ 'pdf' => array('application/pdf', 'application/x-download', 'binary/octet-stream'),
'ai' => 'application/postscript',
'eps' => 'application/postscript',
'ps' => 'application/postscript',
@@ -124,6 +124,8 @@
'movie' => 'video/x-sgi-movie',
'doc' => array('application/msword', 'application/vnd.ms-office'),
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
+ 'dot' => array('application/msword', 'application/vnd.ms-office'),
+ 'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword'),
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
@@ -31,9 +31,9 @@
<title>404 Page Not Found</title>
<style type="text/css">
-::selection{ background-color: #E13300; color: white; }
-::moz-selection{ background-color: #E13300; color: white; }
-::webkit-selection{ background-color: #E13300; color: white; }
+::selection { background-color: #E13300; color: white; }
+::-moz-selection { background-color: #E13300; color: white; }
+::-webkit-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
@@ -73,6 +73,8 @@
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
+ -moz-box-shadow: 0 0 8px #D0D0D0;
+ -webkit-box-shadow: 0 0 8px #D0D0D0;
}
p {
@@ -31,9 +31,9 @@
<title>Database Error</title>
<style type="text/css">
-::selection{ background-color: #E13300; color: white; }
-::moz-selection{ background-color: #E13300; color: white; }
-::webkit-selection{ background-color: #E13300; color: white; }
+::selection { background-color: #E13300; color: white; }
+::-moz-selection { background-color: #E13300; color: white; }
+::-webkit-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
@@ -73,6 +73,8 @@
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
+ -moz-box-shadow: 0 0 8px #D0D0D0;
+ -webkit-box-shadow: 0 0 8px #D0D0D0;
}
p {
@@ -31,9 +31,9 @@
<title>Error</title>
<style type="text/css">
-::selection{ background-color: #E13300; color: white; }
-::moz-selection{ background-color: #E13300; color: white; }
-::webkit-selection{ background-color: #E13300; color: white; }
+::selection { background-color: #E13300; color: white; }
+::-moz-selection { background-color: #E13300; color: white; }
+::-webkit-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
@@ -73,6 +73,8 @@
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
+ -moz-box-shadow: 0 0 8px #D0D0D0;
+ -webkit-box-shadow: 0 0 8px #D0D0D0;
}
p {
@@ -32,9 +32,9 @@
<style type="text/css">
- ::selection{ background-color: #E13300; color: white; }
- ::moz-selection{ background-color: #E13300; color: white; }
- ::webkit-selection{ background-color: #E13300; color: white; }
+ ::selection { background-color: #E13300; color: white; }
+ ::-moz-selection { background-color: #E13300; color: white; }
+ ::-webkit-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
@@ -70,11 +70,11 @@
padding: 12px 10px 12px 10px;
}
- #body{
+ #body {
margin: 0 15px 0 15px;
}
- p.footer{
+ p.footer {
text-align: right;
font-size: 11px;
border-top: 1px solid #D0D0D0;
@@ -83,9 +83,10 @@
margin: 20px 0 0 0;
}
- #container{
+ #container {
margin: 10px;
border: 1px solid #D0D0D0;
+ -moz-box-shadow: 0 0 8px #D0D0D0;
-webkit-box-shadow: 0 0 8px #D0D0D0;
}
</style>
View
@@ -1,5 +1,8 @@
{
"require": {
"mikey179/vfsStream": "*"
- }
+ },
+ "require-dev": {
+ "EHER/PHPUnit": "*"
+ }
}
Oops, something went wrong.

0 comments on commit 2716398

Please sign in to comment.