Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter int…

…o develop
  • Loading branch information...
commit 09ac64999dc43867f2f78a886fa317baf134707c 2 parents bf10b5d + 40f1404
@dixy authored
Showing with 10,366 additions and 6,965 deletions.
  1. +10 −9 .travis.yml
  2. +20 −7 application/config/config.php
  3. +4 −4 application/config/database.php
  4. +34 −29 application/config/foreign_chars.php
  5. +1 −1  application/config/migration.php
  6. +132 −130 application/config/mimes.php
  7. +1 −1  application/config/routes.php
  8. +78 −74 application/config/user_agents.php
  9. +1 −1  application/{ → views}/errors/error_404.php
  10. +1 −1  application/{ → views}/errors/error_db.php
  11. +1 −1  application/{ → views}/errors/error_general.php
  12. +4 −1 application/{ → views}/errors/error_php.php
  13. 0  application/{ → views}/errors/index.html
  14. +1 −1  application/views/welcome_message.php
  15. +5 −0 composer.json
  16. +37 −20 index.php
  17. +21 −0 phpdoc.dist.xml
  18. +0 −2  readme.rst
  19. +7 −12 system/core/Benchmark.php
  20. +21 −37 system/core/CodeIgniter.php
  21. +228 −203 system/core/Common.php
  22. +42 −43 system/core/Config.php
  23. +17 −3 system/core/Controller.php
  24. +26 −27 system/core/Exceptions.php
  25. +9 −7 system/core/Hooks.php
  26. +157 −121 system/core/Input.php
  27. +27 −21 system/core/Lang.php
  28. +49 −43 system/core/Loader.php
  29. +7 −3 system/core/Model.php
  30. +218 −39 system/core/Output.php
  31. +16 −14 system/core/Router.php
  32. +70 −61 system/core/Security.php
  33. +72 −63 system/core/URI.php
  34. +5 −5 system/core/Utf8.php
  35. +20 −13 system/database/DB.php
  36. +5 −5 system/database/DB_cache.php
  37. +175 −78 system/database/DB_driver.php
  38. +62 −14 system/database/DB_forge.php
  39. +448 −366 system/database/{DB_active_rec.php → DB_query_builder.php}
  40. +28 −14 system/database/DB_result.php
  41. +10 −11 system/database/DB_utility.php
  42. +25 −125 system/database/drivers/cubrid/cubrid_driver.php
  43. +38 −53 system/database/drivers/cubrid/cubrid_forge.php
  44. +14 −48 system/database/drivers/cubrid/cubrid_result.php
  45. +4 −4 system/database/drivers/cubrid/cubrid_utility.php
  46. +12 −51 system/database/drivers/interbase/interbase_driver.php
  47. +30 −60 system/database/drivers/interbase/interbase_forge.php
  48. +1 −1  system/database/drivers/interbase/interbase_utility.php
  49. +102 −107 system/database/drivers/mssql/mssql_driver.php
  50. +25 −63 system/database/drivers/mssql/mssql_forge.php
  51. +4 −4 system/database/drivers/mssql/mssql_result.php
  52. +1 −1  system/database/drivers/mssql/mssql_utility.php
  53. +22 −80 system/database/drivers/mysql/mysql_driver.php
  54. +29 −15 system/database/drivers/mysql/mysql_forge.php
  55. +6 −6 system/database/drivers/mysql/mysql_utility.php
  56. +18 −86 system/database/drivers/mysqli/mysqli_driver.php
  57. +29 −16 system/database/drivers/mysqli/mysqli_forge.php
  58. +117 −2 system/database/drivers/mysqli/mysqli_utility.php
  59. +13 −40 system/database/drivers/oci8/oci8_driver.php
  60. +23 −18 system/database/drivers/oci8/oci8_forge.php
  61. +8 −8 system/database/drivers/oci8/oci8_result.php
  62. +13 −83 system/database/drivers/odbc/odbc_driver.php
  63. +21 −59 system/database/drivers/odbc/odbc_forge.php
  64. +26 −33 system/database/drivers/odbc/odbc_result.php
  65. +17 −90 system/database/drivers/pdo/pdo_driver.php
  66. +23 −58 system/database/drivers/pdo/pdo_forge.php
  67. +7 −12 system/database/drivers/pdo/pdo_result.php
  68. +173 −71 system/database/drivers/postgre/postgre_driver.php
  69. +31 −62 system/database/drivers/postgre/postgre_forge.php
  70. +16 −105 system/database/drivers/sqlite/sqlite_driver.php
  71. +35 −64 system/database/drivers/sqlite/sqlite_forge.php
  72. +4 −67 system/database/drivers/sqlite3/sqlite3_driver.php
  73. +35 −19 system/database/drivers/sqlite3/sqlite3_forge.php
  74. +8 −8 system/database/drivers/sqlite3/sqlite3_result.php
  75. +64 −73 system/database/drivers/sqlsrv/sqlsrv_driver.php
  76. +27 −65 system/database/drivers/sqlsrv/sqlsrv_forge.php
  77. +5 −5 system/database/drivers/sqlsrv/sqlsrv_result.php
  78. +2 −2 system/database/drivers/sqlsrv/sqlsrv_utility.php
  79. +28 −28 system/helpers/array_helper.php
  80. +12 −12 system/helpers/captcha_helper.php
  81. +32 −32 system/helpers/cookie_helper.php
  82. +237 −263 system/helpers/date_helper.php
  83. +13 −12 system/helpers/directory_helper.php
  84. +15 −19 system/helpers/download_helper.php
  85. +14 −14 system/helpers/email_helper.php
  86. +114 −148 system/helpers/file_helper.php
  87. +282 −272 system/helpers/form_helper.php
  88. +101 −100 system/helpers/html_helper.php
  89. +50 −48 system/helpers/inflector_helper.php
  90. +10 −10 system/helpers/language_helper.php
  91. +7 −6 system/helpers/number_helper.php
  92. +8 −8 system/helpers/path_helper.php
  93. +37 −32 system/helpers/security_helper.php
  94. +82 −136 system/helpers/smiley_helper.php
  95. +138 −155 system/helpers/string_helper.php
  96. +168 −160 system/helpers/text_helper.php
  97. +23 −24 system/helpers/typography_helper.php
  98. +161 −152 system/helpers/url_helper.php
  99. +9 −9 system/helpers/xml_helper.php
  100. +2 −2 system/language/english/calendar_lang.php
  101. +2 −2 system/language/english/date_lang.php
  102. +2 −2 system/language/english/db_lang.php
  103. +2 −2 system/language/english/email_lang.php
  104. +2 −2 system/language/english/form_validation_lang.php
  105. +2 −2 system/language/english/ftp_lang.php
  106. +2 −2 system/language/english/imglib_lang.php
  107. +3 −3 system/language/english/migration_lang.php
  108. +7 −7 system/language/english/number_lang.php
  109. +2 −2 system/language/english/profiler_lang.php
  110. +2 −2 system/language/english/unit_test_lang.php
  111. +2 −2 system/language/english/upload_lang.php
  112. +51 −32 system/libraries/Cache/Cache.php
  113. +1 −1  system/libraries/Cache/drivers/Cache_apc.php
  114. +1 −1  system/libraries/Cache/drivers/Cache_dummy.php
  115. +21 −11 system/libraries/Cache/drivers/Cache_file.php
  116. +20 −10 system/libraries/Cache/drivers/Cache_memcached.php
  117. +236 −0 system/libraries/Cache/drivers/Cache_redis.php
  118. +1 −1  system/libraries/Cache/drivers/Cache_wincache.php
  119. +88 −49 system/libraries/Calendar.php
  120. +49 −20 system/libraries/Cart.php
  121. +43 −4 system/libraries/Driver.php
  122. +159 −241 system/libraries/Email.php
  123. +42 −7 system/libraries/Encrypt.php
  124. +146 −54 system/libraries/Form_validation.php
  125. +15 −17 system/libraries/Ftp.php
  126. +424 −141 system/libraries/Image_lib.php
  127. +4 −4 system/libraries/Javascript.php
  128. +50 −4 system/libraries/Log.php
  129. +43 −3 system/libraries/Migration.php
  130. +109 −29 system/libraries/Pagination.php
  131. +25 −19 system/libraries/Parser.php
  132. +44 −15 system/libraries/Profiler.php
  133. +159 −20 system/libraries/Session.php
  134. +55 −7 system/libraries/Table.php
  135. +6 −6 system/libraries/Trackback.php
  136. +34 −10 system/libraries/Typography.php
  137. +13 −17 system/libraries/Unit_test.php
  138. +47 −48 system/libraries/Upload.php
  139. +106 −16 system/libraries/User_agent.php
  140. +56 −56 system/libraries/Xmlrpc.php
  141. +46 −18 system/libraries/Xmlrpcs.php
  142. +41 −1 system/libraries/Zip.php
  143. +47 −49 system/libraries/javascript/Jquery.php
  144. +22 −5 tests/Bootstrap.php
  145. +5 −11 tests/README.md
  146. +7 −7 tests/codeigniter/Setup_test.php
  147. +43 −0 tests/codeigniter/core/Benchmark_test.php
  148. +3 −3 tests/codeigniter/core/Common_test.php
  149. +19 −19 tests/codeigniter/core/Config_test.php
  150. +161 −0 tests/codeigniter/core/Input_test.php
  151. +9 −8 tests/codeigniter/core/Lang_test.php
  152. +59 −73 tests/codeigniter/core/Loader_test.php
  153. +106 −0 tests/codeigniter/core/Security_test.php
  154. +99 −131 tests/codeigniter/core/URI_test.php
  155. +34 −0 tests/codeigniter/database/DB_driver_test.php
  156. +1 −3 tests/codeigniter/database/DB_test.php
  157. 0  tests/codeigniter/database/query_builder/.gitkeep
  158. +38 −0 tests/codeigniter/database/query_builder/count_test.php
  159. +64 −0 tests/codeigniter/database/query_builder/delete_test.php
  160. +33 −0 tests/codeigniter/database/query_builder/distinct_test.php
  161. +39 −0 tests/codeigniter/database/query_builder/empty_test.php
  162. +68 −0 tests/codeigniter/database/query_builder/escape_test.php
  163. +49 −0 tests/codeigniter/database/query_builder/from_test.php
  164. +53 −0 tests/codeigniter/database/query_builder/get_test.php
  165. +51 −0 tests/codeigniter/database/query_builder/group_test.php
  166. +66 −0 tests/codeigniter/database/query_builder/insert_test.php
  167. +38 −0 tests/codeigniter/database/query_builder/join_test.php
  168. +90 −0 tests/codeigniter/database/query_builder/like_test.php
  169. +48 −0 tests/codeigniter/database/query_builder/limit_test.php
  170. +55 −0 tests/codeigniter/database/query_builder/order_test.php
  171. +95 −0 tests/codeigniter/database/query_builder/select_test.php
  172. +56 −0 tests/codeigniter/database/query_builder/truncate_test.php
  173. +57 −0 tests/codeigniter/database/query_builder/update_test.php
  174. +126 −0 tests/codeigniter/database/query_builder/where_test.php
  175. +11 −11 tests/codeigniter/helpers/array_helper_test.php
  176. +79 −72 tests/codeigniter/helpers/date_helper_test.php
  177. +28 −19 tests/codeigniter/helpers/directory_helper_test.php
  178. +1 −1  tests/codeigniter/helpers/email_helper_test.php
  179. +70 −73 tests/codeigniter/helpers/file_helper_test.php
  180. +55 −57 tests/codeigniter/helpers/form_helper_test.php
  181. +12 −16 tests/codeigniter/helpers/html_helper_test.php
  182. +16 −15 tests/codeigniter/helpers/inflector_helper_test.php
  183. +18 −19 tests/codeigniter/helpers/number_helper_test.php
  184. +2 −3 tests/codeigniter/helpers/path_helper_test.php
  185. +5 −4 tests/codeigniter/helpers/string_helper_test.php
  186. +44 −32 tests/codeigniter/helpers/text_helper_test.php
  187. +1 −0  tests/codeigniter/helpers/url_helper_test.php
  188. +2 −2 tests/codeigniter/helpers/xml_helper_test.php
  189. +72 −0 tests/codeigniter/libraries/Encrypt_test.php
  190. +29 −32 tests/codeigniter/libraries/Parser_test.php
  191. +85 −84 tests/codeigniter/libraries/Table_test.php
  192. +19 −21 tests/codeigniter/libraries/Typography_test.php
  193. +2 −4 tests/codeigniter/libraries/Useragent_test.php
  194. +19 −9 tests/mocks/autoloader.php
  195. +41 −43 tests/mocks/ci_testcase.php
  196. +3 −0  tests/mocks/core/benchmark.php
  197. +104 −67 tests/mocks/core/common.php
  198. +31 −0 tests/mocks/core/input.php
  199. +4 −3 tests/mocks/core/loader.php
  200. +30 −0 tests/mocks/core/security.php
  201. +5 −4 tests/mocks/core/uri.php
  202. +26 −0 tests/mocks/core/utf8.php
  203. BIN  tests/mocks/database/ci_test.sqlite
  204. +5 −5 tests/mocks/database/config/mysql.php
  205. +37 −0 tests/mocks/database/config/pdo/mysql.php
  206. +37 −0 tests/mocks/database/config/pdo/pgsql.php
  207. +37 −0 tests/mocks/database/config/pdo/sqlite.php
  208. +5 −5 tests/mocks/database/config/pgsql.php
  209. +7 −8 tests/mocks/database/config/sqlite.php
  210. +17 −18 tests/mocks/database/db.php
  211. +39 −0 tests/mocks/database/db/driver.php
  212. +3 −0  tests/mocks/database/db/querybuilder.php
  213. +17 −0 tests/mocks/database/drivers/mysql.php
  214. +16 −0 tests/mocks/database/drivers/pdo.php
  215. +17 −0 tests/mocks/database/drivers/postgre.php
  216. +17 −0 tests/mocks/database/drivers/sqlite.php
  217. 0  tests/mocks/database/schema/.gitkeep
  218. +147 −0 tests/mocks/database/schema/skeleton.php
  219. +16 −0 tests/mocks/libraries/encrypt.php
  220. +3 −2 tests/mocks/libraries/table.php
  221. +25 −0 tests/phpunit.xml
  222. +6 −18 tests/travis/mysql.phpunit.xml
  223. +25 −0 tests/travis/pdo/mysql.phpunit.xml
  224. +25 −0 tests/travis/pdo/pgsql.phpunit.xml
  225. +25 −0 tests/travis/pdo/sqlite.phpunit.xml
  226. +6 −18 tests/travis/pgsql.phpunit.xml
  227. +6 −18 tests/travis/sqlite.phpunit.xml
  228. +158 −66 user_guide_src/source/changelog.rst
  229. +6 −6 user_guide_src/source/database/configuration.rst
  230. +1 −1  user_guide_src/source/database/connecting.rst
  231. +4 −4 user_guide_src/source/database/examples.rst
  232. +2 −2 user_guide_src/source/database/index.rst
  233. +26 −6 user_guide_src/source/database/queries.rst
  234. +27 −27 user_guide_src/source/database/{active_record.rst → query_builder.rst}
  235. +20 −0 user_guide_src/source/database/results.rst
  236. +5 −0 user_guide_src/source/general/common_functions.rst
  237. +1 −0  user_guide_src/source/general/core_classes.rst
  238. +8 −2 user_guide_src/source/general/environments.rst
  239. +11 −11 user_guide_src/source/general/models.rst
  240. +3 −2 user_guide_src/source/general/requirements.rst
  241. +12 −1 user_guide_src/source/general/styleguide.rst
  242. +127 −82 user_guide_src/source/helpers/date_helper.rst
  243. +1 −1  user_guide_src/source/helpers/directory_helper.rst
  244. +3 −0  user_guide_src/source/helpers/file_helper.rst
  245. +4 −2 user_guide_src/source/helpers/security_helper.rst
  246. +1 −2  user_guide_src/source/helpers/string_helper.rst
  247. +17 −9 user_guide_src/source/helpers/url_helper.rst
  248. +8 −1 user_guide_src/source/installation/upgrade_200.rst
  249. +15 −0 user_guide_src/source/installation/upgrade_300.rst
  250. +2 −1  user_guide_src/source/installation/upgrading.rst
  251. +8 −6 user_guide_src/source/libraries/config.rst
  252. +8 −0 user_guide_src/source/libraries/email.rst
  253. +1 −1  user_guide_src/source/libraries/encryption.rst
  254. +7 −0 user_guide_src/source/libraries/file_uploading.rst
  255. +6 −1 user_guide_src/source/libraries/form_validation.rst
  256. +19 −39 user_guide_src/source/libraries/input.rst
  257. +2 −2 user_guide_src/source/libraries/javascript.rst
  258. +3 −3 user_guide_src/source/libraries/loader.rst
  259. +4 −0 user_guide_src/source/libraries/output.rst
  260. +41 −6 user_guide_src/source/libraries/pagination.rst
  261. +1 −1  user_guide_src/source/libraries/sessions.rst
  262. +2 −2 user_guide_src/source/libraries/uri.rst
  263. +1 −1  user_guide_src/source/overview/features.rst
  264. +1 −1  user_guide_src/source/tutorial/create_news_items.rst
  265. +1 −1  user_guide_src/source/tutorial/index.rst
  266. +2 −2 user_guide_src/source/tutorial/news_section.rst
View
19 .travis.yml
@@ -8,18 +8,19 @@ env:
- DB=mysql
- DB=pgsql
- DB=sqlite
+ - DB=pdo/mysql
+ - DB=pdo/pgsql
+ - DB=pdo/sqlite
before_script:
- - pyrus channel-discover pear.php-tools.net
- - pyrus install http://pear.php-tools.net/get/vfsStream-0.11.2.tgz
- - phpenv rehash
- - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS ci_test;' -U postgres; fi"
- - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database ci_test;' -U postgres; fi"
- - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS ci_test;'; fi"
+ - curl -s http://getcomposer.org/installer | php
+ - php composer.phar install
+ - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS ci_test;' -U postgres; fi"
+ - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'create database ci_test;' -U postgres; fi"
+ - sh -c "if [ '$DB' = 'mysql' ] || [ '$DB' = 'pdo/mysql' ]; then mysql -e 'create database IF NOT EXISTS ci_test;'; fi"
-script: phpunit --configuration tests/travis/$DB.phpunit.xml
+script: phpunit --coverage-text --configuration tests/travis/$DB.phpunit.xml
branches:
only:
- - develop
- - master
+ - develop
View
27 application/config/config.php
@@ -204,7 +204,7 @@
| 4 = All Messages
|
| You can also pass in a array with threshold levels to show individual error types
-|
+|
| array(2) = Debug Messages, without Error Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
@@ -253,7 +253,7 @@
|
| If you use the Encryption class or the Session class you
| MUST set an encryption key. See the user guide for info.
-|
+|
| http://codeigniter.com/user_guide/libraries/encryption.html
| http://codeigniter.com/user_guide/libraries/sessions.html
|
@@ -297,7 +297,7 @@
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
| 'cookie_path' = Typically will be a forward slash
| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists.
-| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
+| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
*/
$config['cookie_prefix'] = "";
@@ -359,13 +359,25 @@
/*
|--------------------------------------------------------------------------
+| Minify
+|--------------------------------------------------------------------------
+|
+| Removes extra characters (usually unnecessary spaces) from your
+| output for faster page load speeds. Makes your outputted HTML source
+| code less readable.
+|
+*/
+$config['minify_output'] = FALSE;
+
+/*
+|--------------------------------------------------------------------------
| Master Time Reference
|--------------------------------------------------------------------------
|
-| Options are 'local' or 'gmt'. This pref tells the system whether to use
-| your server's local time as the master 'now' reference, or convert it to
-| GMT. See the 'date helper' page of the user guide for information
-| regarding date handling.
+| Options are 'local' or any PHP supported timezone. This preference tells
+| the system whether to use your server's local time as the master 'now'
+| reference, or convert it to the configured one timezone. See the 'date
+| helper' page of the user guide for information regarding date handling.
|
*/
$config['time_reference'] = 'local';
@@ -398,5 +410,6 @@
$config['proxy_ips'] = '';
+
/* End of file config.php */
/* Location: ./application/config/config.php */
View
8 application/config/database.php
@@ -46,7 +46,7 @@
| cubrid, interbase, mssql, mysql, mysqli, oci8,
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
| ['dbprefix'] You can add an optional prefix, which will be added
-| to the table name when using the Active Record class
+| to the table name when using the Query Builder class
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
@@ -69,12 +69,12 @@
| The $active_group variable lets you choose which connection group to
| make active. By default there is only one group (the 'default' group).
|
-| The $active_record variables lets you determine whether or not to load
-| the active record class
+| The $query_builder variables lets you determine whether or not to load
+| the query builder class
*/
$active_group = 'default';
-$active_record = TRUE;
+$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
View
63 application/config/foreign_chars.php
@@ -40,50 +40,55 @@
'/Ä/' => 'Ae',
'/Ü/' => 'Ue',
'/Ö/' => 'Oe',
- '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A',
- '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a',
+ '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά/' => 'A',
+ '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά/' => 'a',
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
'/ç|ć|ĉ|ċ|č/' => 'c',
- '/Ð|Ď|Đ/' => 'Dj',
- '/ð|ď|đ/' => 'dj',
- '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E',
- '/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e',
- '/Ĝ|Ğ|Ġ|Ģ/' => 'G',
- '/ĝ|ğ|ġ|ģ/' => 'g',
+ '/Ð|Ď|Đ/' => 'Dj',
+ '/ð|ď|đ/' => 'dj',
+ '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ/' => 'E',
+ '/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε/' => 'e',
+ '/Ĝ|Ğ|Ġ|Ģ/' => 'G',
+ '/ĝ|ğ|ġ|ģ/' => 'g',
'/Ĥ|Ħ/' => 'H',
'/ĥ|ħ/' => 'h',
- '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I',
- '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i',
+ '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ/' => 'I',
+ '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ/' => 'i',
'/Ĵ/' => 'J',
'/ĵ/' => 'j',
- '/Ķ/' => 'K',
- '/ķ/' => 'k',
- '/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L',
- '/ĺ|ļ|ľ|ŀ|ł/' => 'l',
- '/Ñ|Ń|Ņ|Ň/' => 'N',
- '/ñ|ń|ņ|ň|ʼn/' => 'n',
- '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O',
- '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o',
- '/Ŕ|Ŗ|Ř/' => 'R',
- '/ŕ|ŗ|ř/' => 'r',
- '/Ś|Ŝ|Ş|Š/' => 'S',
- '/ś|ŝ|ş|š|ſ/' => 's',
- '/Ţ|Ť|Ŧ/' => 'T',
- '/ţ|ť|ŧ/' => 't',
+ '/Ķ/' => 'K',
+ '/ķ/' => 'k',
+ '/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L',
+ '/ĺ|ļ|ľ|ŀ|ł/' => 'l',
+ '/Ñ|Ń|Ņ|Ň/' => 'N',
+ '/ñ|ń|ņ|ň|ʼn/' => 'n',
+ '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ/' => 'O',
+ '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ/' => 'o',
+ '/Ŕ|Ŗ|Ř/' => 'R',
+ '/ŕ|ŗ|ř/' => 'r',
+ '/Ś|Ŝ|Ş|Ș|Š|Σ/' => 'S',
+ '/ś|ŝ|ş|ș|š|ſ|σ|ς/' => 's',
+ '/Ț|Ţ|Ť|Ŧ/' => 'T',
+ '/ț|ţ|ť|ŧ/' => 't',
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U',
- '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u',
- '/Ý|Ÿ|Ŷ/' => 'Y',
+ '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ/' => 'u',
+ '/Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ/' => 'Y',
'/ý|ÿ|ŷ/' => 'y',
'/Ŵ/' => 'W',
'/ŵ/' => 'w',
- '/Ź|Ż|Ž/' => 'Z',
- '/ź|ż|ž/' => 'z',
+ '/Ź|Ż|Ž/' => 'Z',
+ '/ź|ż|ž/' => 'z',
'/Æ|Ǽ/' => 'AE',
'/ß/'=> 'ss',
'/IJ/' => 'IJ',
'/ij/' => 'ij',
'/Œ/' => 'OE',
- '/ƒ/' => 'f'
+ '/ƒ/' => 'f',
+ '/ξ/' => 'ks',
+ '/π/' => 'p',
+ '/β/' => 'v',
+ '/μ/' => 'm',
+ '/ψ/' => 'ps',
);
/* End of file foreign_chars.php */
View
2  application/config/migration.php
@@ -44,7 +44,7 @@
|
| This is the name of the table that will store the current migrations state.
| When migrations runs it will store in a database table which migration
-| level the system is at. It then compares the migration level in the this
+| level the system is at. It then compares the migration level in this
| table to the $config['migration_version'] if they are not the same it
| will migrate up. This must be set.
|
View
262 application/config/mimes.php
@@ -34,136 +34,138 @@
|
*/
-$mimes = array(
- 'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
- 'cpt' => 'application/mac-compactpro',
- 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
- 'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
- 'dms' => 'application/octet-stream',
- 'lha' => 'application/octet-stream',
- 'lzh' => 'application/octet-stream',
- 'exe' => array('application/octet-stream', 'application/x-msdownload'),
- 'class' => 'application/octet-stream',
- 'psd' => 'application/x-photoshop',
- 'so' => 'application/octet-stream',
- 'sea' => 'application/octet-stream',
- 'dll' => 'application/octet-stream',
- 'oda' => 'application/oda',
- 'pdf' => array('application/pdf', 'application/x-download'),
- 'ai' => 'application/postscript',
- 'eps' => 'application/postscript',
- 'ps' => 'application/postscript',
- 'smi' => 'application/smil',
- 'smil' => 'application/smil',
- 'mif' => 'application/vnd.mif',
- 'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
- 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'),
- 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
- 'wbxml' => 'application/wbxml',
- 'wmlc' => 'application/wmlc',
- 'dcr' => 'application/x-director',
- 'dir' => 'application/x-director',
- 'dxr' => 'application/x-director',
- 'dvi' => 'application/x-dvi',
- 'gtar' => 'application/x-gtar',
- 'gz' => 'application/x-gzip',
- 'gzip' => 'application/x-gzip',
- 'php' => 'application/x-httpd-php',
- 'php4' => 'application/x-httpd-php',
- 'php3' => 'application/x-httpd-php',
- 'phtml' => 'application/x-httpd-php',
- 'phps' => 'application/x-httpd-php-source',
- 'js' => 'application/x-javascript',
- 'swf' => 'application/x-shockwave-flash',
- 'sit' => 'application/x-stuffit',
- 'tar' => 'application/x-tar',
- 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
- 'xhtml' => 'application/xhtml+xml',
- 'xht' => 'application/xhtml+xml',
- 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
- 'mid' => 'audio/midi',
- 'midi' => 'audio/midi',
- 'mpga' => 'audio/mpeg',
- 'mp2' => 'audio/mpeg',
- 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
- 'aif' => array('audio/x-aiff', 'audio/aiff'),
- 'aiff' => array('audio/x-aiff', 'audio/aiff'),
- 'aifc' => 'audio/x-aiff',
- 'ram' => 'audio/x-pn-realaudio',
- 'rm' => 'audio/x-pn-realaudio',
- 'rpm' => 'audio/x-pn-realaudio-plugin',
- 'ra' => 'audio/x-realaudio',
- 'rv' => 'video/vnd.rn-realvideo',
- 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
- 'bmp' => array('image/bmp', 'image/x-windows-bmp'),
- 'gif' => 'image/gif',
- 'jpeg' => array('image/jpeg', 'image/pjpeg'),
- 'jpg' => array('image/jpeg', 'image/pjpeg'),
- 'jpe' => array('image/jpeg', 'image/pjpeg'),
- 'png' => array('image/png', 'image/x-png'),
- 'tiff' => 'image/tiff',
- 'tif' => 'image/tiff',
- 'css' => 'text/css',
- 'html' => 'text/html',
- 'htm' => 'text/html',
- 'shtml' => 'text/html',
- 'txt' => 'text/plain',
- 'text' => 'text/plain',
- 'log' => array('text/plain', 'text/x-log'),
- 'rtx' => 'text/richtext',
- 'rtf' => 'text/rtf',
- 'xml' => array('application/xml', 'text/xml'),
- 'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
- 'mpeg' => 'video/mpeg',
- 'mpg' => 'video/mpeg',
- 'mpe' => 'video/mpeg',
- 'qt' => 'video/quicktime',
- 'mov' => 'video/quicktime',
- 'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
- 'movie' => 'video/x-sgi-movie',
- 'doc' => array('application/msword', 'application/vnd.ms-office'),
- 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'),
- 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'),
- 'word' => array('application/msword', 'application/octet-stream'),
- 'xl' => 'application/excel',
- 'eml' => 'message/rfc822',
- 'json' => array('application/json', 'text/json'),
- 'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
- 'p10' => array('application/x-pkcs10', 'application/pkcs10'),
- 'p12' => 'application/x-pkcs12',
- 'p7a' => 'application/x-pkcs7-signature',
- 'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
- 'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
- 'p7r' => 'application/x-pkcs7-certreqresp',
- 'p7s' => 'application/pkcs7-signature',
- 'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
- 'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
- 'der' => 'application/x-x509-ca-cert',
- 'kdb' => 'application/octet-stream',
- 'pgp' => 'application/pgp',
- 'gpg' => 'application/gpg-keys',
- 'sst' => 'application/octet-stream',
- 'csr' => 'application/octet-stream',
- 'rsa' => 'application/x-pkcs7',
- 'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
- '3g2' => 'video/3gpp2',
- '3gp' => 'video/3gp',
- 'mp4' => 'video/mp4',
- 'm4a' => 'audio/x-m4a',
- 'f4v' => 'video/mp4',
- 'aac' => 'audio/x-acc',
- 'm4u' => 'application/vnd.mpegurl',
- 'm3u' => 'text/plain',
- 'xspf' => 'application/xspf+xml',
- 'vlc' => 'application/videolan',
- 'wmv' => 'video/x-ms-wmv',
- 'au' => 'audio/x-au',
- 'ac3' => 'audio/ac3',
- 'flac' => 'audio/x-flac',
- 'ogg' => 'audio/ogg',
- 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
- 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml')
- );
+return array(
+ 'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
+ 'cpt' => 'application/mac-compactpro',
+ 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
+ 'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
+ 'dms' => 'application/octet-stream',
+ 'lha' => 'application/octet-stream',
+ 'lzh' => 'application/octet-stream',
+ 'exe' => array('application/octet-stream', 'application/x-msdownload'),
+ 'class' => 'application/octet-stream',
+ 'psd' => 'application/x-photoshop',
+ 'so' => 'application/octet-stream',
+ 'sea' => 'application/octet-stream',
+ 'dll' => 'application/octet-stream',
+ 'oda' => 'application/oda',
+ 'pdf' => array('application/pdf', 'application/x-download'),
+ 'ai' => 'application/postscript',
+ 'eps' => 'application/postscript',
+ 'ps' => 'application/postscript',
+ 'smi' => 'application/smil',
+ 'smil' => 'application/smil',
+ 'mif' => 'application/vnd.mif',
+ 'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
+ 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'),
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ 'wbxml' => 'application/wbxml',
+ 'wmlc' => 'application/wmlc',
+ 'dcr' => 'application/x-director',
+ 'dir' => 'application/x-director',
+ 'dxr' => 'application/x-director',
+ 'dvi' => 'application/x-dvi',
+ 'gtar' => 'application/x-gtar',
+ 'gz' => 'application/x-gzip',
+ 'gzip' => 'application/x-gzip',
+ 'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
+ 'php4' => 'application/x-httpd-php',
+ 'php3' => 'application/x-httpd-php',
+ 'phtml' => 'application/x-httpd-php',
+ 'phps' => 'application/x-httpd-php-source',
+ 'js' => 'application/x-javascript',
+ 'swf' => 'application/x-shockwave-flash',
+ 'sit' => 'application/x-stuffit',
+ 'tar' => 'application/x-tar',
+ 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
+ 'xhtml' => 'application/xhtml+xml',
+ 'xht' => 'application/xhtml+xml',
+ 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
+ 'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
+ 'mid' => 'audio/midi',
+ 'midi' => 'audio/midi',
+ 'mpga' => 'audio/mpeg',
+ 'mp2' => 'audio/mpeg',
+ 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
+ 'aif' => array('audio/x-aiff', 'audio/aiff'),
+ 'aiff' => array('audio/x-aiff', 'audio/aiff'),
+ 'aifc' => 'audio/x-aiff',
+ 'ram' => 'audio/x-pn-realaudio',
+ 'rm' => 'audio/x-pn-realaudio',
+ 'rpm' => 'audio/x-pn-realaudio-plugin',
+ 'ra' => 'audio/x-realaudio',
+ 'rv' => 'video/vnd.rn-realvideo',
+ 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
+ 'bmp' => array('image/bmp', 'image/x-windows-bmp'),
+ 'gif' => 'image/gif',
+ 'jpeg' => array('image/jpeg', 'image/pjpeg'),
+ 'jpg' => array('image/jpeg', 'image/pjpeg'),
+ 'jpe' => array('image/jpeg', 'image/pjpeg'),
+ 'png' => array('image/png', 'image/x-png'),
+ 'tiff' => 'image/tiff',
+ 'tif' => 'image/tiff',
+ 'css' => 'text/css',
+ 'html' => 'text/html',
+ 'htm' => 'text/html',
+ 'shtml' => 'text/html',
+ 'txt' => 'text/plain',
+ 'text' => 'text/plain',
+ 'log' => array('text/plain', 'text/x-log'),
+ 'rtx' => 'text/richtext',
+ 'rtf' => 'text/rtf',
+ 'xml' => array('application/xml', 'text/xml'),
+ 'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
+ 'mpeg' => 'video/mpeg',
+ 'mpg' => 'video/mpeg',
+ 'mpe' => 'video/mpeg',
+ 'qt' => 'video/quicktime',
+ 'mov' => 'video/quicktime',
+ 'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
+ 'movie' => 'video/x-sgi-movie',
+ 'doc' => array('application/msword', 'application/vnd.ms-office'),
+ 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'),
+ 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'),
+ 'word' => array('application/msword', 'application/octet-stream'),
+ 'xl' => 'application/excel',
+ 'eml' => 'message/rfc822',
+ 'json' => array('application/json', 'text/json'),
+ 'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
+ 'p10' => array('application/x-pkcs10', 'application/pkcs10'),
+ 'p12' => 'application/x-pkcs12',
+ 'p7a' => 'application/x-pkcs7-signature',
+ 'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
+ 'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
+ 'p7r' => 'application/x-pkcs7-certreqresp',
+ 'p7s' => 'application/pkcs7-signature',
+ 'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
+ 'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
+ 'der' => 'application/x-x509-ca-cert',
+ 'kdb' => 'application/octet-stream',
+ 'pgp' => 'application/pgp',
+ 'gpg' => 'application/gpg-keys',
+ 'sst' => 'application/octet-stream',
+ 'csr' => 'application/octet-stream',
+ 'rsa' => 'application/x-pkcs7',
+ 'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
+ '3g2' => 'video/3gpp2',
+ '3gp' => 'video/3gp',
+ 'mp4' => 'video/mp4',
+ 'm4a' => 'audio/x-m4a',
+ 'f4v' => 'video/mp4',
+ 'aac' => 'audio/x-acc',
+ 'm4u' => 'application/vnd.mpegurl',
+ 'm3u' => 'text/plain',
+ 'xspf' => 'application/xspf+xml',
+ 'vlc' => 'application/videolan',
+ 'wmv' => 'video/x-ms-wmv',
+ 'au' => 'audio/x-au',
+ 'ac3' => 'audio/ac3',
+ 'flac' => 'audio/x-flac',
+ 'ogg' => 'audio/ogg',
+ 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
+ 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
+ 'ics' => 'text/calendar'
+);
/* End of file mimes.php */
/* Location: ./application/config/mimes.php */
View
2  application/config/routes.php
@@ -64,7 +64,7 @@
|
*/
-$route['default_controller'] = "welcome";
+$route['default_controller'] = 'welcome';
$route['404_override'] = '';
/* End of file routes.php */
View
152 application/config/user_agents.php
@@ -29,14 +29,13 @@
| -------------------------------------------------------------------
| USER AGENT TYPES
| -------------------------------------------------------------------
-| This file contains four arrays of user agent data. It is used by the
+| This file contains four arrays of user agent data. It is used by the
| User Agent Class to help identify browser, platform, robot, and
-| mobile device data. The array keys are used to identify the device
+| mobile device data. The array keys are used to identify the device
| and the array values are used to set the actual name of the item.
-|
*/
-$platforms = array (
+$platforms = array(
'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003',
@@ -51,6 +50,11 @@
'windows 95' => 'Windows 95',
'win95' => 'Windows 95',
'windows' => 'Unknown Windows OS',
+ 'android' => 'Android',
+ 'blackberry' => 'BlackBerry',
+ 'iphone' => 'iOS',
+ 'ipad' => 'iOS',
+ 'ipod' => 'iOS',
'os x' => 'Mac OS X',
'ppc mac' => 'Power PC Mac',
'freebsd' => 'FreeBSD',
@@ -117,84 +121,84 @@
// 'motorola' => 'Motorola'
// Phones and Manufacturers
- 'motorola' => "Motorola",
- 'nokia' => "Nokia",
- 'palm' => "Palm",
- 'iphone' => "Apple iPhone",
- 'ipad' => "iPad",
- 'ipod' => "Apple iPod Touch",
- 'sony' => "Sony Ericsson",
- 'ericsson' => "Sony Ericsson",
- 'blackberry' => "BlackBerry",
- 'cocoon' => "O2 Cocoon",
- 'blazer' => "Treo",
- 'lg' => "LG",
- 'amoi' => "Amoi",
- 'xda' => "XDA",
- 'mda' => "MDA",
- 'vario' => "Vario",
- 'htc' => "HTC",
- 'samsung' => "Samsung",
- 'sharp' => "Sharp",
- 'sie-' => "Siemens",
- 'alcatel' => "Alcatel",
- 'benq' => "BenQ",
- 'ipaq' => "HP iPaq",
- 'mot-' => "Motorola",
- 'playstation portable' => "PlayStation Portable",
- 'hiptop' => "Danger Hiptop",
- 'nec-' => "NEC",
- 'panasonic' => "Panasonic",
- 'philips' => "Philips",
- 'sagem' => "Sagem",
- 'sanyo' => "Sanyo",
- 'spv' => "SPV",
- 'zte' => "ZTE",
- 'sendo' => "Sendo",
- 'dsi' => "Nintendo DSi",
- 'ds' => "Nintendo DS",
- 'wii' => "Nintendo Wii",
- '3ds' => "Nintendo 3DS",
- 'open web' => "Open Web",
- 'openweb' => "OpenWeb",
+ 'motorola' => 'Motorola',
+ 'nokia' => 'Nokia',
+ 'palm' => 'Palm',
+ 'iphone' => 'Apple iPhone',
+ 'ipad' => 'iPad',
+ 'ipod' => 'Apple iPod Touch',
+ 'sony' => 'Sony Ericsson',
+ 'ericsson' => 'Sony Ericsson',
+ 'blackberry' => 'BlackBerry',
+ 'cocoon' => 'O2 Cocoon',
+ 'blazer' => 'Treo',
+ 'lg' => 'LG',
+ 'amoi' => 'Amoi',
+ 'xda' => 'XDA',
+ 'mda' => 'MDA',
+ 'vario' => 'Vario',
+ 'htc' => 'HTC',
+ 'samsung' => 'Samsung',
+ 'sharp' => 'Sharp',
+ 'sie-' => 'Siemens',
+ 'alcatel' => 'Alcatel',
+ 'benq' => 'BenQ',
+ 'ipaq' => 'HP iPaq',
+ 'mot-' => 'Motorola',
+ 'playstation portable' => 'PlayStation Portable',
+ 'hiptop' => 'Danger Hiptop',
+ 'nec-' => 'NEC',
+ 'panasonic' => 'Panasonic',
+ 'philips' => 'Philips',
+ 'sagem' => 'Sagem',
+ 'sanyo' => 'Sanyo',
+ 'spv' => 'SPV',
+ 'zte' => 'ZTE',
+ 'sendo' => 'Sendo',
+ 'dsi' => 'Nintendo DSi',
+ 'ds' => 'Nintendo DS',
+ 'wii' => 'Nintendo Wii',
+ '3ds' => 'Nintendo 3DS',
+ 'open web' => 'Open Web',
+ 'openweb' => 'OpenWeb',
// Operating Systems
- 'android' => "Android",
- 'symbian' => "Symbian",
- 'SymbianOS' => "SymbianOS",
- 'elaine' => "Palm",
- 'palm' => "Palm",
- 'series60' => "Symbian S60",
- 'windows ce' => "Windows CE",
+ 'android' => 'Android',
+ 'symbian' => 'Symbian',
+ 'SymbianOS' => 'SymbianOS',
+ 'elaine' => 'Palm',
+ 'series60' => 'Symbian S60',
+ 'windows ce' => 'Windows CE',
// Browsers
- 'obigo' => "Obigo",
- 'netfront' => "Netfront Browser",
- 'openwave' => "Openwave Browser",
- 'mobilexplorer' => "Mobile Explorer",
- 'operamini' => "Opera Mini",
- 'opera mini' => "Opera Mini",
- 'opera mobi' => "Opera Mobile",
+ 'obigo' => 'Obigo',
+ 'netfront' => 'Netfront Browser',
+ 'openwave' => 'Openwave Browser',
+ 'mobilexplorer' => 'Mobile Explorer',
+ 'operamini' => 'Opera Mini',
+ 'opera mini' => 'Opera Mini',
+ 'opera mobi' => 'Opera Mobile',
+ 'fennec' => 'Firefox Mobile',
// Other
- 'digital paths' => "Digital Paths",
- 'avantgo' => "AvantGo",
- 'xiino' => "Xiino",
- 'novarra' => "Novarra Transcoder",
- 'vodafone' => "Vodafone",
- 'docomo' => "NTT DoCoMo",
- 'o2' => "O2",
+ 'digital paths' => 'Digital Paths',
+ 'avantgo' => 'AvantGo',
+ 'xiino' => 'Xiino',
+ 'novarra' => 'Novarra Transcoder',
+ 'vodafone' => 'Vodafone',
+ 'docomo' => 'NTT DoCoMo',
+ 'o2' => 'O2',
// Fallback
- 'mobile' => "Generic Mobile",
- 'wireless' => "Generic Mobile",
- 'j2me' => "Generic Mobile",
- 'midp' => "Generic Mobile",
- 'cldc' => "Generic Mobile",
- 'up.link' => "Generic Mobile",
- 'up.browser' => "Generic Mobile",
- 'smartphone' => "Generic Mobile",
- 'cellphone' => "Generic Mobile"
+ 'mobile' => 'Generic Mobile',
+ 'wireless' => 'Generic Mobile',
+ 'j2me' => 'Generic Mobile',
+ 'midp' => 'Generic Mobile',
+ 'cldc' => 'Generic Mobile',
+ 'up.link' => 'Generic Mobile',
+ 'up.browser' => 'Generic Mobile',
+ 'smartphone' => 'Generic Mobile',
+ 'cellphone' => 'Generic Mobile'
);
// There are hundreds of bots but these are the most common.
View
2  application/errors/error_404.php → application/views/errors/error_404.php
@@ -72,7 +72,7 @@
#container {
margin: 10px;
border: 1px solid #D0D0D0;
- -webkit-box-shadow: 0 0 8px #D0D0D0;
+ box-shadow: 0 0 8px #D0D0D0;
}
p {
View
2  application/errors/error_db.php → application/views/errors/error_db.php
@@ -72,7 +72,7 @@
#container {
margin: 10px;
border: 1px solid #D0D0D0;
- -webkit-box-shadow: 0 0 8px #D0D0D0;
+ box-shadow: 0 0 8px #D0D0D0;
}
p {
View
2  application/errors/error_general.php → application/views/errors/error_general.php
@@ -72,7 +72,7 @@
#container {
margin: 10px;
border: 1px solid #D0D0D0;
- -webkit-box-shadow: 0 0 8px #D0D0D0;
+ box-shadow: 0 0 8px #D0D0D0;
}
p {
View
5 application/errors/error_php.php → application/views/errors/error_php.php
@@ -40,12 +40,15 @@
<p>Backtrace: </p>
<?php foreach(debug_backtrace() as $error): ?>
- <?php if(isset($error['file']) && ! stristr($error['file'], SYSDIR)): ?>
+ <?php if(isset($error['file']) &&
+ strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
+
<p style="margin-left:10px">
File: <?php echo $error['file'] ?><br />
Line: <?php echo $error['line'] ?><br />
Function: <?php echo $error['function'] ?>
</p>
+
<?php endif ?>
<?php endforeach ?></p>
View
0  application/errors/index.html → application/views/errors/index.html
File renamed without changes
View
2  application/views/welcome_message.php
@@ -107,7 +107,7 @@
<p>If you are exploring CodeIgniter for the very first time, you should start by reading the <a href="user_guide/">User Guide</a>.</p>
</div>
- <p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds. <?php echo (ENVIRONMENT == 'development') ? 'CodeIgniter Version <strong>' . CI_VERSION . '</strong>' : '' ?></p>
+ <p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds. <?php echo (ENVIRONMENT === 'development') ? 'CodeIgniter Version <strong>' . CI_VERSION . '</strong>' : '' ?></p>
</div>
</body>
View
5 composer.json
@@ -0,0 +1,5 @@
+{
+ "require": {
+ "mikey179/vfsStream": "*"
+ }
+}
View
57 index.php
@@ -42,7 +42,7 @@
*
* NOTE: If you change these, also change the error_reporting() code below
*/
- define('ENVIRONMENT', 'development');
+ define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
/*
*---------------------------------------------------------------
* ERROR REPORTING
@@ -174,17 +174,20 @@
chdir(dirname(__FILE__));
}
- if (realpath($system_path) !== FALSE)
+ if (($_temp = realpath($system_path)) !== FALSE)
{
- $system_path = realpath($system_path).'/';
+ $system_path = $_temp.'/';
+ }
+ else
+ {
+ // Ensure there's a trailing slash
+ $system_path = rtrim($system_path, '/').'/';
}
-
- // ensure there's a trailing slash
- $system_path = rtrim($system_path, '/').'/';
// Is the system path correct?
if ( ! is_dir($system_path))
{
+ header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
exit('Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME));
}
@@ -196,10 +199,6 @@
// The name of THIS file
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
- // The PHP file extension
- // this global constant is deprecated.
- define('EXT', '.php');
-
// Path to the system folder
define('BASEPATH', str_replace('\\', '/', $system_path));
@@ -212,13 +211,18 @@
// The path to the "application" folder
if (is_dir($application_folder))
{
+ if (($_temp = realpath($application_folder)) !== FALSE)
+ {
+ $application_folder = $_temp;
+ }
+
define('APPPATH', $application_folder.'/');
}
else
{
if ( ! is_dir(BASEPATH.$application_folder.'/'))
{
- header('HTTP/1.1 503 Service Unavailable.', TRUE, '503');
+ header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
exit('Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF);
}
@@ -226,20 +230,33 @@
}
// The path to the "views" folder
- if (is_dir($view_folder))
- {
- define ('VIEWPATH', $view_folder .'/');
- }
- else
+ if ( ! is_dir($view_folder))
{
- if ( ! is_dir(APPPATH.'views/'))
+ if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.'/'))
{
- header('HTTP/1.1 503 Service Unavailable.', TRUE, '503');
+ $view_folder = APPPATH.$view_folder;
+ }
+ elseif ( ! is_dir(APPPATH.'views/'))
+ {
+ header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
exit('Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF);
}
+ else
+ {
+ $view_folder = APPPATH.'views';
+ }
+ }
- define ('VIEWPATH', APPPATH.'views/' );
+ if (($_temp = realpath($view_folder)) !== FALSE)
+ {
+ $view_folder = realpath($view_folder).'/';
}
+ else
+ {
+ $view_folder = rtrim($view_folder, '/').'/';
+ }
+
+ define('VIEWPATH', $view_folder);
/*
* --------------------------------------------------------------------
@@ -251,4 +268,4 @@
require_once BASEPATH.'core/CodeIgniter.php';
/* End of file index.php */
-/* Location: ./index.php */
+/* Location: ./index.php */
View
21 phpdoc.dist.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<phpdoc>
+ <title>CodeIgniter v3.0.0 API</title>
+ <parser>
+ <target>./api/</target>
+ </parser>
+ <transformer>
+ <target>./api/</target>
+ </transformer>
+ <files>
+ <directory>./system</directory>
+ </files>
+
+ <logging>
+ <level>warn</level>
+ <paths>
+ <default>./api/log/{DATE}.log</default>
+ <errors>./api/{DATE}.errors.log</errors>
+ </paths>
+ </logging>
+</phpdoc>
View
2  readme.rst
@@ -183,8 +183,6 @@ Resources
- `User Guide <http://codeigniter.com/user_guide/>`_
- `Community Forums <http://codeigniter.com/forums/>`_
-- `User
- Voice <http://codeigniter.uservoice.com/forums/40508-codeigniter-reactor>`_
- `Community Wiki <http://codeigniter.com/wiki/>`_
- `Community IRC <http://codeigniter.com/irc/>`_
View
19 system/core/Benchmark.php 100755 → 100644
@@ -25,13 +25,11 @@
* @filesource
*/
-// ------------------------------------------------------------------------
-
/**
* CodeIgniter Benchmark Class
*
* This class enables you to mark points and calculate the time difference
- * between them. Memory consumption can also be displayed.
+ * between them. Memory consumption can also be displayed.
*
* @package CodeIgniter
* @subpackage Libraries
@@ -46,7 +44,7 @@ class CI_Benchmark {
*
* @var array
*/
- public $marker = array();
+ public $marker = array();
// --------------------------------------------------------------------
@@ -61,7 +59,7 @@ class CI_Benchmark {
*/
public function mark($name)
{
- $this->marker[$name] = microtime();
+ $this->marker[$name] = microtime(TRUE);
}
// --------------------------------------------------------------------
@@ -81,7 +79,7 @@ public function mark($name)
*/
public function elapsed_time($point1 = '', $point2 = '', $decimals = 4)
{
- if ($point1 == '')
+ if ($point1 === '')
{
return '{elapsed_time}';
}
@@ -93,13 +91,10 @@ public function elapsed_time($point1 = '', $point2 = '', $decimals = 4)
if ( ! isset($this->marker[$point2]))
{
- $this->marker[$point2] = microtime();
+ $this->marker[$point2] = microtime(TRUE);
}
- list($sm, $ss) = explode(' ', $this->marker[$point1]);
- list($em, $es) = explode(' ', $this->marker[$point2]);
-
- return number_format(($em + $es) - ($sm + $ss), $decimals);
+ return number_format($this->marker[$point2] - $this->marker[$point1], $decimals);
}
// --------------------------------------------------------------------
@@ -122,4 +117,4 @@ public function memory_usage()
}
/* End of file Benchmark.php */
-/* Location: ./system/core/Benchmark.php */
+/* Location: ./system/core/Benchmark.php */
View
58 system/core/CodeIgniter.php 100755 → 100644
@@ -25,15 +25,13 @@
* @filesource
*/
-// ------------------------------------------------------------------------
-
/**
* System Initialization File
*
* Loads the base classes and executes the request.
*
* @package CodeIgniter
- * @subpackage codeigniter
+ * @subpackage CodeIgniter
* @category Front-controller
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/
@@ -42,7 +40,7 @@
/**
* CodeIgniter Version
*
- * @var string
+ * @var string
*
*/
define('CI_VERSION', '3.0-dev');
@@ -75,9 +73,9 @@
*/
set_error_handler('_exception_handler');
- if ( ! is_php('5.3'))
+ if ( ! is_php('5.4'))
{
- @set_magic_quotes_runtime(0); // Kill magic quotes
+ @ini_set('magic_quotes_runtime', 0); // Kill magic quotes
}
/*
@@ -96,24 +94,13 @@
* Note: Since the config file data is cached it doesn't
* hurt to load it here.
*/
- if (isset($assign_to_config['subclass_prefix']) && $assign_to_config['subclass_prefix'] != '')
+ if ( ! empty($assign_to_config['subclass_prefix']))
{
get_config(array('subclass_prefix' => $assign_to_config['subclass_prefix']));
}
/*
* ------------------------------------------------------
- * Set a liberal script execution time limit
- * ------------------------------------------------------
- */
- if (function_exists('set_time_limit') && @ini_get('safe_mode') == 0
- && php_sapi_name() !== 'cli') // Do not override the Time Limit value if running from Command Line
- {
- @set_time_limit(300);
- }
-
-/*
- * ------------------------------------------------------
* Start the timer... tick tock tick tock...
* ------------------------------------------------------
*/
@@ -155,7 +142,7 @@
*
* Note: Order here is rather important as the UTF-8
* class needs to be used very early on, but it cannot
- * properly determine if UTf-8 can be supported until
+ * properly determine if UTF-8 can be supported until
* after the Config class is instantiated.
*
*/
@@ -195,7 +182,7 @@
* ------------------------------------------------------
*/
if ($EXT->call_hook('cache_override') === FALSE
- && $OUT->_display_cache($CFG, $URI) == TRUE)
+ && $OUT->_display_cache($CFG, $URI) === TRUE)
{
exit;
}
@@ -230,6 +217,13 @@
// Load the base controller class
require BASEPATH.'core/Controller.php';
+ /**
+ * Reference to the CI_Controller method.
+ *
+ * Returns current CI instance object
+ *
+ * @return object
+ */
function &get_instance()
{
return CI_Controller::get_instance();
@@ -275,12 +269,12 @@ function &get_instance()
{
$x = explode('/', $RTR->routes['404_override'], 2);
$class = $x[0];
- $method = (isset($x[1]) ? $x[1] : 'index');
+ $method = isset($x[1]) ? $x[1] : 'index';
if ( ! class_exists($class))
{
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
include_once(APPPATH.'controllers/'.$class.'.php');
@@ -288,7 +282,7 @@ function &get_instance()
}
else
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
}
@@ -337,12 +331,12 @@ function &get_instance()
{
$x = explode('/', $RTR->routes['404_override'], 2);
$class = $x[0];
- $method = (isset($x[1]) ? $x[1] : 'index');
+ $method = isset($x[1]) ? $x[1] : 'index';
if ( ! class_exists($class))
{
if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
include_once(APPPATH.'controllers/'.$class.'.php');
@@ -352,7 +346,7 @@ function &get_instance()
}
else
{
- show_404("{$class}/{$method}");
+ show_404($class.'/'.$method);
}
}
@@ -388,15 +382,5 @@ function &get_instance()
*/
$EXT->call_hook('post_system');
-/*
- * ------------------------------------------------------
- * Close the DB connection if one exists
- * ------------------------------------------------------
- */
- if (class_exists('CI_DB') && isset($CI->db))
- {
- $CI->db->close();
- }
-
/* End of file CodeIgniter.php */
-/* Location: ./system/core/CodeIgniter.php */
+/* Location: ./system/core/CodeIgniter.php */
View
431 system/core/Common.php
@@ -31,7 +31,7 @@
* Loads the base classes and executes the request.
*
* @package CodeIgniter
- * @subpackage codeigniter
+ * @subpackage CodeIgniter
* @category Common Functions
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/
@@ -39,25 +39,25 @@
// ------------------------------------------------------------------------
-/**
- * Determines if the current version of PHP is greater then the supplied value
- *
- * Since there are a few places where we conditionally test for PHP > 5
- * we'll set a static variable.
- *
- * @param string
- * @return bool TRUE if the current version is $version or higher
- */
if ( ! function_exists('is_php'))
{
- function is_php($version = '5.0.0')
+ /**
+ * Determines if the current version of PHP is greater then the supplied value
+ *
+ * Since there are a few places where we conditionally test for PHP > 5.3
+ * we'll set a static variable.
+ *
+ * @param string
+ * @return bool TRUE if the current version is $version or higher
+ */
+ function is_php($version = '5.3.0')
{
static $_is_php;
$version = (string) $version;
if ( ! isset($_is_php[$version]))
{
- $_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE;
+ $_is_php[$version] = (version_compare(PHP_VERSION, $version) >= 0);
}
return $_is_php[$version];
@@ -66,18 +66,18 @@ function is_php($version = '5.0.0')
// ------------------------------------------------------------------------
-/**
- * Tests for file writability
- *
- * is_writable() returns TRUE on Windows servers when you really can't write to
- * the file, based on the read-only attribute. is_writable() is also unreliable
- * on Unix servers if safe_mode is on.
- *
- * @param string
- * @return void
- */
if ( ! function_exists('is_really_writable'))
{
+ /**
+ * Tests for file writability
+ *
+ * is_writable() returns TRUE on Windows servers when you really can't write to
+ * the file, based on the read-only attribute. is_writable() is also unreliable
+ * on Unix servers if safe_mode is on.
+ *
+ * @param string
+ * @return void
+ */
function is_really_writable($file)
{
// If we're on a Unix server with safe_mode off we call is_writable
@@ -114,20 +114,20 @@ function is_really_writable($file)
// ------------------------------------------------------------------------
-/**
- * Class registry
- *
- * This function acts as a singleton. If the requested class does not
- * exist it is instantiated and set to a static variable. If it has
- * previously been instantiated the variable is returned.
- *
- * @param string the class name being requested
- * @param string the directory where the class should be found
- * @param string the class name prefix
- * @return object
- */
if ( ! function_exists('load_class'))
{
+ /**
+ * Class registry
+ *
+ * This function acts as a singleton. If the requested class does not
+ * exist it is instantiated and set to a static variable. If it has
+ * previously been instantiated the variable is returned.
+ *
+ * @param string the class name being requested
+ * @param string the directory where the class should be found
+ * @param string the class name prefix
+ * @return object
+ */
function &load_class($class, $directory = 'libraries', $prefix = 'CI_')
{
static $_classes = array();
@@ -187,20 +187,20 @@ function &load_class($class, $directory = 'libraries', $prefix = 'CI_')
// --------------------------------------------------------------------
-/**
- * Keeps track of which libraries have been loaded. This function is
- * called by the load_class() function above
- *
- * @param string
- * @return array
- */
if ( ! function_exists('is_loaded'))
{
+ /**
+ * Keeps track of which libraries have been loaded. This function is
+ * called by the load_class() function above
+ *
+ * @param string
+ * @return array
+ */
function &is_loaded($class = '')
{
static $_is_loaded = array();
- if ($class != '')
+ if ($class !== '')
{
$_is_loaded[strtolower($class)] = $class;
}
@@ -211,17 +211,17 @@ function &is_loaded($class = '')
// ------------------------------------------------------------------------
-/**
- * Loads the main config.php file
- *
- * This function lets us grab the config file even if the Config class
- * hasn't been instantiated yet
- *
- * @param array
- * @return array
- */
if ( ! function_exists('get_config'))
{
+ /**
+ * Loads the main config.php file
+ *
+ * This function lets us grab the config file even if the Config class
+ * hasn't been instantiated yet
+ *
+ * @param array
+ * @return array
+ */
function &get_config($replace = array())
{
static $_config;
@@ -231,21 +231,25 @@ function &get_config($replace = array())
return $_config[0];
}
- // Is the config file in the environment folder?
- if ( ! defined('ENVIRONMENT') OR ! file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/config.php'))
+ $file_path = APPPATH.'config/config.php';
+ $found = FALSE;
+ if (file_exists($file_path))
{
- $file_path = APPPATH.'config/config.php';
+ $found = TRUE;
+ require($file_path);
}
- // Fetch the config file
- if ( ! file_exists($file_path))
+ // Is the config file in the environment folder?
+ if (defined('ENVIRONMENT') && file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/config.php'))
+ {
+ require($file_path);
+ }
+ elseif ( ! $found)
{
set_status_header(503);
exit('The configuration file does not exist.');
}
- require($file_path);
-
// Does the $config array exist in the file?
if ( ! isset($config) OR ! is_array($config))
{
@@ -271,14 +275,14 @@ function &get_config($replace = array())
// ------------------------------------------------------------------------
-/**
- * Returns the specified config item
- *
- * @param string
- * @return mixed
- */
if ( ! function_exists('config_item'))
{
+ /**
+ * Returns the specified config item
+ *
+ * @param string
+ * @return mixed
+ */
function config_item($item)
{
static $_config_item = array();
@@ -300,22 +304,48 @@ function config_item($item)
// ------------------------------------------------------------------------
-/**
- * Error Handler
- *
- * This function lets us invoke the exception class and
- * display errors using the standard error template located
- * in application/errors/errors.php
- * This function will send the error page directly to the
- * browser and exit.
- *
- * @param string
- * @param int
- * @param string
- * @return void
- */
+if ( ! function_exists('get_mimes'))
+{
+ /**
+ * Returns the MIME types array from config/mimes.php
+ *
+ * @return array
+ */
+ function &get_mimes()
+ {
+ static $_mimes = array();
+
+ if (defined('ENVIRONMENT') && is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
+ {
+ $_mimes = include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
+ }
+ elseif (is_file(APPPATH.'config/mimes.php'))
+ {
+ $_mimes = include(APPPATH.'config/mimes.php');
+ }
+
+ return $_mimes;
+ }
+}
+
+// ------------------------------------------------------------------------
+
if ( ! function_exists('show_error'))
{
+ /**
+ * Error Handler
+ *
+ * This function lets us invoke the exception class and
+ * display errors using the standard error template located
+ * in application/errors/errors.php
+ * This function will send the error page directly to the
+ * browser and exit.
+ *
+ * @param string
+ * @param int
+ * @param string
+ * @return void
+ */
function show_error($message, $status_code = 500, $heading = 'An Error Was Encountered')
{
$_error =& load_class('Exceptions', 'core');
@@ -326,19 +356,19 @@ function show_error($message, $status_code = 500, $heading = 'An Error Was Encou
// ------------------------------------------------------------------------
-/**
- * 404 Page Handler
- *
- * This function is similar to the show_error() function above
- * However, instead of the standard error template it displays
- * 404 errors.
- *
- * @param string