Permalink
Browse files

Merge branch 'release/2.1.0'

Conflicts:
	user_guide/helpers/url_helper.html
  • Loading branch information...
pkriete committed Nov 14, 2011
2 parents 44cdece + 917c345 commit f525f10c850399700a4cce183aef55656ff44d31
Showing with 5,366 additions and 731 deletions.
  1. +2 −1 application/config/database.php
  2. +41 −0 application/config/migration.php
  3. +3 −3 application/config/mimes.php
  4. +5 −0 system/core/Benchmark.php
  5. +30 −10 system/core/CodeIgniter.php
  6. +27 −3 system/core/Common.php
  7. +22 −7 system/core/Config.php
  8. +1 −1 system/core/Controller.php
  9. +16 −1 system/core/Exceptions.php
  10. +15 −0 system/core/Hooks.php
  11. +58 −17 system/core/Input.php
  12. +13 −0 system/core/Lang.php
  13. +111 −25 system/core/Loader.php
  14. +1 −0 system/core/Model.php
  15. +59 −2 system/core/Output.php
  16. +57 −2 system/core/Router.php
  17. +121 −87 system/core/Security.php
  18. +31 −0 system/core/URI.php
  19. +3 −1 system/database/DB.php
  20. +3 −3 system/database/DB_active_rec.php
  21. +1 −1 system/database/DB_cache.php
  22. +3 −3 system/database/DB_driver.php
  23. +1 −1 system/database/DB_forge.php
  24. +23 −23 system/database/DB_result.php
  25. +1 −1 system/database/DB_utility.php
  26. +792 −0 system/database/drivers/cubrid/cubrid_driver.php
  27. +288 −0 system/database/drivers/cubrid/cubrid_forge.php
  28. +202 −0 system/database/drivers/cubrid/cubrid_result.php
  29. +108 −0 system/database/drivers/cubrid/cubrid_utility.php
  30. +10 −0 system/database/drivers/cubrid/index.html
  31. +1 −0 system/database/drivers/mssql/mssql_driver.php
  32. +8 −6 system/database/drivers/mysql/mysql_driver.php
  33. +11 −6 system/database/drivers/mysql/mysql_result.php
  34. +1 −1 system/database/drivers/mysql/mysql_utility.php
  35. +27 −6 system/database/drivers/mysqli/mysqli_driver.php
  36. +12 −7 system/database/drivers/mysqli/mysqli_result.php
  37. +96 −65 system/database/drivers/oci8/oci8_driver.php
  38. +34 −64 system/database/drivers/oci8/oci8_result.php
  39. +3 −2 system/database/drivers/odbc/odbc_driver.php
  40. +803 −0 system/database/drivers/pdo/pdo_driver.php
  41. +1 −0 system/database/drivers/postgre/postgre_driver.php
  42. +1 −0 system/database/drivers/sqlite/sqlite_driver.php
  43. +1 −0 system/database/drivers/sqlsrv/sqlsrv_driver.php
  44. +1 −1 system/helpers/date_helper.php
  45. +4 −4 system/helpers/form_helper.php
  46. +17 −0 system/helpers/string_helper.php
  47. +1 −0 system/language/english/form_validation_lang.php
  48. +13 −0 system/language/english/migration_lang.php
  49. +2 −2 system/libraries/Cache/drivers/Cache_apc.php
  50. +10 −1 system/libraries/Cache/drivers/Cache_memcached.php
  51. +4 −4 system/libraries/Cart.php
  52. +2 −2 system/libraries/Driver.php
  53. +92 −62 system/libraries/Email.php
  54. +68 −51 system/libraries/Form_validation.php
  55. +338 −0 system/libraries/Migration.php
  56. +73 −12 system/libraries/Pagination.php
  57. +2 −1 system/libraries/Session.php
  58. +64 −2 system/libraries/Upload.php
  59. +1 −1 system/libraries/User_agent.php
  60. +3 −3 system/libraries/Xmlrpc.php
  61. +129 −54 user_guide/changelog.html
  62. +45 −3 user_guide/database/active_record.html
  63. +1 −1 user_guide/database/caching.html
  64. +1 −1 user_guide/database/call_function.html
  65. +3 −3 user_guide/database/configuration.html
  66. +1 −1 user_guide/database/connecting.html
  67. +1 −1 user_guide/database/examples.html
  68. +1 −1 user_guide/database/fields.html
  69. +1 −1 user_guide/database/forge.html
  70. +1 −1 user_guide/database/helpers.html
  71. +1 −1 user_guide/database/index.html
  72. +1 −1 user_guide/database/queries.html
  73. +2 −2 user_guide/database/results.html
  74. +1 −1 user_guide/database/table_data.html
  75. +1 −1 user_guide/database/transactions.html
  76. +1 −1 user_guide/database/utilities.html
  77. +1 −1 user_guide/doc_style/index.html
  78. +1 −1 user_guide/general/alternative_php.html
  79. +1 −1 user_guide/general/ancillary_classes.html
  80. +1 −1 user_guide/general/autoloader.html
  81. +1 −1 user_guide/general/caching.html
  82. +2 −2 user_guide/general/cli.html
  83. +3 −1 user_guide/general/common_functions.html
  84. +1 −1 user_guide/general/controllers.html
  85. +1 −1 user_guide/general/core_classes.html
  86. +1 −1 user_guide/general/creating_drivers.html
  87. +1 −1 user_guide/general/creating_libraries.html
  88. +1 −1 user_guide/general/credits.html
  89. +1 −1 user_guide/general/drivers.html
  90. +1 −1 user_guide/general/environments.html
  91. +1 −1 user_guide/general/errors.html
  92. +1 −1 user_guide/general/helpers.html
  93. +1 −1 user_guide/general/hooks.html
  94. +1 −1 user_guide/general/libraries.html
  95. +1 −1 user_guide/general/managing_apps.html
  96. +1 −1 user_guide/general/models.html
  97. +1 −1 user_guide/general/profiling.html
  98. +1 −1 user_guide/general/quick_reference.html
  99. +1 −1 user_guide/general/requirements.html
  100. +1 −1 user_guide/general/reserved_names.html
  101. +1 −1 user_guide/general/routing.html
  102. +1 −1 user_guide/general/security.html
  103. +1 −1 user_guide/general/styleguide.html
  104. +1 −1 user_guide/general/urls.html
  105. +1 −1 user_guide/general/views.html
  106. +1 −1 user_guide/helpers/array_helper.html
  107. +1 −1 user_guide/helpers/captcha_helper.html
  108. +1 −1 user_guide/helpers/cookie_helper.html
  109. +1 −1 user_guide/helpers/date_helper.html
  110. +1 −1 user_guide/helpers/directory_helper.html
  111. +1 −1 user_guide/helpers/download_helper.html
  112. +1 −1 user_guide/helpers/email_helper.html
  113. +1 −1 user_guide/helpers/file_helper.html
  114. +1 −1 user_guide/helpers/form_helper.html
  115. +1 −1 user_guide/helpers/html_helper.html
  116. +1 −1 user_guide/helpers/inflector_helper.html
  117. +1 −1 user_guide/helpers/language_helper.html
  118. +1 −1 user_guide/helpers/number_helper.html
  119. +1 −1 user_guide/helpers/path_helper.html
  120. +1 −1 user_guide/helpers/security_helper.html
  121. +1 −1 user_guide/helpers/smiley_helper.html
  122. +12 −1 user_guide/helpers/string_helper.html
  123. +1 −1 user_guide/helpers/text_helper.html
  124. +1 −1 user_guide/helpers/typography_helper.html
  125. +1 −1 user_guide/helpers/url_helper.html
  126. +1 −1 user_guide/helpers/xml_helper.html
  127. BIN user_guide/images/appflowchart.gif
  128. +1 −2 user_guide/index.html
  129. +8 −6 user_guide/installation/downloads.html
  130. +1 −1 user_guide/installation/index.html
  131. +1 −1 user_guide/installation/troubleshooting.html
  132. +1 −1 user_guide/installation/upgrade_120.html
  133. +1 −1 user_guide/installation/upgrade_130.html
  134. +1 −1 user_guide/installation/upgrade_131.html
  135. +1 −1 user_guide/installation/upgrade_132.html
  136. +1 −1 user_guide/installation/upgrade_133.html
  137. +1 −1 user_guide/installation/upgrade_140.html
  138. +1 −1 user_guide/installation/upgrade_141.html
  139. +1 −1 user_guide/installation/upgrade_150.html
  140. +1 −1 user_guide/installation/upgrade_152.html
  141. +1 −1 user_guide/installation/upgrade_153.html
  142. +1 −1 user_guide/installation/upgrade_154.html
  143. +1 −1 user_guide/installation/upgrade_160.html
  144. +1 −1 user_guide/installation/upgrade_161.html
  145. +1 −1 user_guide/installation/upgrade_162.html
  146. +1 −1 user_guide/installation/upgrade_163.html
  147. +1 −1 user_guide/installation/upgrade_170.html
  148. +1 −1 user_guide/installation/upgrade_171.html
  149. +1 −1 user_guide/installation/upgrade_172.html
  150. +1 −1 user_guide/installation/upgrade_200.html
  151. +1 −1 user_guide/installation/upgrade_201.html
  152. +1 −1 user_guide/installation/upgrade_202.html
  153. +1 −1 user_guide/installation/upgrade_203.html
  154. +89 −0 user_guide/installation/upgrade_210.html
  155. +1 −1 user_guide/installation/upgrade_b11.html
  156. +2 −1 user_guide/installation/upgrading.html
  157. +1 −1 user_guide/libraries/benchmark.html
  158. +1 −1 user_guide/libraries/caching.html
  159. +1 −1 user_guide/libraries/calendar.html
  160. +11 −11 user_guide/libraries/cart.html
  161. +1 −1 user_guide/libraries/config.html
  162. +1 −1 user_guide/libraries/email.html
  163. +1 −1 user_guide/libraries/encryption.html
  164. +1 −1 user_guide/libraries/file_uploading.html
  165. +18 −14 user_guide/libraries/form_validation.html
  166. +4 −5 user_guide/libraries/ftp.html
  167. +1 −1 user_guide/libraries/image_lib.html
  168. +10 −10 user_guide/libraries/input.html
  169. +1 −1 user_guide/libraries/javascript.html
  170. +1 −1 user_guide/libraries/language.html
  171. +1 −1 user_guide/libraries/loader.html
  172. +176 −0 user_guide/libraries/migration.html
  173. +1 −1 user_guide/libraries/output.html
  174. +6 −2 user_guide/libraries/pagination.html
  175. +1 −1 user_guide/libraries/parser.html
  176. +1 −1 user_guide/libraries/security.html
  177. +1 −1 user_guide/libraries/sessions.html
  178. +1 −1 user_guide/libraries/table.html
  179. +1 −1 user_guide/libraries/trackback.html
  180. +1 −1 user_guide/libraries/typography.html
  181. +1 −1 user_guide/libraries/unit_testing.html
  182. +1 −1 user_guide/libraries/uri.html
  183. +1 −1 user_guide/libraries/user_agent.html
  184. +1 −1 user_guide/libraries/xmlrpc.html
  185. +1 −1 user_guide/libraries/zip.html
  186. +1 −1 user_guide/license.html
  187. +11 −1 user_guide/nav/nav.js
  188. +2 −2 user_guide/overview/appflow.html
  189. +1 −1 user_guide/overview/at_a_glance.html
  190. +1 −1 user_guide/overview/cheatsheets.html
  191. +1 −1 user_guide/overview/features.html
  192. +1 −1 user_guide/overview/getting_started.html
  193. +1 −1 user_guide/overview/goals.html
  194. +1 −1 user_guide/overview/index.html
  195. +1 −1 user_guide/overview/mvc.html
  196. +10 −1 user_guide/toc.html
  197. +91 −0 user_guide/tutorial/conclusion.html
  198. +179 −0 user_guide/tutorial/create_news_items.html
  199. +158 −0 user_guide/tutorial/hard_coded_pages.html
  200. +101 −0 user_guide/tutorial/index.html
  201. +230 −0 user_guide/tutorial/news_section.html
  202. +206 −0 user_guide/tutorial/static_pages.html
@@ -27,7 +27,8 @@
| ['char_set'] The character set used in communicating with the database
| ['dbcollat'] The character collation used in communicating with the database
| NOTE: For MySQL and MySQLi databases, this setting is only used
-| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7.
+| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
+| (and in table creation queries made with DB Forge).
| There is an incompatibility in PHP with mysql_real_escape_string() which
| can make your site vulnerable to SQL injection if you are using a
| multi-byte character set and are running versions lower than these.
@@ -0,0 +1,41 @@
+<?php defined('BASEPATH') OR exit('No direct script access allowed');
+/*
+|--------------------------------------------------------------------------
+| Enable/Disable Migrations
+|--------------------------------------------------------------------------
+|
+| Migrations are disabled by default but should be enabled
+| whenever you intend to do a schema migration.
+|
+*/
+$config['migration_enabled'] = FALSE;
+
+
+/*
+|--------------------------------------------------------------------------
+| Migrations version
+|--------------------------------------------------------------------------
+|
+| This is used to set migration version that the file system should be on.
+| If you run $this->migration->latest() this is the version that schema will
+| be upgraded / downgraded to.
+|
+*/
+$config['migration_version'] = 0;
+
+
+/*
+|--------------------------------------------------------------------------
+| Migrations Path
+|--------------------------------------------------------------------------
+|
+| Path to your migrations folder.
+| Typically, it will be within your application path.
+| Also, writing permission is required within the migrations path.
+|
+*/
+$config['migration_path'] = APPPATH . 'migrations/';
+
+
+/* End of file migration.php */
+/* Location: ./application/config/migration.php */
@@ -65,8 +65,8 @@
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
- 'wav' => 'audio/x-wav',
- 'bmp' => 'image/bmp',
+ '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'),
@@ -103,4 +103,4 @@
/* End of file mimes.php */
-/* Location: ./application/config/mimes.php */
+/* Location: ./application/config/mimes.php */
View
5 system/core/Benchmark.php 100644 → 100755
@@ -29,6 +29,11 @@
*/
class CI_Benchmark {
+ /**
+ * List of all benchmark markers and when they were added
+ *
+ * @var array
+ */
var $marker = array();
// --------------------------------------------------------------------
View
40 system/core/CodeIgniter.php 100644 → 100755
@@ -27,17 +27,19 @@
* @link http://codeigniter.com/user_guide/
*/
-/*
- * ------------------------------------------------------
- * Define the CodeIgniter Version
- * ------------------------------------------------------
+/**
+ * CodeIgniter Version
+ *
+ * @var string
+ *
*/
- define('CI_VERSION', '2.0.3');
+ define('CI_VERSION', '2.1.0');
-/*
- * ------------------------------------------------------
- * Define the CodeIgniter Branch (Core = TRUE, Reactor = FALSE)
- * ------------------------------------------------------
+/**
+ * CodeIgniter Branch (Core = TRUE, Reactor = FALSE)
+ *
+ * @var boolean
+ *
*/
define('CI_CORE', FALSE);
@@ -267,7 +269,25 @@ function &get_instance()
OR in_array(strtolower($method), array_map('strtolower', get_class_methods('CI_Controller')))
)
{
- show_404("{$class}/{$method}");
+ if ( ! empty($RTR->routes['404_override']))
+ {
+ $x = explode('/', $RTR->routes['404_override']);
+ $class = $x[0];
+ $method = (isset($x[1]) ? $x[1] : 'index');
+ if ( ! class_exists($class))
+ {
+ if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
+ {
+ show_404("{$class}/{$method}");
+ }
+
+ include_once(APPPATH.'controllers/'.$class.'.php');
+ }
+ }
+ else
+ {
+ show_404("{$class}/{$method}");
+ }
}
/*
View
@@ -132,9 +132,9 @@ function &load_class($class, $directory = 'libraries', $prefix = 'CI_')
$name = FALSE;
- // Look for the class first in the native system/libraries folder
- // thenin the local application/libraries folder
- foreach (array(BASEPATH, APPPATH) as $path)
+ // Look for the class first in the local application/libraries folder
+ // then in the native system/libraries folder
+ foreach (array(APPPATH, BASEPATH) as $path)
{
if (file_exists($path.$directory.'/'.$class.'.php'))
{
@@ -536,5 +536,29 @@ function remove_invisible_characters($str, $url_encoded = TRUE)
}
}
+// ------------------------------------------------------------------------
+
+/**
+* Returns HTML escaped variable
+*
+* @access public
+* @param mixed
+* @return mixed
+*/
+if ( ! function_exists('html_escape'))
+{
+ function html_escape($var)
+ {
+ if (is_array($var))
+ {
+ return array_map('html_escape', $var);
+ }
+ else
+ {
+ return htmlspecialchars($var, ENT_QUOTES, config_item('charset'));
+ }
+ }
+}
+
/* End of file Common.php */
/* Location: ./system/core/Common.php */
View
29 system/core/Config.php 100644 → 100755
@@ -28,8 +28,23 @@
*/
class CI_Config {
+ /**
+ * List of all loaded config values
+ *
+ * @var array
+ */
var $config = array();
+ /**
+ * List of all loaded config files
+ *
+ * @var array
+ */
var $is_loaded = array();
+ /**
+ * List of paths to search when trying to load a config file
+ *
+ * @var array
+ */
var $_config_paths = array(APPPATH);
/**
@@ -251,13 +266,13 @@ function site_url($uri = '')
return $this->slash_item('base_url').$this->item('index_page').'?'.$this->_uri_string($uri);
}
}
-
+
// -------------------------------------------------------------
-
+
/**
* Base URL
* Returns base_url [. uri_string]
- *
+ *
* @access public
* @param string $uri
* @return string
@@ -266,12 +281,12 @@ function base_url($uri = '')
{
return $this->slash_item('base_url').ltrim($this->_uri_string($uri),'/');
}
-
+
// -------------------------------------------------------------
-
+
/**
* Build URI string for use in Config::site_url() and Config::base_url()
- *
+ *
* @access protected
* @param $uri
* @return string
@@ -305,7 +320,7 @@ protected function _uri_string($uri)
}
// --------------------------------------------------------------------
-
+
/**
* System URL
*
@@ -48,7 +48,7 @@ public function __construct()
$this->load =& load_class('Loader', 'core');
- $this->load->set_base_classes()->ci_autoloader();
+ $this->load->initialize();
log_message('debug', "Controller Class Initialized");
}
View
17 system/core/Exceptions.php 100644 → 100755
@@ -30,8 +30,21 @@ class CI_Exceptions {
var $message;
var $filename;
var $line;
+
+ /**
+ * Nesting level of the output buffering mechanism
+ *
+ * @var int
+ * @access public
+ */
var $ob_level;
+ /**
+ * List if available error levels
+ *
+ * @var array
+ * @access public
+ */
var $levels = array(
E_ERROR => 'Error',
E_WARNING => 'Warning',
@@ -84,7 +97,8 @@ function log_exception($severity, $message, $filepath, $line)
* 404 Page Not Found Handler
*
* @access private
- * @param string
+ * @param string the page
+ * @param bool log error yes/no
* @return string
*/
function show_404($page = '', $log_error = TRUE)
@@ -115,6 +129,7 @@ function show_404($page = '', $log_error = TRUE)
* @param string the heading
* @param string the message
* @param string the template name
+ * @param int the status code
* @return string
*/
function show_error($heading, $message, $template = 'error_general', $status_code = 500)
View
15 system/core/Hooks.php 100644 → 100755
@@ -28,8 +28,23 @@
*/
class CI_Hooks {
+ /**
+ * Determines wether hooks are enabled
+ *
+ * @var bool
+ */
var $enabled = FALSE;
+ /**
+ * List of all hooks set in config/hooks.php
+ *
+ * @var array
+ */
var $hooks = array();
+ /**
+ * Determines wether hook is in progress, used to prevent infinte loops
+ *
+ * @var bool
+ */
var $in_progress = FALSE;
/**
Oops, something went wrong.

1 comment on commit f525f10

Please sign in to comment.