Skip to content

Instantly share code, notes, and snippets.

@fukata
Created November 15, 2011 00:09
Show Gist options
  • Save fukata/1365645 to your computer and use it in GitHub Desktop.
Save fukata/1365645 to your computer and use it in GitHub Desktop.
CodeIgniter 2.0.3 and 2.1.0 diff
diff -ru CodeIgniter_2.0.3//application/config/database.php CodeIgniter_2.1.0//application/config/database.php
--- CodeIgniter_2.0.3//application/config/database.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//application/config/database.php 2011-11-01 01:15:36.000000000 +0900
@@ -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.
Only in CodeIgniter_2.1.0//application/config: migration.php
diff -ru CodeIgniter_2.0.3//application/config/mimes.php CodeIgniter_2.1.0//application/config/mimes.php
--- CodeIgniter_2.0.3//application/config/mimes.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//application/config/mimes.php 2011-11-01 01:15:36.000000000 +0900
@@ -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 */
\ No newline at end of file
+/* Location: ./application/config/mimes.php */
diff -ru CodeIgniter_2.0.3//system/core/Benchmark.php CodeIgniter_2.1.0//system/core/Benchmark.php
--- CodeIgniter_2.0.3//system/core/Benchmark.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Benchmark.php 2011-11-01 01:15:36.000000000 +0900
@@ -29,6 +29,11 @@
*/
class CI_Benchmark {
+ /**
+ * List of all benchmark markers and when they were added
+ *
+ * @var array
+ */
var $marker = array();
// --------------------------------------------------------------------
diff -ru CodeIgniter_2.0.3//system/core/CodeIgniter.php CodeIgniter_2.1.0//system/core/CodeIgniter.php
--- CodeIgniter_2.0.3//system/core/CodeIgniter.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/CodeIgniter.php 2011-11-15 03:37:03.000000000 +0900
@@ -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 @@
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}");
+ }
}
/*
diff -ru CodeIgniter_2.0.3//system/core/Common.php CodeIgniter_2.1.0//system/core/Common.php
--- CodeIgniter_2.0.3//system/core/Common.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Common.php 2011-11-15 03:31:59.000000000 +0900
@@ -132,9 +132,9 @@
$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 @@
}
}
+// ------------------------------------------------------------------------
+
+/**
+* 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 */
\ No newline at end of file
diff -ru CodeIgniter_2.0.3//system/core/Config.php CodeIgniter_2.1.0//system/core/Config.php
--- CodeIgniter_2.0.3//system/core/Config.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Config.php 2011-11-01 01:15:36.000000000 +0900
@@ -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 @@
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 @@
{
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 @@
}
// --------------------------------------------------------------------
-
+
/**
* System URL
*
diff -ru CodeIgniter_2.0.3//system/core/Controller.php CodeIgniter_2.1.0//system/core/Controller.php
--- CodeIgniter_2.0.3//system/core/Controller.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Controller.php 2011-11-01 01:15:36.000000000 +0900
@@ -48,7 +48,7 @@
$this->load =& load_class('Loader', 'core');
- $this->load->set_base_classes()->ci_autoloader();
+ $this->load->initialize();
log_message('debug', "Controller Class Initialized");
}
diff -ru CodeIgniter_2.0.3//system/core/Exceptions.php CodeIgniter_2.1.0//system/core/Exceptions.php
--- CodeIgniter_2.0.3//system/core/Exceptions.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Exceptions.php 2011-11-01 01:15:36.000000000 +0900
@@ -30,8 +30,21 @@
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 @@
* 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 @@
* @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)
diff -ru CodeIgniter_2.0.3//system/core/Hooks.php CodeIgniter_2.1.0//system/core/Hooks.php
--- CodeIgniter_2.0.3//system/core/Hooks.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Hooks.php 2011-11-01 01:15:36.000000000 +0900
@@ -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;
/**
diff -ru CodeIgniter_2.0.3//system/core/Input.php CodeIgniter_2.1.0//system/core/Input.php
--- CodeIgniter_2.0.3//system/core/Input.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Input.php 2011-11-01 01:15:36.000000000 +0900
@@ -28,15 +28,51 @@
*/
class CI_Input {
+ /**
+ * IP address of the current user
+ *
+ * @var string
+ */
var $ip_address = FALSE;
+ /**
+ * user agent (web browser) being used by the current user
+ *
+ * @var string
+ */
var $user_agent = FALSE;
+ /**
+ * If FALSE, then $_GET will be set to an empty array
+ *
+ * @var bool
+ */
var $_allow_get_array = TRUE;
+ /**
+ * If TRUE, then newlines are standardized
+ *
+ * @var bool
+ */
var $_standardize_newlines = TRUE;
- var $_enable_xss = FALSE; // Set automatically based on config setting
- var $_enable_csrf = FALSE; // Set automatically based on config setting
-
+ /**
+ * Determines whether the XSS filter is always active when GET, POST or COOKIE data is encountered
+ * Set automatically based on config setting
+ *
+ * @var bool
+ */
+ var $_enable_xss = FALSE;
+ /**
+ * Enables a CSRF cookie token to be set.
+ * Set automatically based on config setting
+ *
+ * @var bool
+ */
+ var $_enable_csrf = FALSE;
+ /**
+ * List of all HTTP request headers
+ *
+ * @var array
+ */
protected $headers = array();
-
+
/**
* Constructor
@@ -147,7 +183,7 @@
}
return $post;
}
-
+
return $this->_fetch_from_array($_POST, $index, $xss_clean);
}
@@ -402,9 +438,9 @@
function _sanitize_globals()
{
// It would be "wrong" to unset any of these GLOBALS.
- $protected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST',
+ $protected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST',
'_SESSION', '_ENV', 'GLOBALS', 'HTTP_RAW_POST_DATA',
- 'system_folder', 'application_folder', 'BM', 'EXT',
+ 'system_folder', 'application_folder', 'BM', 'EXT',
'CFG', 'URI', 'RTR', 'OUT', 'IN');
// Unset globals for securiy.
@@ -512,8 +548,12 @@
return $new_array;
}
- // We strip slashes if magic quotes is on to keep things consistent
- if (function_exists('get_magic_quotes_gpc') AND get_magic_quotes_gpc())
+ /* We strip slashes if magic quotes is on to keep things consistent
+
+ NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and
+ it will probably not exist in future versions at all.
+ */
+ if ( ! is_php('5.4') && get_magic_quotes_gpc())
{
$str = stripslashes($str);
}
@@ -523,7 +563,7 @@
{
$str = $this->uni->clean_string($str);
}
-
+
// Remove control characters
$str = remove_invisible_characters($str);
@@ -579,9 +619,11 @@
/**
* Request Headers
*
- * In Apache, you can simply call apache_request_headers(), however for
+ * In Apache, you can simply call apache_request_headers(), however for
* people running other webservers the function is undefined.
*
+ * @param bool XSS cleaning
+ *
* @return array
*/
public function request_headers($xss_clean = FALSE)
@@ -609,10 +651,10 @@
{
$key = str_replace('_', ' ', strtolower($key));
$key = str_replace(' ', '-', ucwords($key));
-
+
$this->headers[$key] = $val;
}
-
+
return $this->headers;
}
@@ -633,7 +675,7 @@
{
$this->request_headers();
}
-
+
if ( ! isset($this->headers[$index]))
{
return FALSE;
@@ -644,7 +686,7 @@
return $this->security->xss_clean($this->headers[$index]);
}
- return $this->headers[$index];
+ return $this->headers[$index];
}
// --------------------------------------------------------------------
@@ -676,7 +718,6 @@
}
}
-// END Input class
/* End of file Input.php */
-/* Location: ./system/core/Input.php */
+/* Location: ./system/core/Input.php */
\ No newline at end of file
diff -ru CodeIgniter_2.0.3//system/core/Lang.php CodeIgniter_2.1.0//system/core/Lang.php
--- CodeIgniter_2.0.3//system/core/Lang.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Lang.php 2011-11-01 01:15:36.000000000 +0900
@@ -26,7 +26,17 @@
*/
class CI_Lang {
+ /**
+ * List of translations
+ *
+ * @var array
+ */
var $language = array();
+ /**
+ * List of loaded language files
+ *
+ * @var array
+ */
var $is_loaded = array();
/**
@@ -47,6 +57,9 @@
* @access public
* @param mixed the name of the language file to be loaded. Can be an array
* @param string the language (english, etc.)
+ * @param bool return loaded array of translations
+ * @param bool add suffix to $langfile
+ * @param string alternative path to look for language file
* @return mixed
*/
function load($langfile = '', $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '')
diff -ru CodeIgniter_2.0.3//system/core/Loader.php CodeIgniter_2.1.0//system/core/Loader.php
--- CodeIgniter_2.0.3//system/core/Loader.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Loader.php 2011-11-01 01:15:36.000000000 +0900
@@ -29,18 +29,91 @@
class CI_Loader {
// All these are set automatically. Don't mess with them.
+ /**
+ * Nesting level of the output buffering mechanism
+ *
+ * @var int
+ * @access protected
+ */
protected $_ci_ob_level;
+ /**
+ * List of paths to load views from
+ *
+ * @var array
+ * @access protected
+ */
protected $_ci_view_paths = array();
+ /**
+ * List of paths to load libraries from
+ *
+ * @var array
+ * @access protected
+ */
protected $_ci_library_paths = array();
+ /**
+ * List of paths to load models from
+ *
+ * @var array
+ * @access protected
+ */
protected $_ci_model_paths = array();
+ /**
+ * List of paths to load helpers from
+ *
+ * @var array
+ * @access protected
+ */
protected $_ci_helper_paths = array();
+ /**
+ * List of loaded base classes
+ * Set by the controller class
+ *
+ * @var array
+ * @access protected
+ */
protected $_base_classes = array(); // Set by the controller class
+ /**
+ * List of cached variables
+ *
+ * @var array
+ * @access protected
+ */
protected $_ci_cached_vars = array();
+ /**
+ * List of loaded classes
+ *
+ * @var array
+ * @access protected
+ */
protected $_ci_classes = array();
+ /**
+ * List of loaded files
+ *
+ * @var array
+ * @access protected
+ */
protected $_ci_loaded_files = array();
+ /**
+ * List of loaded models
+ *
+ * @var array
+ * @access protected
+ */
protected $_ci_models = array();
+ /**
+ * List of loaded helpers
+ *
+ * @var array
+ * @access protected
+ */
protected $_ci_helpers = array();
- protected $_ci_varmap = array('unit_test' => 'unit',
+ /**
+ * List of class name mappings
+ *
+ * @var array
+ * @access protected
+ */
+ protected $_ci_varmap = array('unit_test' => 'unit',
'user_agent' => 'agent');
/**
@@ -55,24 +128,29 @@
$this->_ci_helper_paths = array(APPPATH, BASEPATH);
$this->_ci_model_paths = array(APPPATH);
$this->_ci_view_paths = array(APPPATH.'views/' => TRUE);
-
+
log_message('debug', "Loader Class Initialized");
}
// --------------------------------------------------------------------
-
+
/**
- * Set _base_classes variable
+ * Initialize the Loader
*
* This method is called once in CI_Controller.
*
- * @param array
+ * @param array
* @return object
*/
- public function set_base_classes()
+ public function initialize()
{
+ $this->_ci_classes = array();
+ $this->_ci_loaded_files = array();
+ $this->_ci_models = array();
$this->_base_classes =& is_loaded();
-
+
+ $this->_ci_autoloader();
+
return $this;
}
@@ -96,7 +174,7 @@
{
return $this->_ci_classes[$class];
}
-
+
return FALSE;
}
@@ -366,6 +444,7 @@
* the controller class and its "view" files.
*
* @param array
+ * @param string
* @return void
*/
public function vars($vars = array(), $val = '')
@@ -507,6 +586,8 @@
* Loads a config file
*
* @param string
+ * @param bool
+ * @param bool
* @return void
*/
public function config($file = '', $use_sections = FALSE, $fail_gracefully = FALSE)
@@ -535,6 +616,11 @@
require BASEPATH.'libraries/Driver.php';
}
+ if ($library == '')
+ {
+ return FALSE;
+ }
+
// We can save the loader some time since Drivers will *always* be in a subfolder,
// and typically identically named to the library
if ( ! strpos($library, '/'))
@@ -553,13 +639,13 @@
* Prepends a parent path to the library, model, helper, and config path arrays
*
* @param string
- * @param boolean
+ * @param boolean
* @return void
*/
public function add_package_path($path, $view_cascade=TRUE)
{
$path = rtrim($path, '/').'/';
-
+
array_unshift($this->_ci_library_paths, $path);
array_unshift($this->_ci_model_paths, $path);
array_unshift($this->_ci_helper_paths, $path);
@@ -595,6 +681,7 @@
* If no path is provided, the most recently added path is removed.
*
* @param type
+ * @param bool
* @return type
*/
public function remove_package_path($path = '', $remove_config_path = TRUE)
@@ -619,7 +706,7 @@
unset($this->{$var}[$key]);
}
}
-
+
if (isset($this->_ci_view_paths[$path.'views/']))
{
unset($this->_ci_view_paths[$path.'views/']);
@@ -658,7 +745,7 @@
{
$$_ci_val = ( ! isset($_ci_data[$_ci_val])) ? FALSE : $_ci_data[$_ci_val];
}
-
+
$file_exists = FALSE;
// Set the path to the requested file
@@ -680,11 +767,11 @@
$file_exists = TRUE;
break;
}
-
+
if ( ! $cascade)
{
break;
- }
+ }
}
}
@@ -913,6 +1000,7 @@
*
* @param string
* @param string
+ * @param bool
* @param string an optional object name
* @return null
*/
@@ -935,22 +1023,22 @@
// first, global next
if (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php'))
{
- include_once($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
+ include($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
break;
}
elseif (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
{
- include_once($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
+ include($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
break;
}
elseif (file_exists($path .'config/'.strtolower($class).'.php'))
{
- include_once($path .'config/'.strtolower($class).'.php');
+ include($path .'config/'.strtolower($class).'.php');
break;
}
elseif (file_exists($path .'config/'.ucfirst(strtolower($class)).'.php'))
{
- include_once($path .'config/'.ucfirst(strtolower($class)).'.php');
+ include($path .'config/'.ucfirst(strtolower($class)).'.php');
break;
}
}
@@ -1020,23 +1108,19 @@
* The config/autoload.php file contains an array that permits sub-systems,
* libraries, and helpers to be loaded automatically.
*
- * This function is public, as it's used in the CI_Controller class.
- * However, there is no reason you should ever needs to use it.
- *
* @param array
* @return void
*/
- public function ci_autoloader()
+ private function _ci_autoloader()
{
if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload.php'))
{
- include_once(APPPATH.'config/'.ENVIRONMENT.'/autoload.php');
+ include(APPPATH.'config/'.ENVIRONMENT.'/autoload.php');
}
else
{
- include_once(APPPATH.'config/autoload.php');
+ include(APPPATH.'config/autoload.php');
}
-
if ( ! isset($autoload))
{
@@ -1122,6 +1206,7 @@
/**
* Get a reference to a specific library or model
*
+ * @param string
* @return bool
*/
protected function &_ci_get_component($component)
@@ -1138,6 +1223,7 @@
* This function preps the name of various items to make loading them more reliable.
*
* @param mixed
+ * @param string
* @return array
*/
protected function _ci_prep_filename($filename, $extension)
diff -ru CodeIgniter_2.0.3//system/core/Model.php CodeIgniter_2.1.0//system/core/Model.php
--- CodeIgniter_2.0.3//system/core/Model.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Model.php 2011-11-01 01:15:36.000000000 +0900
@@ -42,6 +42,7 @@
* Allows models to access CI's loaded classes using the same
* syntax as controllers.
*
+ * @param string
* @access private
*/
function __get($key)
diff -ru CodeIgniter_2.0.3//system/core/Output.php CodeIgniter_2.1.0//system/core/Output.php
--- CodeIgniter_2.0.3//system/core/Output.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Output.php 2011-11-01 01:15:36.000000000 +0900
@@ -28,15 +28,67 @@
*/
class CI_Output {
+ /**
+ * Current output string
+ *
+ * @var string
+ * @access protected
+ */
protected $final_output;
+ /**
+ * Cache expiration time
+ *
+ * @var int
+ * @access protected
+ */
protected $cache_expiration = 0;
+ /**
+ * List of server headers
+ *
+ * @var array
+ * @access protected
+ */
protected $headers = array();
- protected $mime_types = array();
+ /**
+ * List of mime types
+ *
+ * @var array
+ * @access protected
+ */
+ protected $mime_types = array();
+ /**
+ * Determines wether profiler is enabled
+ *
+ * @var book
+ * @access protected
+ */
protected $enable_profiler = FALSE;
+ /**
+ * Determines if output compression is enabled
+ *
+ * @var bool
+ * @access protected
+ */
protected $_zlib_oc = FALSE;
+ /**
+ * List of profiler sections
+ *
+ * @var array
+ * @access protected
+ */
protected $_profiler_sections = array();
- protected $parse_exec_vars = TRUE; // whether or not to parse variables like {elapsed_time} and {memory_usage}
+ /**
+ * Whether or not to parse variables like {elapsed_time} and {memory_usage}
+ *
+ * @var bool
+ * @access protected
+ */
+ protected $parse_exec_vars = TRUE;
+ /**
+ * Constructor
+ *
+ */
function __construct()
{
$this->_zlib_oc = @ini_get('zlib.output_compression');
@@ -127,6 +179,7 @@
*
* @access public
* @param string
+ * @param bool
* @return void
*/
function set_header($header, $replace = TRUE)
@@ -265,6 +318,7 @@
* benchmark timer so the page rendering speed and memory usage can be shown.
*
* @access public
+ * @param string
* @return mixed
*/
function _display($output = '')
@@ -401,6 +455,7 @@
* Write a Cache File
*
* @access public
+ * @param string
* @return void
*/
function _write_cache($output)
@@ -452,6 +507,8 @@
* Update/serve a cached file
*
* @access public
+ * @param object config class
+ * @param object uri class
* @return void
*/
function _display_cache(&$CFG, &$URI)
diff -ru CodeIgniter_2.0.3//system/core/Router.php CodeIgniter_2.1.0//system/core/Router.php
--- CodeIgniter_2.0.3//system/core/Router.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Router.php 2011-11-01 01:15:36.000000000 +0900
@@ -28,12 +28,54 @@
*/
class CI_Router {
+ /**
+ * Config class
+ *
+ * @var object
+ * @access public
+ */
var $config;
+ /**
+ * List of routes
+ *
+ * @var array
+ * @access public
+ */
var $routes = array();
+ /**
+ * List of error routes
+ *
+ * @var array
+ * @access public
+ */
var $error_routes = array();
+ /**
+ * Current class name
+ *
+ * @var string
+ * @access public
+ */
var $class = '';
+ /**
+ * Current method name
+ *
+ * @var string
+ * @access public
+ */
var $method = 'index';
+ /**
+ * Sub-directory that contains the requested controller class
+ *
+ * @var string
+ * @access public
+ */
var $directory = '';
+ /**
+ * Default controller (and method if specific)
+ *
+ * @var string
+ * @access public
+ */
var $default_controller;
/**
@@ -95,7 +137,7 @@
{
include(APPPATH.'config/routes.php');
}
-
+
$this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route;
unset($route);
@@ -244,7 +286,20 @@
// Does the requested controller exist in the sub-folder?
if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].'.php'))
{
- show_404($this->fetch_directory().$segments[0]);
+ if ( ! empty($this->routes['404_override']))
+ {
+ $x = explode('/', $this->routes['404_override']);
+
+ $this->set_directory('');
+ $this->set_class($x[0]);
+ $this->set_method(isset($x[1]) ? $x[1] : 'index');
+
+ return $x;
+ }
+ else
+ {
+ show_404($this->fetch_directory().$segments[0]);
+ }
}
}
else
diff -ru CodeIgniter_2.0.3//system/core/Security.php CodeIgniter_2.1.0//system/core/Security.php
--- CodeIgniter_2.0.3//system/core/Security.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/Security.php 2011-11-15 03:53:39.000000000 +0900
@@ -25,14 +25,49 @@
* @link http://codeigniter.com/user_guide/libraries/security.html
*/
class CI_Security {
-
+
+ /**
+ * Random Hash for protecting URLs
+ *
+ * @var string
+ * @access protected
+ */
protected $_xss_hash = '';
+ /**
+ * Random Hash for Cross Site Request Forgery Protection Cookie
+ *
+ * @var string
+ * @access protected
+ */
protected $_csrf_hash = '';
- protected $_csrf_expire = 7200; // Two hours (in seconds)
+ /**
+ * Expiration time for Cross Site Request Forgery Protection Cookie
+ * Defaults to two hours (in seconds)
+ *
+ * @var int
+ * @access protected
+ */
+ protected $_csrf_expire = 7200;
+ /**
+ * Token name for Cross Site Request Forgery Protection Cookie
+ *
+ * @var string
+ * @access protected
+ */
protected $_csrf_token_name = 'ci_csrf_token';
+ /**
+ * Cookie name for Cross Site Request Forgery Protection Cookie
+ *
+ * @var string
+ * @access protected
+ */
protected $_csrf_cookie_name = 'ci_csrf_token';
-
- /* never allowed, string replacement */
+ /**
+ * List of never allowed strings
+ *
+ * @var array
+ * @access protected
+ */
protected $_never_allowed_str = array(
'document.cookie' => '[removed]',
'document.write' => '[removed]',
@@ -42,17 +77,24 @@
'-moz-binding' => '[removed]',
'<!--' => '&lt;!--',
'-->' => '--&gt;',
- '<![CDATA[' => '&lt;![CDATA['
+ '<![CDATA[' => '&lt;![CDATA[',
+ '<comment>' => '&lt;comment&gt;'
);
/* never allowed, regex replacement */
+ /**
+ * List of never allowed regex replacement
+ *
+ * @var array
+ * @access protected
+ */
protected $_never_allowed_regex = array(
"javascript\s*:" => '[removed]',
"expression\s*(\(|&\#40;)" => '[removed]', // CSS and IE
"vbscript\s*:" => '[removed]', // IE, surprise!
"Redirect\s+302" => '[removed]'
);
-
+
/**
* Constructor
*/
@@ -95,7 +137,7 @@
}
// Do the tokens exist in both the _POST and _COOKIE arrays?
- if ( ! isset($_POST[$this->_csrf_token_name]) OR
+ if ( ! isset($_POST[$this->_csrf_token_name]) OR
! isset($_COOKIE[$this->_csrf_cookie_name]))
{
$this->csrf_show_error();
@@ -107,7 +149,7 @@
$this->csrf_show_error();
}
- // We kill this since we're done and we don't want to
+ // We kill this since we're done and we don't want to
// polute the _POST array
unset($_POST[$this->_csrf_token_name]);
@@ -117,7 +159,7 @@
$this->csrf_set_cookie();
log_message('debug', "CSRF token verified ");
-
+
return $this;
}
@@ -146,7 +188,7 @@
setcookie($this->_csrf_cookie_name, $this->_csrf_hash, $expire, config_item('cookie_path'), config_item('cookie_domain'), $secure_cookie);
log_message('debug', "CRSF cookie Set");
-
+
return $this;
}
@@ -165,9 +207,9 @@
// --------------------------------------------------------------------
/**
- * Get CSRF Hash
+ * Get CSRF Hash
*
- * Getter Method
+ * Getter Method
*
* @return string self::_csrf_hash
*/
@@ -215,6 +257,7 @@
* http://ha.ckers.org/xss.html
*
* @param mixed string or array
+ * @param bool
* @return string
*/
public function xss_clean($str, $is_image = FALSE)
@@ -263,7 +306,7 @@
*/
$str = preg_replace_callback("/[a-z]+=([\'\"]).*?\\1/si", array($this, '_convert_attribute'), $str);
-
+
$str = preg_replace_callback("/<\w+.*?(?=>|<|$)/si", array($this, '_decode_entity'), $str);
/*
@@ -276,7 +319,7 @@
*
* This prevents strings like this: ja vascript
* NOTE: we deal with spaces between characters later.
- * NOTE: preg_replace was found to be amazingly slow here on
+ * NOTE: preg_replace was found to be amazingly slow here on
* large blocks of data, so we use str_replace.
*/
@@ -304,8 +347,8 @@
*/
if ($is_image === TRUE)
{
- // Images have a tendency to have the PHP short opening and
- // closing tags every so often so we skip those and only
+ // Images have a tendency to have the PHP short opening and
+ // closing tags every so often so we skip those and only
// do the long opening tags.
$str = preg_replace('/<\?(php)/i', "&lt;?\\1", $str);
}
@@ -321,10 +364,10 @@
* These words are compacted back to their correct state.
*/
$words = array(
- 'javascript', 'expression', 'vbscript', 'script',
+ 'javascript', 'expression', 'vbscript', 'script',
'applet', 'alert', 'document', 'write', 'cookie', 'window'
);
-
+
foreach ($words as $word)
{
$temp = '';
@@ -341,8 +384,8 @@
/*
* Remove disallowed Javascript in links or img tags
- * We used to do some version comparisons and use of stripos for PHP5,
- * but it is dog slow compared to these simplified non-capturing
+ * We used to do some version comparisons and use of stripos for PHP5,
+ * but it is dog slow compared to these simplified non-capturing
* preg_match(), especially if the pattern exists in the string
*/
do
@@ -405,11 +448,11 @@
/*
* Images are Handled in a Special Way
- * - Essentially, we want to know that after all of the character
- * conversion is done whether any unwanted, likely XSS, code was found.
+ * - Essentially, we want to know that after all of the character
+ * conversion is done whether any unwanted, likely XSS, code was found.
* If not, we return TRUE, as the image is clean.
- * However, if the string post-conversion does not matched the
- * string post-removal of XSS, then it fails, as there was unwanted XSS
+ * However, if the string post-conversion does not matched the
+ * string post-removal of XSS, then it fails, as there was unwanted XSS
* code found and removed/changed during processing.
*/
@@ -433,15 +476,7 @@
{
if ($this->_xss_hash == '')
{
- if (phpversion() >= 4.2)
- {
- mt_srand();
- }
- else
- {
- mt_srand(hexdec(substr(md5(microtime()), -8)) & 0x7fffffff);
- }
-
+ mt_srand();
$this->_xss_hash = md5(time() + mt_rand(0, 1999999999));
}
@@ -455,14 +490,11 @@
*
* This function is a replacement for html_entity_decode()
*
- * In some versions of PHP the native function does not work
- * when UTF-8 is the specified character set, so this gives us
- * a work-around. More info here:
- * http://bugs.php.net/bug.php?id=25670
- *
- * NOTE: html_entity_decode() has a bug in some PHP versions when UTF-8 is the
- * character set, and the PHP developers said they were not back porting the
- * fix to versions other than PHP 5.x.
+ * The reason we are not using html_entity_decode() by itself is because
+ * while it is not technically correct to leave out the semicolon
+ * at the end of an entity most browsers will still interpret the entity
+ * correctly. html_entity_decode() does not convert entities without
+ * semicolons, so we are left with our own little solution here. Bummer.
*
* @param string
* @param string
@@ -470,33 +502,14 @@
*/
public function entity_decode($str, $charset='UTF-8')
{
- if (stristr($str, '&') === FALSE) return $str;
-
- // The reason we are not using html_entity_decode() by itself is because
- // while it is not technically correct to leave out the semicolon
- // at the end of an entity most browsers will still interpret the entity
- // correctly. html_entity_decode() does not convert entities without
- // semicolons, so we are left with our own little solution here. Bummer.
-
- if (function_exists('html_entity_decode') &&
- (strtolower($charset) != 'utf-8'))
- {
- $str = html_entity_decode($str, ENT_COMPAT, $charset);
- $str = preg_replace('~&#x(0*[0-9a-f]{2,5})~ei', 'chr(hexdec("\\1"))', $str);
- return preg_replace('~&#([0-9]{2,4})~e', 'chr(\\1)', $str);
- }
-
- // Numeric Entities
- $str = preg_replace('~&#x(0*[0-9a-f]{2,5});{0,1}~ei', 'chr(hexdec("\\1"))', $str);
- $str = preg_replace('~&#([0-9]{2,4});{0,1}~e', 'chr(\\1)', $str);
-
- // Literal Entities - Slightly slow so we do another check
if (stristr($str, '&') === FALSE)
{
- $str = strtr($str, array_flip(get_html_translation_table(HTML_ENTITIES)));
+ return $str;
}
- return $str;
+ $str = html_entity_decode($str, ENT_COMPAT, $charset);
+ $str = preg_replace('~&#x(0*[0-9a-f]{2,5})~ei', 'chr(hexdec("\\1"))', $str);
+ return preg_replace('~&#([0-9]{2,4})~e', 'chr(\\1)', $str);
}
// --------------------------------------------------------------------
@@ -505,6 +518,7 @@
* Filename Security
*
* @param string
+ * @param bool
* @return string
*/
public function sanitize_filename($str, $relative_path = FALSE)
@@ -542,7 +556,7 @@
"%3b", // ;
"%3d" // =
);
-
+
if ( ! $relative_path)
{
$bad[] = './';
@@ -570,7 +584,7 @@
}
// --------------------------------------------------------------------
-
+
/*
* Remove Evil HTML Attributes (like evenhandlers and style)
*
@@ -578,7 +592,7 @@
* - Everything up until a space
* For example, everything between the pipes:
* <a |style=document.write('hello');alert('world');| class=link>
- * - Everything inside the quotes
+ * - Everything inside the quotes
* For example, everything between the pipes:
* <a |style="document.write('hello'); alert('world');"| class="link">
*
@@ -589,7 +603,7 @@
protected function _remove_evil_attributes($str, $is_image)
{
// All javascript event handlers (e.g. onload, onclick, onmouseover), style, and xmlns
- $evil_attributes = array('on\w*', 'style', 'xmlns');
+ $evil_attributes = array('on\w*', 'style', 'xmlns', 'formaction');
if ($is_image === TRUE)
{
@@ -601,16 +615,36 @@
}
do {
- $str = preg_replace(
- "#<(/?[^><]+?)([^A-Za-z\-])(".implode('|', $evil_attributes).")(\s*=\s*)([\"][^>]*?[\"]|[\'][^>]*?[\']|[^>]*?)([\s><])([><]*)#i",
- "<$1$6",
- $str, -1, $count
- );
+ $count = 0;
+ $attribs = array();
+
+ // find occurrences of illegal attribute strings without quotes
+ preg_match_all("/(".implode('|', $evil_attributes).")\s*=\s*([^\s]*)/is", $str, $matches, PREG_SET_ORDER);
+
+ foreach ($matches as $attr)
+ {
+ $attribs[] = preg_quote($attr[0], '/');
+ }
+
+ // find occurrences of illegal attribute strings with quotes (042 and 047 are octal quotes)
+ preg_match_all("/(".implode('|', $evil_attributes).")\s*=\s*(\042|\047)([^\\2]*?)(\\2)/is", $str, $matches, PREG_SET_ORDER);
+
+ foreach ($matches as $attr)
+ {
+ $attribs[] = preg_quote($attr[0], '/');
+ }
+
+ // replace illegal attribute strings that are inside an html tag
+ if (count($attribs) > 0)
+ {
+ $str = preg_replace("/<(\/?[^><]+?)([^A-Za-z\-])(".implode('|', $attribs).")([\s><])([><]*)/i", '<$1$2$4$5', $str, -1, $count);
+ }
+
} while ($count);
return $str;
}
-
+
// --------------------------------------------------------------------
/**
@@ -627,7 +661,7 @@
$str = '&lt;'.$matches[1].$matches[2].$matches[3];
// encode captured opening or closing brace to prevent recursive vectors
- $str .= str_replace(array('>', '<'), array('&gt;', '&lt;'),
+ $str .= str_replace(array('>', '<'), array('&gt;', '&lt;'),
$matches[4]);
return $str;
@@ -649,7 +683,7 @@
protected function _js_link_removal($match)
{
$attributes = $this->_filter_attributes(str_replace(array('<', '>'), '', $match[1]));
-
+
return str_replace($match[1], preg_replace("#href=.*?(alert\(|alert&\#40;|javascript\:|livescript\:|mocha\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)#si", "", $attributes), $match[0]);
}
@@ -669,7 +703,7 @@
protected function _js_img_removal($match)
{
$attributes = $this->_filter_attributes(str_replace(array('<', '>'), '', $match[1]));
-
+
return str_replace($match[1], preg_replace("#src=.*?(alert\(|alert&\#40;|javascript\:|livescript\:|mocha\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)#si", "", $attributes), $match[0]);
}
@@ -729,13 +763,13 @@
}
// --------------------------------------------------------------------
-
+
/**
* Validate URL entities
*
* Called by xss_clean()
*
- * @param string
+ * @param string
* @return string
*/
protected function _validate_entities($str)
@@ -743,9 +777,9 @@
/*
* Protect GET variables in URLs
*/
-
+
// 901119URL5918AMP18930PROTECT8198
-
+
$str = preg_replace('|\&([a-z\_0-9\-]+)\=([a-z\_0-9\-]+)|i', $this->xss_hash()."\\1=\\2", $str);
/*
@@ -769,7 +803,7 @@
* Un-Protect GET variables in URLs
*/
$str = str_replace($this->xss_hash(), '&', $str);
-
+
return $str;
}
@@ -794,7 +828,7 @@
{
$str = preg_replace("#".$key."#i", $val, $str);
}
-
+
return $str;
}
@@ -809,16 +843,16 @@
{
if ($this->_csrf_hash == '')
{
- // If the cookie exists we will use it's value.
+ // If the cookie exists we will use it's value.
// We don't necessarily want to regenerate it with
- // each page load since a page could contain embedded
+ // each page load since a page could contain embedded
// sub-pages causing this feature to fail
- if (isset($_COOKIE[$this->_csrf_cookie_name]) &&
+ if (isset($_COOKIE[$this->_csrf_cookie_name]) &&
$_COOKIE[$this->_csrf_cookie_name] != '')
{
return $this->_csrf_hash = $_COOKIE[$this->_csrf_cookie_name];
}
-
+
return $this->_csrf_hash = md5(uniqid(rand(), TRUE));
}
diff -ru CodeIgniter_2.0.3//system/core/URI.php CodeIgniter_2.1.0//system/core/URI.php
--- CodeIgniter_2.0.3//system/core/URI.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/core/URI.php 2011-11-01 01:15:36.000000000 +0900
@@ -28,9 +28,34 @@
*/
class CI_URI {
+ /**
+ * List of cached uri segments
+ *
+ * @var array
+ * @access public
+ */
var $keyval = array();
+ /**
+ * Current uri string
+ *
+ * @var string
+ * @access public
+ */
var $uri_string;
+ /**
+ * List of uri segments
+ *
+ * @var array
+ * @access public
+ */
var $segments = array();
+ /**
+ * Re-indexed list of uri segments
+ * Starts at 1 instead of 0
+ *
+ * @var array
+ * @access public
+ */
var $rsegments = array();
/**
@@ -127,6 +152,7 @@
* Set the URI String
*
* @access public
+ * @param string
* @return string
*/
function _set_uri_string($str)
@@ -366,6 +392,11 @@
/**
* Identical to above only it uses the re-routed segment array
*
+ * @access public
+ * @param integer the starting segment number
+ * @param array an array of default values
+ * @return array
+ *
*/
function ruri_to_assoc($n = 3, $default = array())
{
diff -ru CodeIgniter_2.0.3//system/database/DB_active_rec.php CodeIgniter_2.1.0//system/database/DB_active_rec.php
--- CodeIgniter_2.0.3//system/database/DB_active_rec.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/DB_active_rec.php 2011-11-01 01:15:36.000000000 +0900
@@ -870,11 +870,11 @@
*/
public function limit($value, $offset = '')
{
- $this->ar_limit = $value;
+ $this->ar_limit = (int) $value;
if ($offset != '')
{
- $this->ar_offset = $offset;
+ $this->ar_offset = (int) $offset;
}
return $this;
@@ -1322,7 +1322,7 @@
{
if ($this->db_debug)
{
- return $this->display_error('db_myst_use_index');
+ return $this->display_error('db_must_use_index');
}
return FALSE;
diff -ru CodeIgniter_2.0.3//system/database/DB_cache.php CodeIgniter_2.1.0//system/database/DB_cache.php
--- CodeIgniter_2.0.3//system/database/DB_cache.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/DB_cache.php 2011-11-01 01:15:36.000000000 +0900
@@ -33,7 +33,7 @@
* Grabs the CI super object instance so we can access it.
*
*/
- function CI_DB_Cache(&$db)
+ function __construct(&$db)
{
// Assign the main CI object to $this->CI
// and load the file helper since we use it a lot
diff -ru CodeIgniter_2.0.3//system/database/DB_driver.php CodeIgniter_2.1.0//system/database/DB_driver.php
--- CodeIgniter_2.0.3//system/database/DB_driver.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/DB_driver.php 2011-11-01 01:15:36.000000000 +0900
@@ -78,7 +78,7 @@
*
* @param array
*/
- function CI_DB_driver($params)
+ function __construct($params)
{
if (is_array($params))
{
@@ -218,7 +218,7 @@
// Some DBs have functions that return the version, and don't run special
// SQL queries per se. In these instances, just return the result.
- $driver_version_exceptions = array('oci8', 'sqlite');
+ $driver_version_exceptions = array('oci8', 'sqlite', 'cubrid');
if (in_array($this->dbdriver, $driver_version_exceptions))
{
@@ -1387,4 +1387,4 @@
/* End of file DB_driver.php */
-/* Location: ./system/database/DB_driver.php */
\ No newline at end of file
+/* Location: ./system/database/DB_driver.php */
diff -ru CodeIgniter_2.0.3//system/database/DB_forge.php CodeIgniter_2.1.0//system/database/DB_forge.php
--- CodeIgniter_2.0.3//system/database/DB_forge.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/DB_forge.php 2011-11-01 01:15:36.000000000 +0900
@@ -35,7 +35,7 @@
* Grabs the CI super object instance so we can access it.
*
*/
- function CI_DB_forge()
+ function __construct()
{
// Assign the main database object to $this->db
$CI =& get_instance();
@@ -234,7 +234,7 @@
show_error('A table name is required for that operation.');
}
- $sql = $this->_rename_table($table_name, $new_table_name);
+ $sql = $this->_rename_table($this->db->dbprefix.$table_name, $this->db->dbprefix.$new_table_name);
return $this->db->query($sql);
}
diff -ru CodeIgniter_2.0.3//system/database/DB.php CodeIgniter_2.1.0//system/database/DB.php
--- CodeIgniter_2.0.3//system/database/DB.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/DB.php 2011-11-01 01:15:36.000000000 +0900
@@ -21,6 +21,8 @@
* @category Database
* @author ExpressionEngine Dev Team
* @link http://codeigniter.com/user_guide/database/
+ * @param string
+ * @param bool Determines if active record should be used or not
*/
function &DB($params = '', $active_record_override = NULL)
{
@@ -35,7 +37,7 @@
show_error('The configuration file database.php does not exist.');
}
}
-
+
include($file_path);
if ( ! isset($db) OR count($db) == 0)
diff -ru CodeIgniter_2.0.3//system/database/DB_result.php CodeIgniter_2.1.0//system/database/DB_result.php
--- CodeIgniter_2.0.3//system/database/DB_result.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/DB_result.php 2011-11-01 01:15:36.000000000 +0900
@@ -45,7 +45,7 @@
* @param string can be "object" or "array"
* @return mixed either a result object or array
*/
- function result($type = 'object')
+ public function result($type = 'object')
{
if ($type == 'array') return $this->result_array();
else if ($type == 'object') return $this->result_object();
@@ -60,7 +60,7 @@
* @param class_name A string that represents the type of object you want back
* @return array of objects
*/
- function custom_result_object($class_name)
+ public function custom_result_object($class_name)
{
if (array_key_exists($class_name, $this->custom_result_object))
{
@@ -79,12 +79,12 @@
while ($row = $this->_fetch_object())
{
$object = new $class_name();
-
+
foreach ($row as $key => $value)
{
$object->$key = $value;
}
-
+
$result_object[] = $object;
}
@@ -100,7 +100,7 @@
* @access public
* @return object
*/
- function result_object()
+ public function result_object()
{
if (count($this->result_object) > 0)
{
@@ -132,7 +132,7 @@
* @access public
* @return array
*/
- function result_array()
+ public function result_array()
{
if (count($this->result_array) > 0)
{
@@ -166,7 +166,7 @@
* @param string can be "object" or "array"
* @return mixed either a result object or array
*/
- function row($n = 0, $type = 'object')
+ public function row($n = 0, $type = 'object')
{
if ( ! is_numeric($n))
{
@@ -198,7 +198,7 @@
* @access public
* @return object
*/
- function set_row($key, $value = NULL)
+ public function set_row($key, $value = NULL)
{
// We cache the row data for subsequent uses
if ( ! is_array($this->row_data))
@@ -230,7 +230,7 @@
* @access public
* @return object
*/
- function custom_row_object($n, $type)
+ public function custom_row_object($n, $type)
{
$result = $this->custom_result_object($type);
@@ -253,7 +253,7 @@
* @access public
* @return object
*/
- function row_object($n = 0)
+ public function row_object($n = 0)
{
$result = $this->result_object();
@@ -278,7 +278,7 @@
* @access public
* @return array
*/
- function row_array($n = 0)
+ public function row_array($n = 0)
{
$result = $this->result_array();
@@ -304,7 +304,7 @@
* @access public
* @return object
*/
- function first_row($type = 'object')
+ public function first_row($type = 'object')
{
$result = $this->result($type);
@@ -323,7 +323,7 @@
* @access public
* @return object
*/
- function last_row($type = 'object')
+ public function last_row($type = 'object')
{
$result = $this->result($type);
@@ -342,7 +342,7 @@
* @access public
* @return object
*/
- function next_row($type = 'object')
+ public function next_row($type = 'object')
{
$result = $this->result($type);
@@ -367,7 +367,7 @@
* @access public
* @return object
*/
- function previous_row($type = 'object')
+ public function previous_row($type = 'object')
{
$result = $this->result($type);
@@ -394,14 +394,14 @@
* operational due to the unavailability of the database resource IDs with
* cached results.
*/
- function num_rows() { return $this->num_rows; }
- function num_fields() { return 0; }
- function list_fields() { return array(); }
- function field_data() { return array(); }
- function free_result() { return TRUE; }
- function _data_seek() { return TRUE; }
- function _fetch_assoc() { return array(); }
- function _fetch_object() { return array(); }
+ public function num_rows() { return $this->num_rows; }
+ public function num_fields() { return 0; }
+ public function list_fields() { return array(); }
+ public function field_data() { return array(); }
+ public function free_result() { return TRUE; }
+ protected function _data_seek() { return TRUE; }
+ protected function _fetch_assoc() { return array(); }
+ protected function _fetch_object() { return array(); }
}
// END DB_result class
diff -ru CodeIgniter_2.0.3//system/database/DB_utility.php CodeIgniter_2.1.0//system/database/DB_utility.php
--- CodeIgniter_2.0.3//system/database/DB_utility.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/DB_utility.php 2011-11-01 01:15:36.000000000 +0900
@@ -33,7 +33,7 @@
* Grabs the CI super object instance so we can access it.
*
*/
- function CI_DB_utility()
+ function __construct()
{
// Assign the main database object to $this->db
$CI =& get_instance();
Only in CodeIgniter_2.1.0//system/database/drivers: cubrid
diff -ru CodeIgniter_2.0.3//system/database/drivers/mssql/mssql_driver.php CodeIgniter_2.1.0//system/database/drivers/mssql/mssql_driver.php
--- CodeIgniter_2.0.3//system/database/drivers/mssql/mssql_driver.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/mssql/mssql_driver.php 2011-11-01 01:15:36.000000000 +0900
@@ -367,6 +367,7 @@
}
$row = $query->row();
+ $this->_reset_select();
return (int) $row->numrows;
}
diff -ru CodeIgniter_2.0.3//system/database/drivers/mysql/mysql_driver.php CodeIgniter_2.1.0//system/database/drivers/mysql/mysql_driver.php
--- CodeIgniter_2.0.3//system/database/drivers/mysql/mysql_driver.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/mysql/mysql_driver.php 2011-11-01 01:15:36.000000000 +0900
@@ -54,6 +54,9 @@
var $_count_string = 'SELECT COUNT(*) AS ';
var $_random_keyword = ' RAND()'; // database specific random keyword
+ // whether SET NAMES must be used to set the character set
+ var $use_set_names;
+
/**
* Non-persistent database connection
*
@@ -132,15 +135,13 @@
*/
function db_set_charset($charset, $collation)
{
- static $use_set_names;
-
- if ( ! isset($use_set_names))
+ if ( ! isset($this->use_set_names))
{
// mysql_set_charset() requires PHP >= 5.2.3 and MySQL >= 5.0.7, use SET NAMES as fallback
- $use_set_names = (version_compare(PHP_VERSION, '5.2.3', '>=') && version_compare(mysql_get_server_info(), '5.0.7', '>=')) ? FALSE : TRUE;
+ $this->use_set_names = (version_compare(PHP_VERSION, '5.2.3', '>=') && version_compare(mysql_get_server_info(), '5.0.7', '>=')) ? FALSE : TRUE;
}
- if ($use_set_names)
+ if ($this->use_set_names === TRUE)
{
return @mysql_query("SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'", $this->conn_id);
}
@@ -384,6 +385,7 @@
}
$row = $query->row();
+ $this->_reset_select();
return (int) $row->numrows;
}
@@ -439,7 +441,7 @@
*/
function _field_data($table)
{
- return "SELECT * FROM ".$table." LIMIT 1";
+ return "DESCRIBE ".$table;
}
// --------------------------------------------------------------------
diff -ru CodeIgniter_2.0.3//system/database/drivers/mysql/mysql_result.php CodeIgniter_2.1.0//system/database/drivers/mysql/mysql_result.php
--- CodeIgniter_2.0.3//system/database/drivers/mysql/mysql_result.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/mysql/mysql_result.php 2011-11-01 01:15:36.000000000 +0900
@@ -84,14 +84,19 @@
function field_data()
{
$retval = array();
- while ($field = mysql_fetch_field($this->result_id))
+ while ($field = mysql_fetch_object($this->result_id))
{
+ preg_match('/([a-zA-Z]+)(\(\d+\))?/', $field->Type, $matches);
+
+ $type = (array_key_exists(1, $matches)) ? $matches[1] : NULL;
+ $length = (array_key_exists(2, $matches)) ? preg_replace('/[^\d]/', '', $matches[2]) : NULL;
+
$F = new stdClass();
- $F->name = $field->name;
- $F->type = $field->type;
- $F->default = $field->def;
- $F->max_length = $field->max_length;
- $F->primary_key = $field->primary_key;
+ $F->name = $field->Field;
+ $F->type = $type;
+ $F->default = $field->Default;
+ $F->max_length = $length;
+ $F->primary_key = ( $field->Key == 'PRI' ? 1 : 0 );
$retval[] = $F;
}
diff -ru CodeIgniter_2.0.3//system/database/drivers/mysql/mysql_utility.php CodeIgniter_2.1.0//system/database/drivers/mysql/mysql_utility.php
--- CodeIgniter_2.0.3//system/database/drivers/mysql/mysql_utility.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/mysql/mysql_utility.php 2011-11-01 01:15:36.000000000 +0900
@@ -96,7 +96,7 @@
}
// Get the table schema
- $query = $this->db->query("SHOW CREATE TABLE `".$this->db->database.'`.'.$table);
+ $query = $this->db->query("SHOW CREATE TABLE `".$this->db->database.'`.`'.$table.'`');
// No result means the table name was invalid
if ($query === FALSE)
diff -ru CodeIgniter_2.0.3//system/database/drivers/mysqli/mysqli_driver.php CodeIgniter_2.1.0//system/database/drivers/mysqli/mysqli_driver.php
--- CodeIgniter_2.0.3//system/database/drivers/mysqli/mysqli_driver.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/mysqli/mysqli_driver.php 2011-11-15 03:31:59.000000000 +0900
@@ -54,6 +54,9 @@
*/
var $delete_hack = TRUE;
+ // whether SET NAMES must be used to set the character set
+ var $use_set_names;
+
// --------------------------------------------------------------------
/**
@@ -132,15 +135,13 @@
*/
function _db_set_charset($charset, $collation)
{
- static $use_set_names;
-
- if ( ! isset($use_set_names))
+ if ( ! isset($this->use_set_names))
{
// mysqli_set_charset() requires MySQL >= 5.0.7, use SET NAMES as fallback
- $use_set_names = (version_compare(mysqli_get_server_info($this->conn_id), '5.0.7', '>=')) ? FALSE : TRUE;
+ $this->use_set_names = (version_compare(mysqli_get_server_info($this->conn_id), '5.0.7', '>=')) ? FALSE : TRUE;
}
- if ($use_set_names)
+ if ($this->use_set_names === TRUE)
{
return @mysqli_query($this->conn_id, "SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'");
}
@@ -385,6 +386,7 @@
}
$row = $query->row();
+ $this->_reset_select();
return (int) $row->numrows;
}
@@ -440,7 +442,7 @@
*/
function _field_data($table)
{
- return "SELECT * FROM ".$table." LIMIT 1";
+ return "DESCRIBE ".$table;
}
// --------------------------------------------------------------------
@@ -568,6 +570,25 @@
{
return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values);
}
+
+ // --------------------------------------------------------------------
+
+
+ /**
+ * Replace statement
+ *
+ * Generates a platform-specific replace string from the supplied data
+ *
+ * @access public
+ * @param string the table name
+ * @param array the insert keys
+ * @param array the insert values
+ * @return string
+ */
+ function _replace($table, $keys, $values)
+ {
+ return "REPLACE INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
+ }
// --------------------------------------------------------------------
diff -ru CodeIgniter_2.0.3//system/database/drivers/mysqli/mysqli_result.php CodeIgniter_2.1.0//system/database/drivers/mysqli/mysqli_result.php
--- CodeIgniter_2.0.3//system/database/drivers/mysqli/mysqli_result.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/mysqli/mysqli_result.php 2011-11-01 01:15:36.000000000 +0900
@@ -84,21 +84,26 @@
function field_data()
{
$retval = array();
- while ($field = mysqli_fetch_field($this->result_id))
+ while ($field = mysqli_fetch_object($this->result_id))
{
+ preg_match('/([a-zA-Z]+)(\(\d+\))?/', $field->Type, $matches);
+
+ $type = (array_key_exists(1, $matches)) ? $matches[1] : NULL;
+ $length = (array_key_exists(2, $matches)) ? preg_replace('/[^\d]/', '', $matches[2]) : NULL;
+
$F = new stdClass();
- $F->name = $field->name;
- $F->type = $field->type;
- $F->default = $field->def;
- $F->max_length = $field->max_length;
- $F->primary_key = ($field->flags & MYSQLI_PRI_KEY_FLAG) ? 1 : 0;
+ $F->name = $field->Field;
+ $F->type = $type;
+ $F->default = $field->Default;
+ $F->max_length = $length;
+ $F->primary_key = ( $field->Key == 'PRI' ? 1 : 0 );
$retval[] = $F;
}
return $retval;
}
-
+
// --------------------------------------------------------------------
/**
diff -ru CodeIgniter_2.0.3//system/database/drivers/oci8/oci8_driver.php CodeIgniter_2.1.0//system/database/drivers/oci8/oci8_driver.php
--- CodeIgniter_2.0.3//system/database/drivers/oci8/oci8_driver.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/oci8/oci8_driver.php 2011-11-01 01:15:36.000000000 +0900
@@ -35,8 +35,6 @@
* This is a modification of the DB_driver class to
* permit access to oracle databases
*
- * NOTE: this uses the PHP 4 oci methods
- *
* @author Kelly McArdle
*
*/
@@ -77,9 +75,9 @@
* @access private called by the base class
* @return resource
*/
- function db_connect()
+ public function db_connect()
{
- return @ocilogon($this->username, $this->password, $this->hostname);
+ return @oci_connect($this->username, $this->password, $this->hostname, $this->char_set);
}
// --------------------------------------------------------------------
@@ -90,9 +88,9 @@
* @access private called by the base class
* @return resource
*/
- function db_pconnect()
+ public function db_pconnect()
{
- return @ociplogon($this->username, $this->password, $this->hostname);
+ return @oci_pconnect($this->username, $this->password, $this->hostname, $this->char_set);
}
// --------------------------------------------------------------------
@@ -106,9 +104,10 @@
* @access public
* @return void
*/
- function reconnect()
+ public function reconnect()
{
// not implemented in oracle
+ return;
}
// --------------------------------------------------------------------
@@ -119,8 +118,9 @@
* @access private called by the base class
* @return resource
*/
- function db_select()
+ public function db_select()
{
+ // Not in Oracle - schemas are actually usernames
return TRUE;
}
@@ -134,7 +134,7 @@
* @param string
* @return resource
*/
- function db_set_charset($charset, $collation)
+ public function db_set_charset($charset, $collation)
{
// @todo - add support if needed
return TRUE;
@@ -145,12 +145,12 @@
/**
* Version number query string
*
- * @access public
+ * @access protected
* @return string
*/
- function _version()
+ protected function _version()
{
- return ociserverversion($this->conn_id);
+ return oci_server_version($this->conn_id);
}
// --------------------------------------------------------------------
@@ -158,18 +158,18 @@
/**
* Execute the query
*
- * @access private called by the base class
+ * @access protected called by the base class
* @param string an SQL query
* @return resource
*/
- function _execute($sql)
+ protected function _execute($sql)
{
// oracle must parse the query before it is run. All of the actions with
// the query are based on the statement id returned by ociparse
$this->stmt_id = FALSE;
$this->_set_stmt_id($sql);
- ocisetprefetch($this->stmt_id, 1000);
- return @ociexecute($this->stmt_id, $this->_commit);
+ oci_set_prefetch($this->stmt_id, 1000);
+ return @oci_execute($this->stmt_id, $this->_commit);
}
/**
@@ -179,11 +179,11 @@
* @param string an SQL query
* @return none
*/
- function _set_stmt_id($sql)
+ private function _set_stmt_id($sql)
{
if ( ! is_resource($this->stmt_id))
{
- $this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql));
+ $this->stmt_id = oci_parse($this->conn_id, $this->_prep_query($sql));
}
}
@@ -198,7 +198,7 @@
* @param string an SQL query
* @return string
*/
- function _prep_query($sql)
+ private function _prep_query($sql)
{
return $sql;
}
@@ -211,9 +211,9 @@
* @access public
* @return cursor id
*/
- function get_cursor()
+ public function get_cursor()
{
- $this->curs_id = ocinewcursor($this->conn_id);
+ $this->curs_id = oci_new_cursor($this->conn_id);
return $this->curs_id;
}
@@ -237,7 +237,7 @@
* type yes the type of the parameter
* length yes the max size of the parameter
*/
- function stored_procedure($package, $procedure, $params)
+ public function stored_procedure($package, $procedure, $params)
{
if ($package == '' OR $procedure == '' OR ! is_array($params))
{
@@ -257,7 +257,7 @@
{
$sql .= $param['name'] . ",";
- if (array_key_exists('type', $param) && ($param['type'] == OCI_B_CURSOR))
+ if (array_key_exists('type', $param) && ($param['type'] === OCI_B_CURSOR))
{
$have_cursor = TRUE;
}
@@ -278,7 +278,7 @@
* @access private
* @return none
*/
- function _bind_params($params)
+ private function _bind_params($params)
{
if ( ! is_array($params) OR ! is_resource($this->stmt_id))
{
@@ -295,7 +295,7 @@
}
}
- ocibindbyname($this->stmt_id, $param['name'], $param['value'], $param['length'], $param['type']);
+ oci_bind_by_name($this->stmt_id, $param['name'], $param['value'], $param['length'], $param['type']);
}
}
@@ -307,7 +307,7 @@
* @access public
* @return bool
*/
- function trans_begin($test_mode = FALSE)
+ public function trans_begin($test_mode = FALSE)
{
if ( ! $this->trans_enabled)
{
@@ -337,7 +337,7 @@
* @access public
* @return bool
*/
- function trans_commit()
+ public function trans_commit()
{
if ( ! $this->trans_enabled)
{
@@ -350,7 +350,7 @@
return TRUE;
}
- $ret = OCIcommit($this->conn_id);
+ $ret = oci_commit($this->conn_id);
$this->_commit = OCI_COMMIT_ON_SUCCESS;
return $ret;
}
@@ -363,7 +363,7 @@
* @access public
* @return bool
*/
- function trans_rollback()
+ public function trans_rollback()
{
if ( ! $this->trans_enabled)
{
@@ -376,7 +376,7 @@
return TRUE;
}
- $ret = OCIrollback($this->conn_id);
+ $ret = oci_rollback($this->conn_id);
$this->_commit = OCI_COMMIT_ON_SUCCESS;
return $ret;
}
@@ -391,7 +391,7 @@
* @param bool whether or not the string will be used in a LIKE condition
* @return string
*/
- function escape_str($str, $like = FALSE)
+ public function escape_str($str, $like = FALSE)
{
if (is_array($str))
{
@@ -424,9 +424,9 @@
* @access public
* @return integer
*/
- function affected_rows()
+ public function affected_rows()
{
- return @ocirowcount($this->stmt_id);
+ return @oci_num_rows($this->stmt_id);
}
// --------------------------------------------------------------------
@@ -437,7 +437,7 @@
* @access public
* @return integer
*/
- function insert_id()
+ public function insert_id()
{
// not supported in oracle
return $this->display_error('db_unsupported_function');
@@ -455,7 +455,7 @@
* @param string
* @return string
*/
- function count_all($table = '')
+ public function count_all($table = '')
{
if ($table == '')
{
@@ -470,6 +470,7 @@
}
$row = $query->row();
+ $this->_reset_select();
return (int) $row->numrows;
}
@@ -480,11 +481,11 @@
*
* Generates a platform-specific query string so that the table names can be fetched
*
- * @access private
+ * @access protected
* @param boolean
- * @return string
+ * @return string
*/
- function _list_tables($prefix_limit = FALSE)
+ protected function _list_tables($prefix_limit = FALSE)
{
$sql = "SELECT TABLE_NAME FROM ALL_TABLES";
@@ -503,11 +504,11 @@
*
* Generates a platform-specific query string so that the column names can be fetched
*
- * @access public
+ * @access protected
* @param string the table name
* @return string
*/
- function _list_columns($table = '')
+ protected function _list_columns($table = '')
{
return "SELECT COLUMN_NAME FROM all_tab_columns WHERE table_name = '$table'";
}
@@ -523,7 +524,7 @@
* @param string the table name
* @return object
*/
- function _field_data($table)
+ protected function _field_data($table)
{
return "SELECT * FROM ".$table." where rownum = 1";
}
@@ -533,12 +534,13 @@
/**
* The error message string
*
- * @access private
+ * @access protected
* @return string
*/
- function _error_message()
+ protected function _error_message()
{
- $error = ocierror($this->conn_id);
+ // If the error was during connection, no conn_id should be passed
+ $error = is_resource($this->conn_id) ? oci_error($this->conn_id) : oci_error();
return $error['message'];
}
@@ -547,12 +549,13 @@
/**
* The error message number
*
- * @access private
+ * @access protected
* @return integer
*/
- function _error_number()
+ protected function _error_number()
{
- $error = ocierror($this->conn_id);
+ // Same as _error_message()
+ $error = is_resource($this->conn_id) ? oci_error($this->conn_id) : oci_error();
return $error['code'];
}
@@ -563,11 +566,11 @@
*
* This function escapes column and table names
*
- * @access private
+ * @access protected
* @param string
* @return string
*/
- function _escape_identifiers($item)
+ protected function _escape_identifiers($item)
{
if ($this->_escape_char == '')
{
@@ -606,11 +609,11 @@
* This function implicitly groups FROM tables so there is no confusion
* about operator precedence in harmony with SQL standards
*
- * @access public
+ * @access protected
* @param type
* @return type
*/
- function _from_tables($tables)
+ protected function _from_tables($tables)
{
if ( ! is_array($tables))
{
@@ -633,9 +636,37 @@
* @param array the insert values
* @return string
*/
- function _insert($table, $keys, $values)
+ protected function _insert($table, $keys, $values)
{
- return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
+ return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Insert_batch statement
+ *
+ * Generates a platform-specific insert string from the supplied data
+ *
+ * @access protected
+ * @param string the table name
+ * @param array the insert keys
+ * @param array the insert values
+ * @return string
+ */
+ protected function _insert_batch($table, $keys, $values)
+ {
+ $keys = implode(', ', $keys);
+ $sql = "INSERT ALL\n";
+
+ for ($i = 0, $c = count($values); $i < $c; $i++)
+ {
+ $sql .= ' INTO ' . $table . ' (' . $keys . ') VALUES ' . $values[$i] . "\n";
+ }
+
+ $sql .= 'SELECT * FROM dual';
+
+ return $sql;
}
// --------------------------------------------------------------------
@@ -645,7 +676,7 @@
*
* Generates a platform-specific update string from the supplied data
*
- * @access public
+ * @access protected
* @param string the table name
* @param array the update data
* @param array the where clause
@@ -653,7 +684,7 @@
* @param array the limit clause
* @return string
*/
- function _update($table, $values, $where, $orderby = array(), $limit = FALSE)
+ protected function _update($table, $values, $where, $orderby = array(), $limit = FALSE)
{
foreach ($values as $key => $val)
{
@@ -682,11 +713,11 @@
* If the database does not support the truncate() command
* This function maps to "DELETE FROM table"
*
- * @access public
+ * @access protected
* @param string the table name
* @return string
*/
- function _truncate($table)
+ protected function _truncate($table)
{
return "TRUNCATE TABLE ".$table;
}
@@ -698,13 +729,13 @@
*
* Generates a platform-specific delete string from the supplied data
*
- * @access public
+ * @access protected
* @param string the table name
* @param array the where clause
* @param string the limit clause
* @return string
*/
- function _delete($table, $where = array(), $like = array(), $limit = FALSE)
+ protected function _delete($table, $where = array(), $like = array(), $limit = FALSE)
{
$conditions = '';
@@ -732,13 +763,13 @@
*
* Generates a platform-specific LIMIT clause
*
- * @access public
+ * @access protected
* @param string the sql query string
* @param integer the number of rows to limit the query to
* @param integer the offset value
* @return string
*/
- function _limit($sql, $limit, $offset)
+ protected function _limit($sql, $limit, $offset)
{
$limit = $offset + $limit;
$newsql = "SELECT * FROM (select inner_query.*, rownum rnum FROM ($sql) inner_query WHERE rownum < $limit)";
@@ -759,13 +790,13 @@
/**
* Close DB Connection
*
- * @access public
+ * @access protected
* @param resource
* @return void
*/
- function _close($conn_id)
+ protected function _close($conn_id)
{
- @ocilogoff($conn_id);
+ @oci_close($conn_id);
}
@@ -774,4 +805,4 @@
/* End of file oci8_driver.php */
-/* Location: ./system/database/drivers/oci8/oci8_driver.php */
\ No newline at end of file
+/* Location: ./system/database/drivers/oci8/oci8_driver.php */
diff -ru CodeIgniter_2.0.3//system/database/drivers/oci8/oci8_result.php CodeIgniter_2.1.0//system/database/drivers/oci8/oci8_result.php
--- CodeIgniter_2.0.3//system/database/drivers/oci8/oci8_result.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/oci8/oci8_result.php 2011-11-01 01:15:36.000000000 +0900
@@ -40,14 +40,17 @@
* @access public
* @return integer
*/
- function num_rows()
+ public function num_rows()
{
- $rowcount = count($this->result_array());
- @ociexecute($this->stmt_id);
-
- if ($this->curs_id)
+ if ($this->num_rows === 0 && count($this->result_array()) > 0)
{
- @ociexecute($this->curs_id);
+ $this->num_rows = count($this->result_array());
+ @oci_execute($this->stmt_id);
+
+ if ($this->curs_id)
+ {
+ @oci_execute($this->curs_id);
+ }
}
return $rowcount;
@@ -61,9 +64,9 @@
* @access public
* @return integer
*/
- function num_fields()
+ public function num_fields()
{
- $count = @ocinumcols($this->stmt_id);
+ $count = @oci_num_fields($this->stmt_id);
// if we used a limit we subtract it
if ($this->limit_used)
@@ -84,13 +87,12 @@
* @access public
* @return array
*/
- function list_fields()
+ public function list_fields()
{
$field_names = array();
- $fieldCount = $this->num_fields();
- for ($c = 1; $c <= $fieldCount; $c++)
+ for ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++)
{
- $field_names[] = ocicolumnname($this->stmt_id, $c);
+ $field_names[] = oci_field_name($this->stmt_id, $c);
}
return $field_names;
}
@@ -105,16 +107,15 @@
* @access public
* @return array
*/
- function field_data()
+ public function field_data()
{
$retval = array();
- $fieldCount = $this->num_fields();
- for ($c = 1; $c <= $fieldCount; $c++)
+ for ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++)
{
- $F = new stdClass();
- $F->name = ocicolumnname($this->stmt_id, $c);
- $F->type = ocicolumntype($this->stmt_id, $c);
- $F->max_length = ocicolumnsize($this->stmt_id, $c);
+ $F = new stdClass();
+ $F->name = oci_field_name($this->stmt_id, $c);
+ $F->type = oci_field_type($this->stmt_id, $c);
+ $F->max_length = oci_field_size($this->stmt_id, $c);
$retval[] = $F;
}
@@ -129,11 +130,11 @@
*
* @return null
*/
- function free_result()
+ public function free_result()
{
if (is_resource($this->result_id))
{
- ocifreestatement($this->result_id);
+ oci_free_statement($this->result_id);
$this->result_id = FALSE;
}
}
@@ -145,14 +146,13 @@
*
* Returns the result set as an array
*
- * @access private
+ * @access protected
* @return array
*/
- function _fetch_assoc(&$row)
+ protected function _fetch_assoc()
{
$id = ($this->curs_id) ? $this->curs_id : $this->stmt_id;
-
- return ocifetchinto($id, $row, OCI_ASSOC + OCI_RETURN_NULLS);
+ return oci_fetch_assoc($id);
}
// --------------------------------------------------------------------
@@ -162,41 +162,13 @@
*
* Returns the result set as an object
*
- * @access private
+ * @access protected
* @return object
*/
- function _fetch_object()
+ protected function _fetch_object()
{
- $result = array();
-
- // If PHP 5 is being used we can fetch an result object
- if (function_exists('oci_fetch_object'))
- {
- $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id;
-
- return @oci_fetch_object($id);
- }
-
- // If PHP 4 is being used we have to build our own result
- foreach ($this->result_array() as $key => $val)
- {
- $obj = new stdClass();
- if (is_array($val))
- {
- foreach ($val as $k => $v)
- {
- $obj->$k = $v;
- }
- }
- else
- {
- $obj->$key = $val;
- }
-
- $result[] = $obj;
- }
-
- return $result;
+ $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id;
+ return @oci_fetch_object($id);
}
// --------------------------------------------------------------------
@@ -207,17 +179,15 @@
* @access public
* @return array
*/
- function result_array()
+ public function result_array()
{
if (count($this->result_array) > 0)
{
return $this->result_array;
}
- // oracle's fetch functions do not return arrays.
- // The information is returned in reference parameters
$row = NULL;
- while ($this->_fetch_assoc($row))
+ while ($row = $this->_fetch_assoc())
{
$this->result_array[] = $row;
}
@@ -234,10 +204,10 @@
* this internally before fetching results to make sure the
* result set starts at zero
*
- * @access private
+ * @access protected
* @return array
*/
- function _data_seek($n = 0)
+ protected function _data_seek($n = 0)
{
return FALSE; // Not needed
}
@@ -246,4 +216,4 @@
/* End of file oci8_result.php */
-/* Location: ./system/database/drivers/oci8/oci8_result.php */
\ No newline at end of file
+/* Location: ./system/database/drivers/oci8/oci8_result.php */
diff -ru CodeIgniter_2.0.3//system/database/drivers/odbc/odbc_driver.php CodeIgniter_2.1.0//system/database/drivers/odbc/odbc_driver.php
--- CodeIgniter_2.0.3//system/database/drivers/odbc/odbc_driver.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/odbc/odbc_driver.php 2011-11-01 01:15:36.000000000 +0900
@@ -48,9 +48,9 @@
var $_random_keyword;
- function CI_DB_odbc_driver($params)
+ function __construct($params)
{
- parent::CI_DB($params);
+ parent::__construct($params);
$this->_random_keyword = ' RND('.time().')'; // database specific random keyword
}
@@ -339,6 +339,7 @@
}
$row = $query->row();
+ $this->_reset_select();
return (int) $row->numrows;
}
Only in CodeIgniter_2.1.0//system/database/drivers: pdo
diff -ru CodeIgniter_2.0.3//system/database/drivers/postgre/postgre_driver.php CodeIgniter_2.1.0//system/database/drivers/postgre/postgre_driver.php
--- CodeIgniter_2.0.3//system/database/drivers/postgre/postgre_driver.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/postgre/postgre_driver.php 2011-11-01 01:15:36.000000000 +0900
@@ -385,6 +385,7 @@
}
$row = $query->row();
+ $this->_reset_select();
return (int) $row->numrows;
}
diff -ru CodeIgniter_2.0.3//system/database/drivers/sqlite/sqlite_driver.php CodeIgniter_2.1.0//system/database/drivers/sqlite/sqlite_driver.php
--- CodeIgniter_2.0.3//system/database/drivers/sqlite/sqlite_driver.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/sqlite/sqlite_driver.php 2011-11-01 01:15:36.000000000 +0900
@@ -354,6 +354,7 @@
}
$row = $query->row();
+ $this->_reset_select();
return (int) $row->numrows;
}
diff -ru CodeIgniter_2.0.3//system/database/drivers/sqlsrv/sqlsrv_driver.php CodeIgniter_2.1.0//system/database/drivers/sqlsrv/sqlsrv_driver.php
--- CodeIgniter_2.0.3//system/database/drivers/sqlsrv/sqlsrv_driver.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/database/drivers/sqlsrv/sqlsrv_driver.php 2011-11-01 01:15:36.000000000 +0900
@@ -344,6 +344,7 @@
return '0';
$row = $query->row();
+ $this->_reset_select();
return $row->numrows;
}
diff -ru CodeIgniter_2.0.3//system/helpers/date_helper.php CodeIgniter_2.1.0//system/helpers/date_helper.php
--- CodeIgniter_2.0.3//system/helpers/date_helper.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/helpers/date_helper.php 2011-11-15 03:31:59.000000000 +0900
@@ -116,7 +116,7 @@
'DATE_COOKIE' => '%l, %d-%M-%y %H:%i:%s UTC',
'DATE_ISO8601' => '%Y-%m-%dT%H:%i:%s%Q',
'DATE_RFC822' => '%D, %d %M %y %H:%i:%s %O',
- 'DATE_RFC850' => '%l, %d-%M-%y %H:%m:%i UTC',
+ 'DATE_RFC850' => '%l, %d-%M-%y %H:%i:%s UTC',
'DATE_RFC1036' => '%D, %d %M %y %H:%i:%s %O',
'DATE_RFC1123' => '%D, %d %M %Y %H:%i:%s %O',
'DATE_RSS' => '%D, %d %M %Y %H:%i:%s %O',
diff -ru CodeIgniter_2.0.3//system/helpers/form_helper.php CodeIgniter_2.1.0//system/helpers/form_helper.php
--- CodeIgniter_2.0.3//system/helpers/form_helper.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/helpers/form_helper.php 2011-11-15 03:31:59.000000000 +0900
@@ -64,8 +64,8 @@
$form .= '>';
- // CSRF
- if ($CI->config->item('csrf_protection') === TRUE)
+ // Add CSRF field if enabled, but leave it out for GET requests and requests to external websites
+ if ($CI->config->item('csrf_protection') === TRUE AND ! (strpos($action, $CI->config->site_url()) === FALSE OR strpos($form, 'method="get"')))
{
$hidden[$CI->security->get_csrf_token_name()] = $CI->security->get_csrf_hash();
}
@@ -94,7 +94,7 @@
*/
if ( ! function_exists('form_open_multipart'))
{
- function form_open_multipart($action, $attributes = array(), $hidden = array())
+ function form_open_multipart($action = '', $attributes = array(), $hidden = array())
{
if (is_string($attributes))
{
@@ -249,7 +249,7 @@
{
function form_textarea($data = '', $value = '', $extra = '')
{
- $defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '90', 'rows' => '12');
+ $defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '40', 'rows' => '10');
if ( ! is_array($data) OR ! isset($data['value']))
{
diff -ru CodeIgniter_2.0.3//system/helpers/string_helper.php CodeIgniter_2.1.0//system/helpers/string_helper.php
--- CodeIgniter_2.0.3//system/helpers/string_helper.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/helpers/string_helper.php 2011-11-01 01:15:36.000000000 +0900
@@ -243,6 +243,23 @@
// ------------------------------------------------------------------------
/**
+ * Add's _1 to a string or increment the ending number to allow _2, _3, etc
+ *
+ * @param string $str required
+ * @param string $separator What should the duplicate number be appended with
+ * @param string $first Which number should be used for the first dupe increment
+ * @return string
+ */
+function increment_string($str, $separator = '_', $first = 1)
+{
+ preg_match('/(.+)'.$separator.'([0-9]+)$/', $str, $match);
+
+ return isset($match[2]) ? $match[1].$separator.($match[2] + 1) : $str.$separator.$first;
+}
+
+// ------------------------------------------------------------------------
+
+/**
* Alternator
*
* Allows strings to be alternated. See docs...
diff -ru CodeIgniter_2.0.3//system/language/english/form_validation_lang.php CodeIgniter_2.1.0//system/language/english/form_validation_lang.php
--- CodeIgniter_2.0.3//system/language/english/form_validation_lang.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/language/english/form_validation_lang.php 2011-11-01 01:15:36.000000000 +0900
@@ -17,6 +17,7 @@
$lang['integer'] = "The %s field must contain an integer.";
$lang['regex_match'] = "The %s field is not in the correct format.";
$lang['matches'] = "The %s field does not match the %s field.";
+$lang['is_unique'] = "The %s field must contain a unique value.";
$lang['is_natural'] = "The %s field must contain only positive numbers.";
$lang['is_natural_no_zero'] = "The %s field must contain a number greater than zero.";
$lang['decimal'] = "The %s field must contain a decimal number.";
Only in CodeIgniter_2.1.0//system/language/english: migration_lang.php
diff -ru CodeIgniter_2.0.3//system/libraries/Cache/drivers/Cache_apc.php CodeIgniter_2.1.0//system/libraries/Cache/drivers/Cache_apc.php
--- CodeIgniter_2.0.3//system/libraries/Cache/drivers/Cache_apc.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/libraries/Cache/drivers/Cache_apc.php 2011-11-01 01:15:36.000000000 +0900
@@ -132,7 +132,7 @@
*/
public function is_supported()
{
- if ( ! extension_loaded('apc') OR ! function_exists('apc_store'))
+ if ( ! extension_loaded('apc') OR ini_get('apc.enabled') != "1")
{
log_message('error', 'The APC PHP extension must be loaded to use APC Cache.');
return FALSE;
@@ -148,4 +148,4 @@
// End Class
/* End of file Cache_apc.php */
-/* Location: ./system/libraries/Cache/drivers/Cache_apc.php */
\ No newline at end of file
+/* Location: ./system/libraries/Cache/drivers/Cache_apc.php */
diff -ru CodeIgniter_2.0.3//system/libraries/Cache/drivers/Cache_memcached.php CodeIgniter_2.1.0//system/libraries/Cache/drivers/Cache_memcached.php
--- CodeIgniter_2.0.3//system/libraries/Cache/drivers/Cache_memcached.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/libraries/Cache/drivers/Cache_memcached.php 2011-11-01 01:15:36.000000000 +0900
@@ -64,7 +64,16 @@
*/
public function save($id, $data, $ttl = 60)
{
- return $this->_memcached->add($id, array($data, time(), $ttl), $ttl);
+ if (get_class($this->_memcached) == 'Memcached')
+ {
+ return $this->_memcached->set($id, array($data, time(), $ttl), $ttl);
+ }
+ else if (get_class($this->_memcached) == 'Memcache')
+ {
+ return $this->_memcached->set($id, array($data, time(), $ttl), 0, $ttl);
+ }
+
+ return FALSE;
}
// ------------------------------------------------------------------------
diff -ru CodeIgniter_2.0.3//system/libraries/Cart.php CodeIgniter_2.1.0//system/libraries/Cart.php
--- CodeIgniter_2.0.3//system/libraries/Cart.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/libraries/Cart.php 2011-11-01 01:15:36.000000000 +0900
@@ -99,7 +99,7 @@
$save_cart = FALSE;
if (isset($items['id']))
{
- if ($this->_insert($items) == TRUE)
+ if (($rowid = $this->_insert($items)))
{
$save_cart = TRUE;
}
@@ -110,7 +110,7 @@
{
if (is_array($val) AND isset($val['id']))
{
- if ($this->_insert($val) == TRUE)
+ if ($this->_insert($val))
{
$save_cart = TRUE;
}
@@ -122,7 +122,7 @@
if ($save_cart == TRUE)
{
$this->_save_cart();
- return TRUE;
+ return isset($rowid) ? $rowid : TRUE;
}
return FALSE;
@@ -244,7 +244,7 @@
}
// Woot!
- return TRUE;
+ return $rowid;
}
// --------------------------------------------------------------------
diff -ru CodeIgniter_2.0.3//system/libraries/Driver.php CodeIgniter_2.1.0//system/libraries/Driver.php
--- CodeIgniter_2.0.3//system/libraries/Driver.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/libraries/Driver.php 2011-11-01 01:15:36.000000000 +0900
@@ -54,7 +54,7 @@
if ( ! class_exists($child_class))
{
// check application path first
- foreach (array(APPPATH, BASEPATH) as $path)
+ foreach (get_instance()->load->get_package_paths(TRUE) as $path)
{
// loves me some nesting!
foreach (array(ucfirst($driver_name), $driver_name) as $class)
@@ -226,4 +226,4 @@
// END CI_Driver CLASS
/* End of file Driver.php */
-/* Location: ./system/libraries/Driver.php */
+/* Location: ./system/libraries/Driver.php */
\ No newline at end of file
diff -ru CodeIgniter_2.0.3//system/libraries/Email.php CodeIgniter_2.1.0//system/libraries/Email.php
--- CodeIgniter_2.0.3//system/libraries/Email.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/libraries/Email.php 2011-11-15 03:31:59.000000000 +0900
@@ -36,6 +36,7 @@
var $smtp_pass = ""; // SMTP Password
var $smtp_port = "25"; // SMTP Port
var $smtp_timeout = 5; // SMTP Timeout in seconds
+ var $smtp_crypto = ""; // SMTP Encryption. Can be null, tls or ssl.
var $wordwrap = TRUE; // TRUE/FALSE Turns word-wrap on/off
var $wrapchars = "76"; // Number of characters to wrap at.
var $mailtype = "text"; // text/html Defines email formatting
@@ -379,7 +380,19 @@
*/
public function message($body)
{
- $this->_body = stripslashes(rtrim(str_replace("\r", "", $body)));
+ $this->_body = rtrim(str_replace("\r", "", $body));
+
+ /* strip slashes only if magic quotes is ON
+ if we do it with magic quotes OFF, it strips real, user-inputted chars.
+
+ NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and
+ it will probably not exist in future versions at all.
+ */
+ if ( ! is_php('5.4') && get_magic_quotes_gpc())
+ {
+ $this->_body = stripslashes($this->_body);
+ }
+
return $this;
}
@@ -405,12 +418,12 @@
/**
* Add a Header Item
*
- * @access private
+ * @access protected
* @param string
* @param string
* @return void
*/
- private function _set_header($header, $value)
+ protected function _set_header($header, $value)
{
$this->_headers[$header] = $value;
}
@@ -420,11 +433,11 @@
/**
* Convert a String to an Array
*
- * @access private
+ * @access protected
* @param string
* @return array
*/
- private function _str_to_array($email)
+ protected function _str_to_array($email)
{
if ( ! is_array($email))
{
@@ -452,7 +465,7 @@
*/
public function set_alt_message($str = '')
{
- $this->alt_message = ($str == '') ? '' : $str;
+ $this->alt_message = $str;
return $this;
}
@@ -577,10 +590,10 @@
/**
* Set Message Boundary
*
- * @access private
+ * @access protected
* @return void
*/
- private function _set_boundaries()
+ protected function _set_boundaries()
{
$this->_alt_boundary = "B_ALT_".uniqid(''); // multipart/alternative
$this->_atc_boundary = "B_ATC_".uniqid(''); // attachment boundary
@@ -591,10 +604,10 @@
/**
* Get the Message ID
*
- * @access private
+ * @access protected
* @return string
*/
- private function _get_message_id()
+ protected function _get_message_id()
{
$from = $this->_headers['Return-Path'];
$from = str_replace(">", "", $from);
@@ -608,11 +621,11 @@
/**
* Get Mail Protocol
*
- * @access private
+ * @access protected
* @param bool
* @return string
*/
- private function _get_protocol($return = TRUE)
+ protected function _get_protocol($return = TRUE)
{
$this->protocol = strtolower($this->protocol);
$this->protocol = ( ! in_array($this->protocol, $this->_protocols, TRUE)) ? 'mail' : $this->protocol;
@@ -628,11 +641,11 @@
/**
* Get Mail Encoding
*
- * @access private
+ * @access protected
* @param bool
* @return string
*/
- private function _get_encoding($return = TRUE)
+ protected function _get_encoding($return = TRUE)
{
$this->_encoding = ( ! in_array($this->_encoding, $this->_bit_depths)) ? '8bit' : $this->_encoding;
@@ -655,10 +668,10 @@
/**
* Get content type (text/html/attachment)
*
- * @access private
+ * @access protected
* @return string
*/
- private function _get_content_type()
+ protected function _get_content_type()
{
if ($this->mailtype == 'html' && count($this->_attach_name) == 0)
{
@@ -683,10 +696,10 @@
/**
* Set RFC 822 Date
*
- * @access private
+ * @access protected
* @return string
*/
- private function _set_date()
+ protected function _set_date()
{
$timezone = date("Z");
$operator = (strncmp($timezone, '-', 1) == 0) ? '-' : '+';
@@ -701,10 +714,10 @@
/**
* Mime message
*
- * @access private
+ * @access protected
* @return string
*/
- private function _get_mime_message()
+ protected function _get_mime_message()
{
return "This is a multi-part message in MIME format.".$this->newline."Your email application may not support this format.";
}
@@ -802,10 +815,10 @@
* If the user hasn't specified his own alternative message
* it creates one by stripping the HTML
*
- * @access private
+ * @access protected
* @return string
*/
- private function _get_alt_message()
+ protected function _get_alt_message()
{
if ($this->alt_message != "")
{
@@ -941,11 +954,11 @@
/**
* Build final headers
*
- * @access private
+ * @access protected
* @param string
* @return string
*/
- private function _build_headers()
+ protected function _build_headers()
{
$this->_set_header('X-Sender', $this->clean_email($this->_headers['From']));
$this->_set_header('X-Mailer', $this->useragent);
@@ -959,10 +972,10 @@
/**
* Write Headers as a string
*
- * @access private
+ * @access protected
* @return void
*/
- private function _write_headers()
+ protected function _write_headers()
{
if ($this->protocol == 'mail')
{
@@ -994,10 +1007,10 @@
/**
* Build Final Body and attachments
*
- * @access private
+ * @access protected
* @return void
*/
- private function _build_message()
+ protected function _build_message()
{
if ($this->wordwrap === TRUE AND $this->mailtype != 'html')
{
@@ -1177,12 +1190,12 @@
* Prepares string for Quoted-Printable Content-Transfer-Encoding
* Refer to RFC 2045 http://www.ietf.org/rfc/rfc2045.txt
*
- * @access private
+ * @access protected
* @param string
* @param integer
* @return string
*/
- private function _prep_quoted_printable($str, $charlim = '')
+ protected function _prep_quoted_printable($str, $charlim = '')
{
// Set the character limit
// Don't allow over 76, as that will make servers and MUAs barf
@@ -1275,7 +1288,7 @@
* @param bool // set to TRUE for processing From: headers
* @return str
*/
- private function _prep_q_encoding($str, $from = FALSE)
+ protected function _prep_q_encoding($str, $from = FALSE)
{
$str = str_replace(array("\r", "\n"), array('', ''), $str);
@@ -1440,10 +1453,10 @@
/**
* Unwrap special elements
*
- * @access private
+ * @access protected
* @return void
*/
- private function _unwrap_specials()
+ protected function _unwrap_specials()
{
$this->_finalbody = preg_replace_callback("/\{unwrap\}(.*?)\{\/unwrap\}/si", array($this, '_remove_nl_callback'), $this->_finalbody);
}
@@ -1453,10 +1466,10 @@
/**
* Strip line-breaks via callback
*
- * @access private
+ * @access protected
* @return string
*/
- private function _remove_nl_callback($matches)
+ protected function _remove_nl_callback($matches)
{
if (strpos($matches[1], "\r") !== FALSE OR strpos($matches[1], "\n") !== FALSE)
{
@@ -1471,10 +1484,10 @@
/**
* Spool mail to the mail server
*
- * @access private
+ * @access protected
* @return bool
*/
- private function _spool_email()
+ protected function _spool_email()
{
$this->_unwrap_specials();
@@ -1516,10 +1529,10 @@
/**
* Send using mail()
*
- * @access private
+ * @access protected
* @return bool
*/
- private function _send_with_mail()
+ protected function _send_with_mail()
{
if ($this->_safe_mode == TRUE)
{
@@ -1553,10 +1566,10 @@
/**
* Send using Sendmail
*
- * @access private
+ * @access protected
* @return bool
*/
- private function _send_with_sendmail()
+ protected function _send_with_sendmail()
{
$fp = @popen($this->mailpath . " -oi -f ".$this->clean_email($this->_headers['From'])." -t", 'w');
@@ -1591,10 +1604,10 @@
/**
* Send using SMTP
*
- * @access private
+ * @access protected
* @return bool
*/
- private function _send_with_smtp()
+ protected function _send_with_smtp()
{
if ($this->smtp_host == '')
{
@@ -1660,13 +1673,16 @@
/**
* SMTP Connect
*
- * @access private
+ * @access protected
* @param string
* @return string
*/
- private function _smtp_connect()
+ protected function _smtp_connect()
{
- $this->_smtp_connect = fsockopen($this->smtp_host,
+ $ssl = NULL;
+ if ($this->smtp_crypto == 'ssl')
+ $ssl = 'ssl://';
+ $this->_smtp_connect = fsockopen($ssl.$this->smtp_host,
$this->smtp_port,
$errno,
$errstr,
@@ -1679,6 +1695,14 @@
}
$this->_set_error_message($this->_get_smtp_data());
+
+ if ($this->smtp_crypto == 'tls')
+ {
+ $this->_send_command('hello');
+ $this->_send_command('starttls');
+ stream_socket_enable_crypto($this->_smtp_connect, TRUE, STREAM_CRYPTO_METHOD_TLS_CLIENT);
+ }
+
return $this->_send_command('hello');
}
@@ -1687,12 +1711,12 @@
/**
* Send SMTP command
*
- * @access private
+ * @access protected
* @param string
* @param string
* @return string
*/
- private function _send_command($cmd, $data = '')
+ protected function _send_command($cmd, $data = '')
{
switch ($cmd)
{
@@ -1705,6 +1729,12 @@
$resp = 250;
break;
+ case 'starttls' :
+
+ $this->_send_data('STARTTLS');
+
+ $resp = 220;
+ break;
case 'from' :
$this->_send_data('MAIL FROM:<'.$data.'>');
@@ -1754,10 +1784,10 @@
/**
* SMTP Authenticate
*
- * @access private
+ * @access protected
* @return bool
*/
- private function _smtp_authenticate()
+ protected function _smtp_authenticate()
{
if ( ! $this->_smtp_auth)
{
@@ -1808,10 +1838,10 @@
/**
* Send SMTP data
*
- * @access private
+ * @access protected
* @return bool
*/
- private function _send_data($data)
+ protected function _send_data($data)
{
if ( ! fwrite($this->_smtp_connect, $data . $this->newline))
{
@@ -1829,10 +1859,10 @@
/**
* Get SMTP data
*
- * @access private
+ * @access protected
* @return string
*/
- private function _get_smtp_data()
+ protected function _get_smtp_data()
{
$data = "";
@@ -1854,10 +1884,10 @@
/**
* Get Hostname
*
- * @access private
+ * @access protected
* @return string
*/
- private function _get_hostname()
+ protected function _get_hostname()
{
return (isset($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : 'localhost.localdomain';
}
@@ -1867,10 +1897,10 @@
/**
* Get IP
*
- * @access private
+ * @access protected
* @return string
*/
- private function _get_ip()
+ protected function _get_ip()
{
if ($this->_IP !== FALSE)
{
@@ -1933,11 +1963,11 @@
/**
* Set Message
*
- * @access private
+ * @access protected
* @param string
* @return string
*/
- private function _set_error_message($msg, $val = '')
+ protected function _set_error_message($msg, $val = '')
{
$CI =& get_instance();
$CI->lang->load('email');
@@ -1957,11 +1987,11 @@
/**
* Mime Types
*
- * @access private
+ * @access protected
* @param string
* @return string
*/
- private function _mime_types($ext = "")
+ protected function _mime_types($ext = "")
{
$mimes = array( 'hqx' => 'application/mac-binhex40',
'cpt' => 'application/mac-compactpro',
diff -ru CodeIgniter_2.0.3//system/libraries/Form_validation.php CodeIgniter_2.1.0//system/libraries/Form_validation.php
--- CodeIgniter_2.0.3//system/libraries/Form_validation.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/libraries/Form_validation.php 2011-11-01 01:15:36.000000000 +0900
@@ -26,16 +26,15 @@
*/
class CI_Form_validation {
- var $CI;
- var $_field_data = array();
- var $_config_rules = array();
- var $_error_array = array();
- var $_error_messages = array();
- var $_error_prefix = '<p>';
- var $_error_suffix = '</p>';
- var $error_string = '';
- var $_safe_form_data = FALSE;
-
+ protected $CI;
+ protected $_field_data = array();
+ protected $_config_rules = array();
+ protected $_error_array = array();
+ protected $_error_messages = array();
+ protected $_error_prefix = '<p>';
+ protected $_error_suffix = '</p>';
+ protected $error_string = '';
+ protected $_safe_form_data = FALSE;
/**
* Constructor
@@ -72,7 +71,7 @@
* @param string
* @return void
*/
- function set_rules($field, $label = '', $rules = '')
+ public function set_rules($field, $label = '', $rules = '')
{
// No reason to set rules if we have no POST data
if (count($_POST) == 0)
@@ -163,7 +162,7 @@
* @param string
* @return string
*/
- function set_message($lang, $val = '')
+ public function set_message($lang, $val = '')
{
if ( ! is_array($lang))
{
@@ -187,7 +186,7 @@
* @param string
* @return void
*/
- function set_error_delimiters($prefix = '<p>', $suffix = '</p>')
+ public function set_error_delimiters($prefix = '<p>', $suffix = '</p>')
{
$this->_error_prefix = $prefix;
$this->_error_suffix = $suffix;
@@ -206,7 +205,7 @@
* @param string the field name
* @return void
*/
- function error($field = '', $prefix = '', $suffix = '')
+ public function error($field = '', $prefix = '', $suffix = '')
{
if ( ! isset($this->_field_data[$field]['error']) OR $this->_field_data[$field]['error'] == '')
{
@@ -238,7 +237,7 @@
* @param string
* @return str
*/
- function error_string($prefix = '', $suffix = '')
+ public function error_string($prefix = '', $suffix = '')
{
// No errrors, validation passes!
if (count($this->_error_array) === 0)
@@ -279,7 +278,7 @@
* @access public
* @return bool
*/
- function run($group = '')
+ public function run($group = '')
{
// Do we even have any data to process? Mm?
if (count($_POST) == 0)
@@ -374,7 +373,7 @@
* @param integer
* @return mixed
*/
- function _reduce_array($array, $keys, $i = 0)
+ protected function _reduce_array($array, $keys, $i = 0)
{
if (is_array($array))
{
@@ -406,7 +405,7 @@
* @access private
* @return null
*/
- function _reset_post_array()
+ protected function _reset_post_array()
{
foreach ($this->_field_data as $field => $row)
{
@@ -468,7 +467,7 @@
* @param integer
* @return mixed
*/
- function _execute($row, $rules, $postdata = NULL, $cycles = 0)
+ protected function _execute($row, $rules, $postdata = NULL, $cycles = 0)
{
// If the $_POST data is an array we will run a recursive call
if (is_array($postdata))
@@ -489,7 +488,7 @@
if ( ! in_array('required', $rules) AND is_null($postdata))
{
// Before we bail out, does the rule contain a callback?
- if (preg_match("/(callback_\w+)/", implode(' ', $rules), $match))
+ if (preg_match("/(callback_\w+(\[.*?\])?)/", implode(' ', $rules), $match))
{
$callback = TRUE;
$rules = (array('1' => $match[1]));
@@ -695,7 +694,7 @@
* @param string the field name
* @return string
*/
- function _translate_fieldname($fieldname)
+ protected function _translate_fieldname($fieldname)
{
// Do we need to translate the field name?
// We look for the prefix lang: to determine this
@@ -727,7 +726,7 @@
* @param string
* @return void
*/
- function set_value($field = '', $default = '')
+ public function set_value($field = '', $default = '')
{
if ( ! isset($this->_field_data[$field]))
{
@@ -757,7 +756,7 @@
* @param string
* @return string
*/
- function set_select($field = '', $value = '', $default = FALSE)
+ public function set_select($field = '', $value = '', $default = FALSE)
{
if ( ! isset($this->_field_data[$field]) OR ! isset($this->_field_data[$field]['postdata']))
{
@@ -801,7 +800,7 @@
* @param string
* @return string
*/
- function set_radio($field = '', $value = '', $default = FALSE)
+ public function set_radio($field = '', $value = '', $default = FALSE)
{
if ( ! isset($this->_field_data[$field]) OR ! isset($this->_field_data[$field]['postdata']))
{
@@ -845,7 +844,7 @@
* @param string
* @return string
*/
- function set_checkbox($field = '', $value = '', $default = FALSE)
+ public function set_checkbox($field = '', $value = '', $default = FALSE)
{
if ( ! isset($this->_field_data[$field]) OR ! isset($this->_field_data[$field]['postdata']))
{
@@ -885,7 +884,7 @@
* @param string
* @return bool
*/
- function required($str)
+ public function required($str)
{
if ( ! is_array($str))
{
@@ -907,7 +906,7 @@
* @param regex
* @return bool
*/
- function regex_match($str, $regex)
+ public function regex_match($str, $regex)
{
if ( ! preg_match($regex, $str))
{
@@ -927,7 +926,7 @@
* @param field
* @return bool
*/
- function matches($str, $field)
+ public function matches($str, $field)
{
if ( ! isset($_POST[$field]))
{
@@ -938,6 +937,24 @@
return ($str !== $field) ? FALSE : TRUE;
}
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Match one field to another
+ *
+ * @access public
+ * @param string
+ * @param field
+ * @return bool
+ */
+ public function is_unique($str, $field)
+ {
+ list($table, $field)=explode('.', $field);
+ $query = $this->CI->db->limit(1)->get_where($table, array($field => $str));
+
+ return $query->num_rows() === 0;
+ }
// --------------------------------------------------------------------
@@ -949,7 +966,7 @@
* @param value
* @return bool
*/
- function min_length($str, $val)
+ public function min_length($str, $val)
{
if (preg_match("/[^0-9]/", $val))
{
@@ -974,7 +991,7 @@
* @param value
* @return bool
*/
- function max_length($str, $val)
+ public function max_length($str, $val)
{
if (preg_match("/[^0-9]/", $val))
{
@@ -999,7 +1016,7 @@
* @param value
* @return bool
*/
- function exact_length($str, $val)
+ public function exact_length($str, $val)
{
if (preg_match("/[^0-9]/", $val))
{
@@ -1023,7 +1040,7 @@
* @param string
* @return bool
*/
- function valid_email($str)
+ public function valid_email($str)
{
return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
}
@@ -1037,7 +1054,7 @@
* @param string
* @return bool
*/
- function valid_emails($str)
+ public function valid_emails($str)
{
if (strpos($str, ',') === FALSE)
{
@@ -1064,7 +1081,7 @@
* @param string
* @return string
*/
- function valid_ip($ip)
+ public function valid_ip($ip)
{
return $this->CI->input->valid_ip($ip);
}
@@ -1078,7 +1095,7 @@
* @param string
* @return bool
*/
- function alpha($str)
+ public function alpha($str)
{
return ( ! preg_match("/^([a-z])+$/i", $str)) ? FALSE : TRUE;
}
@@ -1092,7 +1109,7 @@
* @param string
* @return bool
*/
- function alpha_numeric($str)
+ public function alpha_numeric($str)
{
return ( ! preg_match("/^([a-z0-9])+$/i", $str)) ? FALSE : TRUE;
}
@@ -1106,7 +1123,7 @@
* @param string
* @return bool
*/
- function alpha_dash($str)
+ public function alpha_dash($str)
{
return ( ! preg_match("/^([-a-z0-9_-])+$/i", $str)) ? FALSE : TRUE;
}
@@ -1120,7 +1137,7 @@
* @param string
* @return bool
*/
- function numeric($str)
+ public function numeric($str)
{
return (bool)preg_match( '/^[\-+]?[0-9]*\.?[0-9]+$/', $str);
@@ -1135,7 +1152,7 @@
* @param string
* @return bool
*/
- function is_numeric($str)
+ public function is_numeric($str)
{
return ( ! is_numeric($str)) ? FALSE : TRUE;
}
@@ -1149,7 +1166,7 @@
* @param string
* @return bool
*/
- function integer($str)
+ public function integer($str)
{
return (bool) preg_match('/^[\-+]?[0-9]+$/', $str);
}
@@ -1163,7 +1180,7 @@
* @param string
* @return bool
*/
- function decimal($str)
+ public function decimal($str)
{
return (bool) preg_match('/^[\-+]?[0-9]+\.[0-9]+$/', $str);
}
@@ -1177,7 +1194,7 @@
* @param string
* @return bool
*/
- function greater_than($str, $min)
+ public function greater_than($str, $min)
{
if ( ! is_numeric($str))
{
@@ -1195,7 +1212,7 @@
* @param string
* @return bool
*/
- function less_than($str, $max)
+ public function less_than($str, $max)
{
if ( ! is_numeric($str))
{
@@ -1213,7 +1230,7 @@
* @param string
* @return bool
*/
- function is_natural($str)
+ public function is_natural($str)
{
return (bool) preg_match( '/^[0-9]+$/', $str);
}
@@ -1227,7 +1244,7 @@
* @param string
* @return bool
*/
- function is_natural_no_zero($str)
+ public function is_natural_no_zero($str)
{
if ( ! preg_match( '/^[0-9]+$/', $str))
{
@@ -1254,7 +1271,7 @@
* @param string
* @return bool
*/
- function valid_base64($str)
+ public function valid_base64($str)
{
return (bool) ! preg_match('/[^a-zA-Z0-9\/\+=]/', $str);
}
@@ -1271,7 +1288,7 @@
* @param string
* @return string
*/
- function prep_for_form($data = '')
+ public function prep_for_form($data = '')
{
if (is_array($data))
{
@@ -1300,7 +1317,7 @@
* @param string
* @return string
*/
- function prep_url($str = '')
+ public function prep_url($str = '')
{
if ($str == 'http://' OR $str == '')
{
@@ -1324,7 +1341,7 @@
* @param string
* @return string
*/
- function strip_image_tags($str)
+ public function strip_image_tags($str)
{
return $this->CI->input->strip_image_tags($str);
}
@@ -1338,7 +1355,7 @@
* @param string
* @return string
*/
- function xss_clean($str)
+ public function xss_clean($str)
{
return $this->CI->security->xss_clean($str);
}
@@ -1352,7 +1369,7 @@
* @param string
* @return string
*/
- function encode_php_tags($str)
+ public function encode_php_tags($str)
{
return str_replace(array('<?php', '<?PHP', '<?', '?>'), array('&lt;?php', '&lt;?PHP', '&lt;?', '?&gt;'), $str);
}
Only in CodeIgniter_2.1.0//system/libraries: Migration.php
diff -ru CodeIgniter_2.0.3//system/libraries/Pagination.php CodeIgniter_2.1.0//system/libraries/Pagination.php
--- CodeIgniter_2.0.3//system/libraries/Pagination.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/libraries/Pagination.php 2011-11-15 03:31:59.000000000 +0900
@@ -34,6 +34,7 @@
var $per_page = 10; // Max number of items you want shown per page
var $num_links = 2; // Number of "digit" links to show before/after the currently viewed page
var $cur_page = 0; // The current page being viewed
+ var $use_page_numbers = FALSE; // Use page number for segment instead of offset
var $first_link = '&lsaquo; First';
var $next_link = '&gt;';
var $prev_link = '&lt;';
@@ -128,12 +129,22 @@
return '';
}
+ // Set the base page index for starting page number
+ if ($this->use_page_numbers)
+ {
+ $base_page = 1;
+ }
+ else
+ {
+ $base_page = 0;
+ }
+
// Determine the current page number.
$CI =& get_instance();
if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
{
- if ($CI->input->get($this->query_string_segment) != 0)
+ if ($CI->input->get($this->query_string_segment) != $base_page)
{
$this->cur_page = $CI->input->get($this->query_string_segment);
@@ -143,7 +154,7 @@
}
else
{
- if ($CI->uri->segment($this->uri_segment) != 0)
+ if ($CI->uri->segment($this->uri_segment) != $base_page)
{
$this->cur_page = $CI->uri->segment($this->uri_segment);
@@ -151,6 +162,12 @@
$this->cur_page = (int) $this->cur_page;
}
}
+
+ // Set current page to 1 if using page numbers instead of offset
+ if ($this->use_page_numbers AND $this->cur_page == 0)
+ {
+ $this->cur_page = $base_page;
+ }
$this->num_links = (int)$this->num_links;
@@ -161,18 +178,32 @@
if ( ! is_numeric($this->cur_page))
{
- $this->cur_page = 0;
+ $this->cur_page = $base_page;
}
// Is the page number beyond the result range?
// If so we show the last page
- if ($this->cur_page > $this->total_rows)
+ if ($this->use_page_numbers)
{
- $this->cur_page = ($num_pages - 1) * $this->per_page;
+ if ($this->cur_page > $num_pages)
+ {
+ $this->cur_page = $num_pages;
+ }
+ }
+ else
+ {
+ if ($this->cur_page > $this->total_rows)
+ {
+ $this->cur_page = ($num_pages - 1) * $this->per_page;
+ }
}
$uri_page_number = $this->cur_page;
- $this->cur_page = floor(($this->cur_page/$this->per_page) + 1);
+
+ if ( ! $this->use_page_numbers)
+ {
+ $this->cur_page = floor(($this->cur_page/$this->per_page) + 1);
+ }
// Calculate the start and end numbers. These determine
// which number to start and end the digit links with
@@ -203,7 +234,14 @@
// Render the "previous" link
if ($this->prev_link !== FALSE AND $this->cur_page != 1)
{
- $i = $uri_page_number - $this->per_page;
+ if ($this->use_page_numbers)
+ {
+ $i = $uri_page_number - 1;
+ }
+ else
+ {
+ $i = $uri_page_number - $this->per_page;
+ }
if ($i == 0 && $this->first_url != '')
{
@@ -223,9 +261,16 @@
// Write the digit links
for ($loop = $start -1; $loop <= $end; $loop++)
{
- $i = ($loop * $this->per_page) - $this->per_page;
+ if ($this->use_page_numbers)
+ {
+ $i = $loop;
+ }
+ else
+ {
+ $i = ($loop * $this->per_page) - $this->per_page;
+ }
- if ($i >= 0)
+ if ($i >= $base_page)
{
if ($this->cur_page == $loop)
{
@@ -233,7 +278,7 @@
}
else
{
- $n = ($i == 0) ? '' : $i;
+ $n = ($i == $base_page) ? '' : $i;
if ($n == '' && $this->first_url != '')
{
@@ -253,13 +298,29 @@
// Render the "next" link
if ($this->next_link !== FALSE AND $this->cur_page < $num_pages)
{
- $output .= $this->next_tag_open.'<a '.$this->anchor_class.'href="'.$this->base_url.$this->prefix.($this->cur_page * $this->per_page).$this->suffix.'">'.$this->next_link.'</a>'.$this->next_tag_close;
+ if ($this->use_page_numbers)
+ {
+ $i = $this->cur_page + 1;
+ }
+ else
+ {
+ $i = ($this->cur_page * $this->per_page);
+ }
+
+ $output .= $this->next_tag_open.'<a '.$this->anchor_class.'href="'.$this->base_url.$this->prefix.$i.$this->suffix.'">'.$this->next_link.'</a>'.$this->next_tag_close;
}
// Render the "Last" link
if ($this->last_link !== FALSE AND ($this->cur_page + $this->num_links) < $num_pages)
{
- $i = (($num_pages * $this->per_page) - $this->per_page);
+ if ($this->use_page_numbers)
+ {
+ $i = $num_pages;
+ }
+ else
+ {
+ $i = (($num_pages * $this->per_page) - $this->per_page);
+ }
$output .= $this->last_tag_open.'<a '.$this->anchor_class.'href="'.$this->base_url.$this->prefix.$i.$this->suffix.'">'.$this->last_link.'</a>'.$this->last_tag_close;
}
diff -ru CodeIgniter_2.0.3//system/libraries/Session.php CodeIgniter_2.1.0//system/libraries/Session.php
--- CodeIgniter_2.0.3//system/libraries/Session.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/libraries/Session.php 2011-11-01 01:15:36.000000000 +0900
@@ -317,7 +317,8 @@
'session_id' => md5(uniqid($sessid, TRUE)),
'ip_address' => $this->CI->input->ip_address(),
'user_agent' => substr($this->CI->input->user_agent(), 0, 120),
- 'last_activity' => $this->now
+ 'last_activity' => $this->now,
+ 'user_data' => ''
);
diff -ru CodeIgniter_2.0.3//system/libraries/Upload.php CodeIgniter_2.1.0//system/libraries/Upload.php
--- CodeIgniter_2.0.3//system/libraries/Upload.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/libraries/Upload.php 2011-11-01 01:15:36.000000000 +0900
@@ -196,7 +196,8 @@
// Set the uploaded data as class variables
$this->file_temp = $_FILES[$field]['tmp_name'];
$this->file_size = $_FILES[$field]['size'];
- $this->file_type = preg_replace("/^(.+?);.*$/", "\\1", $_FILES[$field]['type']);
+ $this->_file_mime_type($_FILES[$field]);
+ $this->file_type = preg_replace("/^(.+?);.*$/", "\\1", $this->file_type);
$this->file_type = strtolower(trim(stripslashes($this->file_type), '"'));
$this->file_name = $this->_prep_filename($_FILES[$field]['name']);
$this->file_ext = $this->get_extension($this->file_name);
@@ -1006,8 +1007,69 @@
// --------------------------------------------------------------------
+ /**
+ * File MIME type
+ *
+ * Detects the (actual) MIME type of the uploaded file, if possible.
+ * The input array is expected to be $_FILES[$field]
+ *
+ * @param array
+ * @return void
+ */
+ protected function _file_mime_type($file)
+ {
+ // Use if the Fileinfo extension, if available (only versions above 5.3 support the FILEINFO_MIME_TYPE flag)
+ if ( (float) substr(phpversion(), 0, 3) >= 5.3 && function_exists('finfo_file'))
+ {
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ if ($finfo !== FALSE) // This is possible, if there is no magic MIME database file found on the system
+ {
+ $file_type = $finfo->file($file['tmp_name']);
+
+ /* According to the comments section of the PHP manual page,
+ * it is possible that this function returns an empty string
+ * for some files (e.g. if they don't exist in the magic MIME database)
+ */
+ if (strlen($file_type) > 1)
+ {
+ $this->file_type = $file_type;
+ return;
+ }
+ }
+ }
+
+ // Fall back to the deprecated mime_content_type(), if available
+ if (function_exists('mime_content_type'))
+ {
+ $this->file_type = @mime_content_type($file['tmp_name']);
+ return;
+ }
+
+ /* This is an ugly hack, but UNIX-type systems provide a native way to detect the file type,
+ * which is still more secure than depending on the value of $_FILES[$field]['type'].
+ *
+ * Notes:
+ * - a 'W' in the substr() expression bellow, would mean that we're using Windows
+ * - many system admins would disable the exec() function due to security concerns, hence the function_exists() check
+ */
+ if (DIRECTORY_SEPARATOR !== '\\' && function_exists('exec'))
+ {
+ $output = array();
+ @exec('file --brief --mime-type ' . escapeshellarg($file['tmp_path']), $output, $return_code);
+ if ($return_code === 0 && strlen($output[0]) > 0) // A return status code != 0 would mean failed execution
+ {
+ $this->file_type = rtrim($output[0]);
+ return;
+ }
+ }
+
+ $this->file_type = $file['type'];
+ }
+
+ // --------------------------------------------------------------------
+
}
// END Upload Class
/* End of file Upload.php */
-/* Location: ./system/libraries/Upload.php */
\ No newline at end of file
+/* Location: ./system/libraries/Upload.php */
diff -ru CodeIgniter_2.0.3//system/libraries/User_agent.php CodeIgniter_2.1.0//system/libraries/User_agent.php
--- CodeIgniter_2.0.3//system/libraries/User_agent.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/libraries/User_agent.php 2011-11-01 01:15:36.000000000 +0900
@@ -142,7 +142,7 @@
{
$this->_set_platform();
- foreach (array('_set_browser', '_set_robot', '_set_mobile') as $function)
+ foreach (array('_set_robot', '_set_browser', '_set_mobile') as $function)
{
if ($this->$function() === TRUE)
{
diff -ru CodeIgniter_2.0.3//system/libraries/Xmlrpc.php CodeIgniter_2.1.0//system/libraries/Xmlrpc.php
--- CodeIgniter_2.0.3//system/libraries/Xmlrpc.php 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//system/libraries/Xmlrpc.php 2011-11-15 03:31:59.000000000 +0900
@@ -1404,14 +1404,14 @@
{
if ($utc == 1)
{
- $t = strftime("%Y%m%dT%H:%M:%S", $time);
+ $t = strftime("%Y%m%dT%H:%i:%s", $time);
}
else
{
if (function_exists('gmstrftime'))
- $t = gmstrftime("%Y%m%dT%H:%M:%S", $time);
+ $t = gmstrftime("%Y%m%dT%H:%i:%s", $time);
else
- $t = strftime("%Y%m%dT%H:%M:%S", $time - date('Z'));
+ $t = strftime("%Y%m%dT%H:%i:%s", $time - date('Z'));
}
return $t;
}
diff -ru CodeIgniter_2.0.3//user_guide/changelog.html CodeIgniter_2.1.0//user_guide/changelog.html
--- CodeIgniter_2.0.3//user_guide/changelog.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/changelog.html 2011-11-15 03:38:30.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="./toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -57,7 +57,79 @@
<h1>Change Log</h1>
-<p>The <img src="images/reactor-bullet.png" width="16" height="16" alt="Reactor Marker" /> indicates items that were contributed to CodeIgniter via CodeIgniter Reactor.</p>
+<h2>Version 2.1.0</h2>
+<p>Release Date: November 14, 2011</p>
+
+<ul>
+ <li>General Changes
+ <ul>
+ <li>Fixed a potential parameter injection flaw in the <a href="libraries/security.html">Security Library</a> and strengthened the XSS filter for HTML5 vulnerabilites.</li>
+ <li>Callback validation rules can now accept parameters like any other validation rule.</li>
+ <li>Added html_escape() to the <a href="general/common_functions.html">Common functions</a> to escape HTML output for preventing XSS easliy.</li>
+ </ul>
+ </li>
+ <li>Helpers
+ <ul>
+ <li>Added <samp>increment_string()</samp> to <a href="helpers/string_helper.html">String Helper</a> to turn "foo" into "foo-1" or "foo-1" into "foo-2".</li>
+ <li>Altered form helper - made action on form_open_multipart helper function call optional. Fixes (#65)</li>
+ <li><samp>url_title()</samp> will now trim extra dashes from beginning and end.</li>
+ <li>Improved speed of <a href="helpers/string_helper.html">String Helper</a>'s <b>random_string()</b> method</li>
+ </ul>
+ </li>
+ <li>Database
+ <ul>
+ <li>Added a <a href="http://www.cubrid.org/" target="_blank">CUBRID</a> driver to the <a href="libraries/database.html">Database driver</a>. Thanks to the CUBRID team for supplying this patch.</li>
+ <li>Added a <a href="http://www.php.net/manual/en/intro.pdo.php" target="_blank">PDO</a> driver to the <a href="libraries/database.html">Database driver</a>.</li>
+ <li>Typecast limit and offset in the <a href="database/queries.html">Database driver</a> to integers to avoid possible injection.</li>
+ <li>Added additional option 'none' for the optional third argument for <kbd>$this->db->like()</kbd> in the <a href="database/active_record.html">Database driver</a>.
+ </li>
+ <li>Added <kbd>$this->db->insert_batch()</kbd> support to the OCI8 (Oracle) driver.</li>
+ </ul>
+ </li>
+ <li>Libraries
+ <ul>
+ <li>Changed <kbd>$this->cart->insert()</kbd> in the <a href="libraries/cart.html">Cart library</a> to return the Row ID if a single item was inserted successfully.</li>
+ <li>Added support to set an optional parameter in your callback rules of validation using the <a href="libraries/form_validation.html">Form Validation library</a>.</li>
+ <li>Added a <a href="libraries/migration.html">Migration library</a> to assist with applying incremental updates to your database schema.</li>
+ <li>Driver children can be located in any package path.</li>
+ <li>Added <samp>is_unique</samp> to the <a href="libraries/form_validation.html">Form Validation library</a>.</li>
+ <li>Added <kbd>$config['use_page_numbers']</kbd> to the <a href="libraries/pagination.html">Pagination library</a>, which enables real page numbers in the URI.</li>
+ <li>Added TLS and SSL Encryption for SMTP.</li>
+ </ul>
+ </li>
+ <li>Core
+ <ul>
+ <li>Changed private functions in <a href="libraries/cart.html">URI library</a> to protected so <kdb>MY_URI</kdb> can override them.</li>
+ <li>Removed <samp>CI_CORE</samp> boolean constant from CodeIgniter.php (there are no longer different Reactor and Core versions).</li>
+ </ul>
+ </li>
+</ul>
+
+<h3>Bug fixes for 2.1.0</h3>
+<ul>
+ <li>Fixed #378 Robots identified as regular browsers by the <a href="libraries/user_agent.html">User Agent class</a>.</li>
+ <li>If a config class was loaded first then a library with the same name is loaded, the config would be ignored.</li>
+ <li>Fixed a bug (Reactor #19) where 1) the 404_override route was being ignored in some cases, and 2) auto-loaded libraries were not available to the 404_override controller when a controller existed but the requested method did not.</li>
+ <li>Fixed a bug (Reactor #89) where MySQL export would fail if the table had hyphens or other non alphanumeric/underscore characters.</li>
+ <li>Fixed a bug (#200) where MySQL queries would be malformed after calling <kbd>$this->db->count_all()</kbd> then <kdb>$this->db->get()</kdb></li>
+ <li>Fixed bug #105 that stopped query errors from being logged unless database debugging was enabled</li>
+ <li>Fixed a bug (#160) - Removed unneeded array copy in the file cache driver.</li>
+ <li>Fixed a bug (#150) - <samp>field_data()</samp> now correctly returns column length.</li>
+ <li>Fixed a bug (#8) - <samp>load_class()</samp> now looks for core classes in <samp>APPPATH</samp> first, allowing them to be replaced.</li>
+ <li>Fixed a bug (#24) - ODBC database driver called incorrect parent in __construct().</li>
+ <li>Fixed a bug (#85) - OCI8 (Oracle) database <kbd>escape_str()</kbd> function did not escape correct.</li>
+ <li>Fixed a bug (#344) - Using schema found in <a href="libraries/sessions.html">Saving Session Data to a Database</a>, system would throw error "user_data does not have a default value" when deleting then creating a session.</li>
+ <li>Fixed a bug (#112) - OCI8 (Oracle) driver didn't pass the configured database character set when connecting.</li>
+ <li>Fixed a bug (#182) - OCI8 (Oracle) driver used to re-execute the statement whenever num_rows() is called.</li>
+ <li>Fixed a bug (#82) - WHERE clause field names in the DB <kbd>update_string()</kbd> method were not escaped, resulting in failed queries in some cases.</li>
+ <li>Fixed a bug (#89) - Fix a variable type mismatch in DB <kbd>display_error()</kbd> where an array is expected, but a string could be set instead.</li>
+ <li>Fixed a bug (#467) - Suppress warnings generated from <kbd>get_magic_quotes_gpc()</kbd> (deprecated in PHP 5.4)</li>
+ <li>Fixed a bug (#484) - First time <kbd>_csrf_set_hash()</kbd> is called, hash is never set to the cookie (in Security.php).</li>
+ <li>Fixed a bug (#60) - Added <kbd>_file_mime_type()</kbd> method to the <a href="libraries/file_uploading.html">File Uploading Library</a> in order to fix a possible MIME-type injection (also fixes bug #394).</li>
+ <li>Fixed a bug (#537) - Support for all wav type in browser.</li>
+ <li>Fixed a bug (#576) - Using <kbd>ini_get()</kbd> function to detect if apc is enabled or not.</li>
+ <li>Fixed invalid date time format in <a href="helpers/date_helper.html">Date helper</a> and <a href="libraries/xmlrpc.html">XMLRPC library</a>.</li>
+</ul>
<h2>Version 2.0.3</h2>
<p>Release Date: August 20, 2011</p>
@@ -67,29 +139,32 @@
<ul>
<li>An improvement was made to the MySQL and MySQLi drivers to prevent exposing a potential vector for SQL injection on sites using multi-byte character sets in the database client connection. <p>An incompatibility in PHP versions &lt; 5.2.3 and MySQL &lt; 5.0.7 with <em>mysql_set_charset()</em> creates a situation where using multi-byte character sets on these environments may potentially expose a SQL injection attack vector. Latin-1, UTF-8, and other "low ASCII" character sets are unaffected on all environments.</p> <p class="critical">If you are running or considering running a multi-byte character set for your database connection, please pay close attention to the server environment you are deploying on to ensure you are not vulnerable.</p></li>
</ul>
+ </li>
<li>General Changes
<ul>
<li>Fixed a bug where there was a misspelling within a code comment in the index.php file.</li>
<li>Added Session Class userdata to the output profiler. Additionally, added a show/hide toggle on HTTP Headers, Session Data and Config Variables.</li>
<li>Removed internal usage of the <samp>EXT</samp> constant.</li>
<li>Visual updates to the welcome_message view file and default error templates. Thanks to <a href="https://bitbucket.org/danijelb">danijelb</a> for the pull request.</li>
- <li class="reactor">Added <samp>insert_batch()</samp> function to the PostgreSQL database driver. Thanks to epallerols for the patch.</li>
- <li class="reactor">Added "application/x-csv" to mimes.php.</li>
+ <li>Added "application/x-csv" to mimes.php.</li>
<li>Fixed a bug where <a href="libraries/email.html">Email library</a> attachments with a "." in the name would using invalid MIME-types.</li>
+ <li>Callback validation rules can now accept parameters like any other validation rule.</li>
</ul>
</li>
<li>Helpers
<ul>
<li>Added an optional third parameter to <samp>heading()</samp> which allows adding html attributes to the rendered heading tag.</li>
+ <li><kbd>form_open()</kbd> now only adds a hidden (Cross-site Reference Forgery) protection field when the form's action is internal and is set to the post method. (Reactor #165)</li>
+ <li>Re-worked <samp>plural()</samp> and <samp>singular()</samp> functions in the <a href="helpers/inflector_helper.html">Inflector helper</a> to support considerably more words.</li>
</ul>
</li>
<li>Libraries
<ul>
<li>Altered Session to use a longer match against the user_agent string. See upgrade notes if using database sessions.</li>
- <li class="reactor">Added <kbd>is_unique</kbd> to the <a href="libraries/form_validation.html">Form Validation library</a>.</li>
- <li class="reactor">Added <kbd>$this->db->set_dbprefix()</kbd> to the <a href="database/queries.html">Database Driver</a>.</li>
- <li class="reactor">Changed <kbd>$this->cart->insert()</kbd> in the <a href="libraries/cart.html">Cart Library</a> to return the Row ID if a single item was inserted successfully.</li>
- <li class="reactor">Added <kbd>$this->load->get_var()</kbd> to the <a href="libraries/loader.html">Loader library</a> to retrieve global vars set with <kbd>$this->load->view()</kbd> and <kbd>$this->load->vars()</kbd>.</li>
+ <li>Added <kbd>is_unique</kbd> to the <a href="libraries/form_validation.html">Form Validation library</a>.</li>
+ <li>Added <kbd>$this->db->set_dbprefix()</kbd> to the <a href="database/queries.html">Database Driver</a>.</li>
+ <li>Changed <kbd>$this->cart->insert()</kbd> in the <a href="libraries/cart.html">Cart Library</a> to return the Row ID if a single item was inserted successfully.</li>
+ <li>Added <kbd>$this->load->get_var()</kbd> to the <a href="libraries/loader.html">Loader library</a> to retrieve global vars set with <kbd>$this->load->view()</kbd> and <kbd>$this->load->vars()</kbd>.</li>
<li>Changed <kbd>$this->db->having()</kbd> to insert quotes using escape() rather than escape_str().</li>
</ul>
</li>
@@ -97,17 +172,17 @@
<h3>Bug fixes for 2.0.3</h3>
<ul>
- <li class="reactor">Added ENVIRONMENT to reserved constants. (Reactor #196)</li>
- <li class="reactor">Changed server check to ensure SCRIPT_NAME is defined. (Reactor #57)</li>
- <li class="reactor">Removed <samp>APPPATH.'third_party'</samp> from the packages autoloader to negate needless file stats if no packages exist or if the developer does not load any other packages by default.</li>
+ <li>Added ENVIRONMENT to reserved constants. (Reactor #196)</li>
+ <li>Changed server check to ensure SCRIPT_NAME is defined. (Reactor #57)</li>
+ <li>Removed <samp>APPPATH.'third_party'</samp> from the packages autoloader to negate needless file stats if no packages exist or if the developer does not load any other packages by default.</li>
<li>Fixed a bug (Reactor #231) where Sessions Library database table example SQL did not contain an index on last_activity. See <a href="installation/upgrade_203.html">Upgrade Notes</a>.</li>
<li>Fixed a bug (Reactor #229) where the Sessions Library example SQL in the documentation contained incorrect SQL.</li>
<li>Fixed a bug (Core #340) where when passing in the second parameter to $this->db->select(), column names in subsequent queries would not be properly escaped.</li>
- <li class="reactor">Fixed issue #199 - Attributes passed as string does not include a space between it and the opening tag.</li>
- <li class="reactor">Fixed a bug where the method <kbd>$this->cart->total_items()</kbd> from <a href="libraries/cart.html">Cart Library</a> now returns the sum of the quantity of all items in the cart instead of your total count.</li>
- <li class="reactor">Fixed a bug where not setting 'null' when adding fields in db_forge for mysql and mysqli drivers would default to NULL instead of NOT NULL as the docs suggest.</li>
- <li class="reactor">Fixed a bug where using <kbd>$this->db->select_max()</kdb>, <kbd>$this->db->select_min()</kdb>, etc could throw notices. Thanks to w43l for the patch.</li>
- <li class="reactor">Replace checks for STDIN with php_sapi_name() == 'cli' which on the whole is more reliable. This should get parameters in crontab working.</li>
+ <li>Fixed issue #199 - Attributes passed as string does not include a space between it and the opening tag.</li>
+ <li>Fixed a bug where the method <kbd>$this->cart->total_items()</kbd> from <a href="libraries/cart.html">Cart Library</a> now returns the sum of the quantity of all items in the cart instead of your total count.</li>
+ <li>Fixed a bug where not setting 'null' when adding fields in db_forge for mysql and mysqli drivers would default to NULL instead of NOT NULL as the docs suggest.</li>
+ <li>Fixed a bug where using <kbd>$this->db->select_max()</kdb>, <kbd>$this->db->select_min()</kdb>, etc could throw notices. Thanks to w43l for the patch.</li>
+ <li>Replace checks for STDIN with php_sapi_name() == 'cli' which on the whole is more reliable. This should get parameters in crontab working.</li>
</ul>
<h2>Version 2.0.2</h2>
@@ -119,36 +194,36 @@
<ul>
<li>The <a href="./libraries/security.html">Security library</a> was moved to the core and is now loaded automatically. Please remove your loading calls.</li>
<li>The CI_SHA class is now deprecated. All supported versions of PHP provide a <kbd>sha1()</kbd> function.</li>
- <li class="reactor"><kbd>constants.php</kbd> will now be loaded from the environment folder if available.</li>
- <li class="reactor">Added language key error logging</li>
- <li class="reactor">Made Environment Support optional. Comment out or delete the constant to stop environment checks.</li>
- <li class="reactor">Added Environment Support for Hooks.</li>
- <li class="reactor">Added CI_ Prefix to the <a href="libraries/caching.html">Cache driver</a>.</li>
- <li class="reactor">Added <a href="./general/cli.html">CLI usage</a> documentation.</li>
+ <li><kbd>constants.php</kbd> will now be loaded from the environment folder if available.</li>
+ <li>Added language key error logging</li>
+ <li>Made Environment Support optional. Comment out or delete the constant to stop environment checks.</li>
+ <li>Added Environment Support for Hooks.</li>
+ <li>Added CI_ Prefix to the <a href="libraries/caching.html">Cache driver</a>.</li>
+ <li>Added <a href="./general/cli.html">CLI usage</a> documentation.</li>
</ul>
</li>
<li>Helpers
<ul>
<li>Removed the previously deprecated <kbd>dohash()</kbd> from the <a href="./helpers/security_helper.html">Security helper</a>; use <kbd>do_hash()</kbd> instead.</li>
- <li class="reactor">Changed the 'plural' function so that it doesn't ruin the captalization of your string. It also take into consideration acronyms which are all caps.</li>
+ <li>Changed the 'plural' function so that it doesn't ruin the captalization of your string. It also take into consideration acronyms which are all caps.</li>
</ul>
</li>
<li>Database
<ul>
- <li class="reactor"><kbd>$this->db->count_all_results()</kbd> will now return an integer instead of a string.</li>
+ <li><kbd>$this->db->count_all_results()</kbd> will now return an integer instead of a string.</li>
</ul>
</li>
</ul>
<h3>Bug fixes for 2.0.2</h3>
<ul>
- <li class="reactor">Fixed a bug (Reactor #145) where the Output Library had parse_exec_vars set to protected.</li>
- <li class="reactor">Fixed a bug (Reactor #80) where is_really_writable would create an empty file when on Windows or with safe_mode enabled.</li>
- <li class="reactor">Fixed various bugs with User Guide.</li>
- <li class="reactor">Added is_cli_request() method to documentation for <a href="libraries/input.html">Input class</a>.</li>
- <li class="reactor">Added form_validation_lang entries for <kbd>decimal</kbd>, <kbd>less_than</kbd> and <kbd>greater_than</kbd>.</li>
- <li class="reactor"><a href="https://bitbucket.org/ellislab/codeigniter-reactor/issue/153/escape-str-bug-in-mssql-driver">Fixed issue #153</a> Escape Str Bug in MSSQL driver.</li>
- <li class="reactor"><a href="https://bitbucket.org/ellislab/codeigniter-reactor/issue/172/bug-in-chrome-and-form_open-in-201">Fixed issue #172</a> Google Chrome 11 posts incorrectly when action is empty.</li>
+ <li>Fixed a bug (Reactor #145) where the Output Library had parse_exec_vars set to protected.</li>
+ <li>Fixed a bug (Reactor #80) where is_really_writable would create an empty file when on Windows or with safe_mode enabled.</li>
+ <li>Fixed various bugs with User Guide.</li>
+ <li>Added is_cli_request() method to documentation for <a href="libraries/input.html">Input class</a>.</li>
+ <li>Added form_validation_lang entries for <kbd>decimal</kbd>, <kbd>less_than</kbd> and <kbd>greater_than</kbd>.</li>
+ <li><a href="https://bitbucket.org/ellislab/codeigniter-reactor/issue/153/escape-str-bug-in-mssql-driver">Fixed issue #153</a> Escape Str Bug in MSSQL driver.</li>
+ <li><a href="https://bitbucket.org/ellislab/codeigniter-reactor/issue/172/bug-in-chrome-and-form_open-in-201">Fixed issue #172</a> Google Chrome 11 posts incorrectly when action is empty.</li>
</ul>
@@ -160,34 +235,34 @@
<li>General changes
<ul>
<li>Added <kbd>$config['cookie_secure']</kbd> to the config file to allow requiring a secure (HTTPS) in order to set cookies.</li>
- <li class="reactor">Added the constant <kbd>CI_CORE</kbd> to help differentiate between Core: TRUE and Reactor: FALSE.</li>
- <li class="reactor">Added an <kbd>ENVIRONMENT</kbd> constant in index.php, which affects PHP error reporting settings, and optionally,
+ <li>Added the constant <kbd>CI_CORE</kbd> to help differentiate between Core: TRUE and Reactor: FALSE.</li>
+ <li>Added an <kbd>ENVIRONMENT</kbd> constant in index.php, which affects PHP error reporting settings, and optionally,
which configuration files are loaded (see below). Read more on the <a href="general/environments.html">Handling Environments</a> page.</li>
- <li class="reactor">Added support for <a href="libraries/config.html#environments">environment-specific</a> configuration files.</li>
+ <li>Added support for <a href="libraries/config.html#environments">environment-specific</a> configuration files.</li>
</ul>
</li>
<li>Libraries
<ul>
- <li class="reactor">Added <kbd>decimal</kbd>, <kbd>less_than</kbd> and <kbd>greater_than</kbd> rules to the <a href="libraries/form_validation.html">Form validation Class</a>.</li>
- <li class="reactor"><a href="libraries/input.html">Input Class</a> methods <kbd>post()</kbd> and <kbd>get()</kbd> will now return a full array if the first argument is not provided.</li>
- <li class="reactor">Secure cookies can now be made with the <kbd>set_cookie()</kbd> helper and <a href="libraries/input.html">Input Class</a> method.</li>
- <li class="reactor">Added <kbd>set_content_type()</kbd> to <a href="libraries/output.html">Output Class</a> to set the output <kbd>Content-Type</kbd> HTTP header based on a MIME Type or a config/mimes.php array key.</li>
- <li class="reactor"><a href="libraries/output.html">Output Class</a> will now support method chaining.</li>
+ <li>Added <kbd>decimal</kbd>, <kbd>less_than</kbd> and <kbd>greater_than</kbd> rules to the <a href="libraries/form_validation.html">Form validation Class</a>.</li>
+ <li><a href="libraries/input.html">Input Class</a> methods <kbd>post()</kbd> and <kbd>get()</kbd> will now return a full array if the first argument is not provided.</li>
+ <li>Secure cookies can now be made with the <kbd>set_cookie()</kbd> helper and <a href="libraries/input.html">Input Class</a> method.</li>
+ <li>Added <kbd>set_content_type()</kbd> to <a href="libraries/output.html">Output Class</a> to set the output <kbd>Content-Type</kbd> HTTP header based on a MIME Type or a config/mimes.php array key.</li>
+ <li><a href="libraries/output.html">Output Class</a> will now support method chaining.</li>
</ul>
</li>
<li>Helpers
<ul>
- <li class="reactor">Changed the logic for <kbd>form_open()</kbd> in <a href="helpers/form_helper.html">Form helper</a>. If no value is passed it will submit to the current URL.</li>
+ <li>Changed the logic for <kbd>form_open()</kbd> in <a href="helpers/form_helper.html">Form helper</a>. If no value is passed it will submit to the current URL.</li>
</ul>
</li>
</ul>
<h3>Bug fixes for 2.0.1</h3>
<ul>
- <li class="reactor">CLI requests can now be run from any folder, not just when CD'ed next to index.php.</li>
- <li class="reactor">Fixed issue #41: Added audio/mp3 mime type to mp3.</li>
- <li class="reactor">Fixed a bug (Core #329) where the file caching driver referenced the incorrect cache directory.</li>
- <li class="reactor">Fixed a bug (Reactor #69) where the SHA1 library was named incorrectly.</li>
+ <li>CLI requests can now be run from any folder, not just when CD'ed next to index.php.</li>
+ <li>Fixed issue #41: Added audio/mp3 mime type to mp3.</li>
+ <li>Fixed a bug (Core #329) where the file caching driver referenced the incorrect cache directory.</li>
+ <li>Fixed a bug (Reactor #69) where the SHA1 library was named incorrectly.</li>
</ul>
<h2>Version 2.0.0</h2>
@@ -201,7 +276,7 @@
<li>Scaffolding, having been deprecated for a number of versions, has been removed.</li>
<li>Plugins have been removed, in favor of Helpers. The CAPTCHA plugin has been converted to a Helper and <a href="./helpers/captcha_helper.html">documented</a>. The JavaScript calendar plugin was removed due to the ready availability of great JavaScript calendars, particularly with jQuery.</li>
<li>Added new special Library type: <a href="./general/drivers.html">Drivers</a>.</li>
- <li class="reactor">Added full query-string support. See the config file for details.</li>
+ <li>Added full query-string support. See the config file for details.</li>
<li>Moved the application folder outside of the system folder.</li>
<li>Moved system/cache and system/logs directories to the application directory.</li>
<li>Added routing overrides to the main index.php file, enabling the normal routing to be overridden on a per "index" file basis.</li>
@@ -211,15 +286,15 @@
<li>In-development code is now hosted at <a href="http://bitbucket.org/ellislab/codeigniter-reactor/">BitBucket</a>.</li>
<li>Removed the deprecated Validation Class.</li>
<li>Added CI_ Prefix to all core classes.</li>
- <li class="reactor">Package paths can now be set in application/config/autoload.php.</li>
- <li class="reactor"><a href="libraries/file_uploading.html">Upload library</a> file_name can now be set without an extension, the extension will be taken from the uploaded file instead of the given name.</li>
- <li class="reactor">In <a href="database/forge.html">Database Forge</a> the name can be omitted from $this->dbforge->modify_column()'s 2nd param if you aren't changing the name.</li>
- <li class="reactor"><kbd>$config['base_url']</kbd> is now empty by default and will guess what it should be.</li>
- <li class="reactor">Enabled full Command Line Interface compatibility with <kbd>config['uri_protocol'] = 'CLI';</kbd>.</li>
+ <li>Package paths can now be set in application/config/autoload.php.</li>
+ <li><a href="libraries/file_uploading.html">Upload library</a> file_name can now be set without an extension, the extension will be taken from the uploaded file instead of the given name.</li>
+ <li>In <a href="database/forge.html">Database Forge</a> the name can be omitted from $this->dbforge->modify_column()'s 2nd param if you aren't changing the name.</li>
+ <li><kbd>$config['base_url']</kbd> is now empty by default and will guess what it should be.</li>
+ <li>Enabled full Command Line Interface compatibility with <kbd>config['uri_protocol'] = 'CLI';</kbd>.</li>
</ul>
<li>Libraries
<ul>
- <li class="reactor">Added a <a href="libraries/caching.html">Cache driver</a> with APC, memcached, and file-based support.</li>
+ <li>Added a <a href="libraries/caching.html">Cache driver</a> with APC, memcached, and file-based support.</li>
<li>Added <var>$prefix</var>, <var>$suffix</var> and <var>$first_url</var> properties to <a href="./libraries/pagination.html">Pagination library</a>.</li>
<li>Added the ability to suppress first, previous, next, last, and page links by setting their values to FALSE in the <a href="./libraries/pagination.html">Pagination library</a>.</li>
<li>Added <a href="./libraries/security.html">Security library</a>, which now contains the <dfn>xss_clean</dfn> function, <dfn>filename_security</dfn> function and other security related functions.</li>
@@ -250,8 +325,8 @@
<li>Altered Form_Validation library to allow for method chaining on <kbd>set_rules()</kbd>, <kbd>set_message()</kbd> and <kbd>set_error_delimiters()</kbd> functions.</li>
<li>Altered Email Library to allow for method chaining.</li>
<li>Added <kbd>request_headers()</kbd>, <kbd>get_request_header()</kbd> and <kbd>is_ajax_request()</kbd> to the input class.</li>
- <li class="reactor">Altered <a href="libraries/user_agent.html">User agent library</a> so that <kbd>is_browser()</kbd>, <kbd>is_mobile()</kbd> and <kbd>is_robot()</kbd> can optionally check for a specific browser or mobile device.</li>
- <li class="reactor">Altered <a href="libraries/input.html">Input library</a> so that <kbd>post()</kbd> and <kbd>get()</kbd> will return all POST and GET items (respectively) if there are no parameters passed in.</li>
+ <li>Altered <a href="libraries/user_agent.html">User agent library</a> so that <kbd>is_browser()</kbd>, <kbd>is_mobile()</kbd> and <kbd>is_robot()</kbd> can optionally check for a specific browser or mobile device.</li>
+ <li>Altered <a href="libraries/input.html">Input library</a> so that <kbd>post()</kbd> and <kbd>get()</kbd> will return all POST and GET items (respectively) if there are no parameters passed in.</li>
</ul>
</li>
<li>Database
@@ -313,7 +388,7 @@
<h3>Bug fixes for 2.0.0</h3>
<ul>
- <li class="reactor">Fixed a bug where you could not change the User-Agent when sending email.</li>
+ <li>Fixed a bug where you could not change the User-Agent when sending email.</li>
<li>Fixed a bug where the Output class would send incorrect cached output for controllers implementing their own <dfn>_output()</dfn> method.</li>
<li>Fixed a bug where a failed query would not have a saved query execution time causing errors in the Profiler</li>
<li>Fixed a bug that was writing log entries when multiple identical helpers and plugins were loaded.</li>
diff -ru CodeIgniter_2.0.3//user_guide/database/active_record.html CodeIgniter_2.1.0//user_guide/database/active_record.html
--- CodeIgniter_2.0.3//user_guide/database/active_record.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/active_record.html 2011-11-15 03:31:59.000000000 +0900
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -334,6 +334,13 @@
$this-&gt;db-&gt;like('title', 'match', 'both'); <br />
// Produces: WHERE title LIKE '%match%' </code> </li>
+If you do not want to use the wildcard (%) you can pass to the optional third argument the option 'none'.
+
+<code>
+ $this-&gt;db-&gt;like('title', 'match', 'none'); <br />
+// Produces: WHERE title LIKE 'match'
+</code>
+
<li><strong>Associative array method:</strong>
<code>
@@ -539,7 +546,7 @@
&nbsp;&nbsp;&nbsp;)<br/>
);<br />
<br />
-$this->db->update_batch('mytable', $data);
+$this->db->insert_batch('mytable', $data);
<br /><br />
// Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date'), ('Another title', 'Another name', 'Another date')</code>
@@ -662,6 +669,41 @@
<p>You may also use the <dfn>$this->db->set()</dfn> function described above when performing updates.</p>
+<h2>$this->db->update_batch();</h2>
+<p>Generates an update string based on the data you supply, and runs the query. You can either pass an
+<strong>array</strong> or an <strong>object</strong> to the function. Here is an example using an array:</p>
+
+<code>
+$data = array(<br/>
+&nbsp;&nbsp;&nbsp;array(<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'title' => 'My title' ,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'name' => 'My Name 2' ,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'date' => 'My date 2'<br />
+&nbsp;&nbsp;&nbsp;),<br />
+&nbsp;&nbsp;&nbsp;array(<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'title' => 'Another title' ,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'name' => 'Another Name 2' ,<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'date' => 'Another date 2'<br />
+&nbsp;&nbsp;&nbsp;)<br/>
+);<br />
+<br />
+$this->db->update_batch('mytable', $data, 'title');
+<br /><br />
+// Produces: <br />
+// UPDATE `mytable` SET `name` = CASE<br />
+// WHEN `title` = 'My title' THEN 'My Name 2'<br />
+// WHEN `title` = 'Another title' THEN 'Another Name 2'<br />
+// ELSE `name` END,<br />
+// `date` = CASE <br />
+// WHEN `title` = 'My title' THEN 'My date 2'<br />
+// WHEN `title` = 'Another title' THEN 'Another date 2'<br />
+// ELSE `date` END<br />
+// WHERE `title` IN ('My title','Another title')</code>
+
+<p>The first parameter will contain the table name, the second is an associative array of values, the third parameter is the where key.</p>
+
+<p class="important"><strong>Note:</strong> All values are escaped automatically producing safer queries.</p>
+
<a name="delete">&nbsp;</a>
<h1>Deleting Data</h1>
@@ -779,4 +821,4 @@
</div>
</body>
-</html>
\ No newline at end of file
+</html>
diff -ru CodeIgniter_2.0.3//user_guide/database/caching.html CodeIgniter_2.1.0//user_guide/database/caching.html
--- CodeIgniter_2.0.3//user_guide/database/caching.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/caching.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/database/call_function.html CodeIgniter_2.1.0//user_guide/database/call_function.html
--- CodeIgniter_2.0.3//user_guide/database/call_function.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/call_function.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/database/configuration.html CodeIgniter_2.1.0//user_guide/database/configuration.html
--- CodeIgniter_2.0.3//user_guide/database/configuration.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/configuration.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -132,8 +132,8 @@
<li><strong>cache_on</strong> - TRUE/FALSE (boolean) - Whether database query caching is enabled, see also <a href="caching.html">Database Caching Class</a>.</li>
<li><strong>cachedir</strong> - The absolute server path to your database query cache directory.</li>
<li><strong>char_set</strong> - The character set used in communicating with the database.</li>
-<li><strong>dbcollat</strong> - The character collation used in communicating with the database. <p class="important"><strong>Note:</strong> For MySQL and MySQLi databases, this setting is only used as a backup if your server is running PHP &lt; 5.2.3 or MySQL &lt; 5.0.7. 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. Sites using Latin-1 or UTF-8 database character set and collation are unaffected.</p></li>
-<li><strong>swap_pre</strong> - A default table prefix that should be swapped with <var>dbprefix</var>. This is useful for distributed applications where you might run manually written queries, and need the prefix to still be customizable by the end user.</li>
+<li><strong>dbcollat</strong> - The character collation used in communicating with the database. <p class="important"><strong>Note:</strong> For MySQL and MySQLi databases, this setting is only used as a backup if your server is running PHP &lt; 5.2.3 or MySQL &lt; 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. Sites using Latin-1 or UTF-8 database character set and collation are unaffected.</p></li>
+<li><strong>swap_pre</strong> - A default table prefix that should be swapped with <var>dbprefix</var>. This is useful for distributed applications where you might run manually written queries, and need the prefix to still be customizable by the end user.</li>
<li><strong>autoinit</strong> - Whether or not to automatically connect to the database when the library loads. If set to false, the connection will take place prior to executing the first query.</li>
<li><strong>stricton</strong> - TRUE/FALSE (boolean) - Whether to force "Strict Mode" connections, good for ensuring strict SQL while developing an application.</li>
<li><strong>port</strong> - The database port number. To use this value you have to add a line to the database config array.<code>$db['default']['port'] = 5432;</code>
diff -ru CodeIgniter_2.0.3//user_guide/database/connecting.html CodeIgniter_2.1.0//user_guide/database/connecting.html
--- CodeIgniter_2.0.3//user_guide/database/connecting.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/connecting.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/database/examples.html CodeIgniter_2.1.0//user_guide/database/examples.html
--- CodeIgniter_2.0.3//user_guide/database/examples.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/examples.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/database/fields.html CodeIgniter_2.1.0//user_guide/database/fields.html
--- CodeIgniter_2.0.3//user_guide/database/fields.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/fields.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/database/forge.html CodeIgniter_2.1.0//user_guide/database/forge.html
--- CodeIgniter_2.0.3//user_guide/database/forge.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/forge.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/database/helpers.html CodeIgniter_2.1.0//user_guide/database/helpers.html
--- CodeIgniter_2.0.3//user_guide/database/helpers.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/helpers.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/database/index.html CodeIgniter_2.1.0//user_guide/database/index.html
--- CodeIgniter_2.0.3//user_guide/database/index.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/index.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/database/queries.html CodeIgniter_2.1.0//user_guide/database/queries.html
--- CodeIgniter_2.0.3//user_guide/database/queries.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/queries.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/database/results.html CodeIgniter_2.1.0//user_guide/database/results.html
--- CodeIgniter_2.0.3//user_guide/database/results.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/results.html 2011-11-15 03:31:59.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -103,7 +103,7 @@
<code>
$query = $this->db->query("SELECT * FROM users;");<br />
<br />
- foreach ($query->result('User') as $user)<br />
+ foreach ($query->result('User') as $row)<br />
{<br />
&nbsp;&nbsp;&nbsp;echo $row->name; // call attributes<br />
&nbsp;&nbsp;&nbsp;echo $row->reverse_name(); // or methods defined on the 'User' class<br />
diff -ru CodeIgniter_2.0.3//user_guide/database/table_data.html CodeIgniter_2.1.0//user_guide/database/table_data.html
--- CodeIgniter_2.0.3//user_guide/database/table_data.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/table_data.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/database/transactions.html CodeIgniter_2.1.0//user_guide/database/transactions.html
--- CodeIgniter_2.0.3//user_guide/database/transactions.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/transactions.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/database/utilities.html CodeIgniter_2.1.0//user_guide/database/utilities.html
--- CodeIgniter_2.0.3//user_guide/database/utilities.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/database/utilities.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/doc_style/index.html CodeIgniter_2.1.0//user_guide/doc_style/index.html
--- CodeIgniter_2.0.3//user_guide/doc_style/index.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/doc_style/index.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/alternative_php.html CodeIgniter_2.1.0//user_guide/general/alternative_php.html
--- CodeIgniter_2.0.3//user_guide/general/alternative_php.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/alternative_php.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/ancillary_classes.html CodeIgniter_2.1.0//user_guide/general/ancillary_classes.html
--- CodeIgniter_2.0.3//user_guide/general/ancillary_classes.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/ancillary_classes.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/autoloader.html CodeIgniter_2.1.0//user_guide/general/autoloader.html
--- CodeIgniter_2.0.3//user_guide/general/autoloader.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/autoloader.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/caching.html CodeIgniter_2.1.0//user_guide/general/caching.html
--- CodeIgniter_2.0.3//user_guide/general/caching.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/caching.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/cli.html CodeIgniter_2.1.0//user_guide/general/cli.html
--- CodeIgniter_2.0.3//user_guide/general/cli.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/cli.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -83,7 +83,7 @@
<ul>
<li>Run your cron-jobs without needing to use wget or curl</li>
- <li>Make your cron-jobs inaccessible from being loaded in the URL by checking for <kbd>IS_CLI</kbd></li>
+ <li>Make your cron-jobs inaccessible from being loaded in the URL by checking for <kbd>$this->input->is_cli_request()</kbd></li>
<li>Make interactive "tasks" that can do things like set permissions, prune cache folders, run backups, etc.</li>
<li>Integrate with other applications in other languages. For example, a random C++ script could call one command and run code in your models!</li>
</ul>
diff -ru CodeIgniter_2.0.3//user_guide/general/common_functions.html CodeIgniter_2.1.0//user_guide/general/common_functions.html
--- CodeIgniter_2.0.3//user_guide/general/common_functions.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/common_functions.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -104,6 +104,8 @@
<p>This function prevents inserting null characters between ascii characters, like Java\0script.</p>
+<h2>html_escape(<var>$mixed</var>)</h2>
+<p>This function provides short cut for htmlspecialchars() function. It accepts string and array. To prevent Cross Site Scripting (XSS), it is very useful.</p>
</div>
diff -ru CodeIgniter_2.0.3//user_guide/general/controllers.html CodeIgniter_2.1.0//user_guide/general/controllers.html
--- CodeIgniter_2.0.3//user_guide/general/controllers.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/controllers.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/core_classes.html CodeIgniter_2.1.0//user_guide/general/core_classes.html
--- CodeIgniter_2.0.3//user_guide/general/core_classes.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/core_classes.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/creating_drivers.html CodeIgniter_2.1.0//user_guide/general/creating_drivers.html
--- CodeIgniter_2.0.3//user_guide/general/creating_drivers.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/creating_drivers.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/creating_libraries.html CodeIgniter_2.1.0//user_guide/general/creating_libraries.html
--- CodeIgniter_2.0.3//user_guide/general/creating_libraries.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/creating_libraries.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/credits.html CodeIgniter_2.1.0//user_guide/general/credits.html
--- CodeIgniter_2.0.3//user_guide/general/credits.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/credits.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/drivers.html CodeIgniter_2.1.0//user_guide/general/drivers.html
--- CodeIgniter_2.0.3//user_guide/general/drivers.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/drivers.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/environments.html CodeIgniter_2.1.0//user_guide/general/environments.html
--- CodeIgniter_2.0.3//user_guide/general/environments.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/environments.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/errors.html CodeIgniter_2.1.0//user_guide/general/errors.html
--- CodeIgniter_2.0.3//user_guide/general/errors.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/errors.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/helpers.html CodeIgniter_2.1.0//user_guide/general/helpers.html
--- CodeIgniter_2.0.3//user_guide/general/helpers.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/helpers.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/hooks.html CodeIgniter_2.1.0//user_guide/general/hooks.html
--- CodeIgniter_2.0.3//user_guide/general/hooks.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/hooks.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/libraries.html CodeIgniter_2.1.0//user_guide/general/libraries.html
--- CodeIgniter_2.0.3//user_guide/general/libraries.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/libraries.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/managing_apps.html CodeIgniter_2.1.0//user_guide/general/managing_apps.html
--- CodeIgniter_2.0.3//user_guide/general/managing_apps.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/managing_apps.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/models.html CodeIgniter_2.1.0//user_guide/general/models.html
--- CodeIgniter_2.0.3//user_guide/general/models.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/models.html 2011-11-01 01:15:36.000000000 +0900
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/profiling.html CodeIgniter_2.1.0//user_guide/general/profiling.html
--- CodeIgniter_2.0.3//user_guide/general/profiling.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/profiling.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/quick_reference.html CodeIgniter_2.1.0//user_guide/general/quick_reference.html
--- CodeIgniter_2.0.3//user_guide/general/quick_reference.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/quick_reference.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/requirements.html CodeIgniter_2.1.0//user_guide/general/requirements.html
--- CodeIgniter_2.0.3//user_guide/general/requirements.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/requirements.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/reserved_names.html CodeIgniter_2.1.0//user_guide/general/reserved_names.html
--- CodeIgniter_2.0.3//user_guide/general/reserved_names.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/reserved_names.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/routing.html CodeIgniter_2.1.0//user_guide/general/routing.html
--- CodeIgniter_2.0.3//user_guide/general/routing.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/routing.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/security.html CodeIgniter_2.1.0//user_guide/general/security.html
--- CodeIgniter_2.0.3//user_guide/general/security.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/security.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/styleguide.html CodeIgniter_2.1.0//user_guide/general/styleguide.html
--- CodeIgniter_2.0.3//user_guide/general/styleguide.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/styleguide.html 2011-11-01 01:15:36.000000000 +0900
@@ -34,7 +34,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/urls.html CodeIgniter_2.1.0//user_guide/general/urls.html
--- CodeIgniter_2.0.3//user_guide/general/urls.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/urls.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/general/views.html CodeIgniter_2.1.0//user_guide/general/views.html
--- CodeIgniter_2.0.3//user_guide/general/views.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/general/views.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/array_helper.html CodeIgniter_2.1.0//user_guide/helpers/array_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/array_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/array_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/captcha_helper.html CodeIgniter_2.1.0//user_guide/helpers/captcha_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/captcha_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/captcha_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/cookie_helper.html CodeIgniter_2.1.0//user_guide/helpers/cookie_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/cookie_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/cookie_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/date_helper.html CodeIgniter_2.1.0//user_guide/helpers/date_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/date_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/date_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/directory_helper.html CodeIgniter_2.1.0//user_guide/helpers/directory_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/directory_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/directory_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/download_helper.html CodeIgniter_2.1.0//user_guide/helpers/download_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/download_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/download_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/email_helper.html CodeIgniter_2.1.0//user_guide/helpers/email_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/email_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/email_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/file_helper.html CodeIgniter_2.1.0//user_guide/helpers/file_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/file_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/file_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/form_helper.html CodeIgniter_2.1.0//user_guide/helpers/form_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/form_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/form_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/html_helper.html CodeIgniter_2.1.0//user_guide/helpers/html_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/html_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/html_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/inflector_helper.html CodeIgniter_2.1.0//user_guide/helpers/inflector_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/inflector_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/inflector_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/language_helper.html CodeIgniter_2.1.0//user_guide/helpers/language_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/language_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/language_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/number_helper.html CodeIgniter_2.1.0//user_guide/helpers/number_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/number_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/number_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/path_helper.html CodeIgniter_2.1.0//user_guide/helpers/path_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/path_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/path_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/security_helper.html CodeIgniter_2.1.0//user_guide/helpers/security_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/security_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/security_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/smiley_helper.html CodeIgniter_2.1.0//user_guide/helpers/smiley_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/smiley_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/smiley_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/string_helper.html CodeIgniter_2.1.0//user_guide/helpers/string_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/string_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/string_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -90,6 +90,17 @@
<code>echo random_string('alnum', 16);</code>
+<h2>increment_string()</h2>
+
+<p>Increments a string by appending a number to it or increasing the number. Useful for creating "copies" or a file or duplicating database content which has unique titles or slugs.</p>
+
+<p>Usage example:</p>
+
+<code>echo increment_string('file', '_'); // "file_1"<br/>
+echo increment_string('file', '-', 2); // "file-2"<br/>
+echo increment_string('file-4'); // "file-5"<br/></code>
+
+
<h2>alternator()</h2>
<p>Allows two or more items to be alternated between, when cycling through a loop. Example:</p>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/text_helper.html CodeIgniter_2.1.0//user_guide/helpers/text_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/text_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/text_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/typography_helper.html CodeIgniter_2.1.0//user_guide/helpers/typography_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/typography_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/typography_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/url_helper.html CodeIgniter_2.1.0//user_guide/helpers/url_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/url_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/url_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.0.2</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/helpers/xml_helper.html CodeIgniter_2.1.0//user_guide/helpers/xml_helper.html
--- CodeIgniter_2.0.3//user_guide/helpers/xml_helper.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/helpers/xml_helper.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
Binary files CodeIgniter_2.0.3//user_guide/images/appflowchart.gif and CodeIgniter_2.1.0//user_guide/images/appflowchart.gif differ
diff -ru CodeIgniter_2.0.3//user_guide/index.html CodeIgniter_2.1.0//user_guide/index.html
--- CodeIgniter_2.0.3//user_guide/index.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/index.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -77,7 +77,6 @@
<li>You want a framework that requires nearly zero configuration.</li>
<li>You want a framework that does not require you to use the command line.</li>
<li>You want a framework that does not require you to adhere to restrictive coding rules.</li>
-<li>You are not interested in large-scale monolithic libraries like PEAR.</li>
<li>You do not want to be forced to learn a templating language (although a template parser is optionally available if you desire one).</li>
<li>You eschew complexity, favoring simple solutions.</li>
<li>You need clear, thorough documentation.</li>
diff -ru CodeIgniter_2.0.3//user_guide/installation/downloads.html CodeIgniter_2.1.0//user_guide/installation/downloads.html
--- CodeIgniter_2.0.3//user_guide/installation/downloads.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/downloads.html 2011-11-15 03:31:59.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -58,7 +58,9 @@
<h1>Downloading CodeIgniter</h1>
<ul>
- <li><a href="http://codeigniter.com/downloads/">CodeIgniter V 2.0.2 (Current version)</a></li>
+ <li><a href="http://codeigniter.com/downloads/">CodeIgniter V 2.1.0 (Current version)</a></li>
+ <li><a href="http://codeigniter.com/download_files/reactor/CodeIgniter_2.0.3.zip">CodeIgniter V 2.0.3</a></li>
+ <li><a href="http://codeigniter.com/download_files/reactor/CodeIgniter_2.0.2.zip">CodeIgniter V 2.0.2</a></li>
<li><a href="http://codeigniter.com/download_files/reactor/CodeIgniter_2.0.1.zip">CodeIgniter V 2.0.1</a></li>
<li><a href="http://codeigniter.com/download_files/reactor/CodeIgniter_2.0.0.zip">CodeIgniter V 2.0.0</a></li>
<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.7.3.zip">CodeIgniter V 1.7.3</a></li>
@@ -86,14 +88,14 @@
-<h1 id="hg">Mercurial Server</h1>
-<p><a href="http://mercurial.selenic.com">Mercurial</a> is a distributed version control system.</p>
+<h1 id="git">Git Server</h1>
+<p><a href="http://git-scm.com/about">Git</a> is a distributed version control system.</p>
- <p>Public Hg access is available at <a href="http://bitbucket.org/ellislab/codeigniter-reactor/">BitBucket</a>.
+ <p>Public Git access is available at <a href="https://github.com/EllisLab/CodeIgniter">GitHub</a>.
Please note that while every effort is made to keep this code base functional, we cannot guarantee the functionality of code taken
from the tip.</p>
- <p>Beginning with version 1.6.1, stable tags are also available via BitBucket, simply select the version from the Tags dropdown.</p>
+ <p>Beginning with version 2.0.3, stable tags are also available via GitHub, simply select the version from the Tags dropdown.</p>
</div>
<!-- END CONTENT -->
diff -ru CodeIgniter_2.0.3//user_guide/installation/index.html CodeIgniter_2.1.0//user_guide/installation/index.html
--- CodeIgniter_2.0.3//user_guide/installation/index.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/index.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/troubleshooting.html CodeIgniter_2.1.0//user_guide/installation/troubleshooting.html
--- CodeIgniter_2.0.3//user_guide/installation/troubleshooting.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/troubleshooting.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_120.html CodeIgniter_2.1.0//user_guide/installation/upgrade_120.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_120.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_120.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_130.html CodeIgniter_2.1.0//user_guide/installation/upgrade_130.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_130.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_130.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_131.html CodeIgniter_2.1.0//user_guide/installation/upgrade_131.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_131.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_131.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_132.html CodeIgniter_2.1.0//user_guide/installation/upgrade_132.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_132.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_132.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_133.html CodeIgniter_2.1.0//user_guide/installation/upgrade_133.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_133.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_133.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_140.html CodeIgniter_2.1.0//user_guide/installation/upgrade_140.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_140.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_140.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_141.html CodeIgniter_2.1.0//user_guide/installation/upgrade_141.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_141.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_141.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_150.html CodeIgniter_2.1.0//user_guide/installation/upgrade_150.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_150.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_150.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_152.html CodeIgniter_2.1.0//user_guide/installation/upgrade_152.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_152.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_152.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_153.html CodeIgniter_2.1.0//user_guide/installation/upgrade_153.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_153.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_153.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_154.html CodeIgniter_2.1.0//user_guide/installation/upgrade_154.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_154.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_154.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_160.html CodeIgniter_2.1.0//user_guide/installation/upgrade_160.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_160.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_160.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_161.html CodeIgniter_2.1.0//user_guide/installation/upgrade_161.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_161.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_161.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_162.html CodeIgniter_2.1.0//user_guide/installation/upgrade_162.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_162.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_162.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_163.html CodeIgniter_2.1.0//user_guide/installation/upgrade_163.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_163.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_163.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_170.html CodeIgniter_2.1.0//user_guide/installation/upgrade_170.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_170.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_170.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_171.html CodeIgniter_2.1.0//user_guide/installation/upgrade_171.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_171.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_171.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_172.html CodeIgniter_2.1.0//user_guide/installation/upgrade_172.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_172.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_172.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_200.html CodeIgniter_2.1.0//user_guide/installation/upgrade_200.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_200.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_200.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_201.html CodeIgniter_2.1.0//user_guide/installation/upgrade_201.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_201.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_201.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_202.html CodeIgniter_2.1.0//user_guide/installation/upgrade_202.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_202.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_202.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_203.html CodeIgniter_2.1.0//user_guide/installation/upgrade_203.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_203.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_203.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -65,25 +65,21 @@
<p>Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one.</p>
<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p>
-
-<h2>Step 2: Update CodeIgniter files</h2>
-
-<p>Replace the files and directories in your "system" folder with the new versions:</p>
-<h2>Step 3: Update your main index.php file</h2>
+<h2>Step 2: Update your main index.php file</h2>
<p>If you are running a stock <dfn>index.php</dfn> file simply replace your version with the new one.</p>
<p>If your <dfn>index.php</dfn> file has internal modifications, please add your modifications to the new file and use it.</p>
-<h2>Step 4: Replace config/user_agents.php</h2>
+<h2>Step 3: Replace config/user_agents.php</h2>
<p>This config file has been updated to contain more user agent types, please copy it to <kbd>application/config/user_agents.php</kbd>.</p>
-<h2>Step 5: Change references of the EXT constant to ".php"</h2>
+<h2>Step 4: Change references of the EXT constant to ".php"</h2>
<p class="important"><strong>Note:</strong> The EXT Constant has been marked as deprecated, but has not been removed from the application. You are encouraged to make the changes sooner rather than later.</p>
-<h2>Step 6: Remove APPPATH.'third_party' from autoload.php</h2>
+<h2>Step 5: Remove APPPATH.'third_party' from autoload.php</h2>
<p>Open application/autoload.php, and look for the following:</p>
Only in CodeIgniter_2.1.0//user_guide/installation: upgrade_210.html
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrade_b11.html CodeIgniter_2.1.0//user_guide/installation/upgrade_b11.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrade_b11.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrade_b11.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/installation/upgrading.html CodeIgniter_2.1.0//user_guide/installation/upgrading.html
--- CodeIgniter_2.0.3//user_guide/installation/upgrading.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/installation/upgrading.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -60,6 +60,7 @@
<p>Please read the upgrade notes corresponding to the version you are upgrading from.</p>
<ul>
+ <li><a href="upgrade_210.html">Upgrading from 2.0.3 to 2.1.0</a></li>
<li><a href="upgrade_203.html">Upgrading from 2.0.2 to 2.0.3</a></li>
<li><a href="upgrade_202.html">Upgrading from 2.0.1 to 2.0.2</a></li>
<li><a href="upgrade_201.html">Upgrading from 2.0 to 2.0.1</a></li>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/benchmark.html CodeIgniter_2.1.0//user_guide/libraries/benchmark.html
--- CodeIgniter_2.0.3//user_guide/libraries/benchmark.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/benchmark.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/caching.html CodeIgniter_2.1.0//user_guide/libraries/caching.html
--- CodeIgniter_2.0.3//user_guide/libraries/caching.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/caching.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/calendar.html CodeIgniter_2.1.0//user_guide/libraries/calendar.html
--- CodeIgniter_2.0.3//user_guide/libraries/calendar.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/calendar.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/cart.html CodeIgniter_2.1.0//user_guide/libraries/cart.html
--- CodeIgniter_2.0.3//user_guide/libraries/cart.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/cart.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -61,7 +61,7 @@
<p>The Cart Class permits items to be added to a session that stays active while a user is browsing your site.
These items can be retrieved and displayed in a standard "shopping cart" format, allowing the user to update the quantity or remove items from the cart.</p>
-<p>Please note that the Cart Class ONLY provides the core "cart" functionality. It does not provide shipping, credit card authorization, or other processing components.</p>
+<p>Please note that the Cart Class ONLY provides the core "cart" functionality. It does not provide shipping, credit card authorization, or other processing components.</p>
<h2>Initializing the Shopping Cart Class</h2>
@@ -106,20 +106,20 @@
<li><strong>qty</strong> - The quantity being purchased.
<li><strong>price</strong> - The price of the item.
<li><strong>name</strong> - The name of the item.
-<li><strong>options</strong> - Any additional attributes that are needed to identify the product. These must be passed via an array.
+<li><strong>options</strong> - Any additional attributes that are needed to identify the product. These must be passed via an array.
</ul>
<p>In addition to the five indexes above, there are two reserved words: <dfn>rowid</dfn> and <dfn>subtotal</dfn>. These are used internally by the Cart class, so
please do NOT use those words as index names when inserting data into the cart.</p>
-<p>Your array may contain additional data. Anything you include in your array will be stored in the session. However, it is best to standardize your data among
-all your products in order to make displaying the information in a table easier.</p>
+<p>Your array may contain additional data. Anything you include in your array will be stored in the session. However, it is best to standardize your data among all your products in order to make displaying the information in a table easier.</p>
+
+<p>The insert() method will return the $rowid if you successfully insert a single item.</p>
<h2>Adding Multiple Items to The Cart</h2>
-<p>By using a multi-dimensional array, as shown below, it is possible to add multiple products to the cart in one action. This is useful in cases where you wish to allow
-people to select from among several items on the same page.</p>
+<p>By using a multi-dimensional array, as shown below, it is possible to add multiple products to the cart in one action. This is useful in cases where you wish to allow people to select from among several items on the same page.</p>
<code>
@@ -268,8 +268,8 @@
<p><strong>What is a Row ID?</strong>&nbsp; The <kbd>row ID</kbd> is a unique identifier that is generated by the cart code when an item is added to the cart. The reason a
unique ID is created is so that identical products with different options can be managed by the cart.</p>
-<p>For example, let's say someone buys two identical t-shirts (same product ID), but in different sizes. The product ID (and other attributes) will be
-identical for both sizes because it's the same shirt. The only difference will be the size. The cart must therefore have a means of identifying this
+<p>For example, let's say someone buys two identical t-shirts (same product ID), but in different sizes. The product ID (and other attributes) will be
+identical for both sizes because it's the same shirt. The only difference will be the size. The cart must therefore have a means of identifying this
difference so that the two sizes of shirts can be managed independently. It does so by creating a unique "row ID" based on the product ID and any options associated with it.</p>
<p>In nearly all cases, updating the cart will be something the user does via the "view cart" page, so as a developer, it is unlikely that you will ever have to concern yourself
@@ -311,7 +311,7 @@
<h2>$this->cart->has_options(rowid);</h2>
-<p>Returns TRUE (boolean) if a particular row in the cart contains options. This function is designed to be used in a loop with <dfn>$this->cart->contents()</dfn>, since you must pass the <kbd>rowid</kbd> to this function, as shown in the <dfn>Displaying the Cart</dfn> example above.</p>
+<p>Returns TRUE (boolean) if a particular row in the cart contains options. This function is designed to be used in a loop with <dfn>$this->cart->contents()</dfn>, since you must pass the <kbd>rowid</kbd> to this function, as shown in the <dfn>Displaying the Cart</dfn> example above.</p>
<h2>$this->cart->product_options(rowid);</h2>
@@ -322,7 +322,7 @@
<h2>$this->cart->destroy();</h2>
-<p>Permits you to destroy the cart. This function will likely be called when you are finished processing the customer's order.</p>
+<p>Permits you to destroy the cart. This function will likely be called when you are finished processing the customer's order.</p>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/config.html CodeIgniter_2.1.0//user_guide/libraries/config.html
--- CodeIgniter_2.0.3//user_guide/libraries/config.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/config.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/email.html CodeIgniter_2.1.0//user_guide/libraries/email.html
--- CodeIgniter_2.0.3//user_guide/libraries/email.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/email.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/encryption.html CodeIgniter_2.1.0//user_guide/libraries/encryption.html
--- CodeIgniter_2.0.3//user_guide/libraries/encryption.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/encryption.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/file_uploading.html CodeIgniter_2.1.0//user_guide/libraries/file_uploading.html
--- CodeIgniter_2.0.3//user_guide/libraries/file_uploading.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/file_uploading.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/form_validation.html CodeIgniter_2.1.0//user_guide/libraries/form_validation.html
--- CodeIgniter_2.0.3//user_guide/libraries/form_validation.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/form_validation.html 2011-11-01 01:15:36.000000000 +0900
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -390,10 +390,10 @@
<p>CodeIgniter lets you pipe multiple rules together. Let's try it. Change your rules in the third parameter of rule setting function, like this:</p>
<code>
-$this->form_validation->set_rules('username', 'Username', 'required|min_length[5]|max_length[12]');<br />
+$this->form_validation->set_rules('username', 'Username', 'required|min_length[5]|max_length[12]|is_unique[users.username]');<br />
$this->form_validation->set_rules('password', 'Password', 'required|matches[passconf]');<br />
$this->form_validation->set_rules('passconf', 'Password Confirmation', 'required');<br />
-$this->form_validation->set_rules('email', 'Email', 'required|valid_email');<br />
+$this->form_validation->set_rules('email', 'Email', 'required|valid_email|is_unique[users.email]');<br />
</code>
<p>The above code sets the following rules:</p>
@@ -508,15 +508,13 @@
<code>$this->form_validation->set_rules('username', 'Username', '<kbd>callback_username_check</kbd>');</code>
-
<p>Then add a new function called <dfn>username_check</dfn> to your controller. Here's how your controller should now look:</p>
-
-<textarea class="textarea" style="width:100%" cols="50" rows="44">&lt;?php
+<textarea class="textarea" style="width:100%" cols="50" rows="40">&lt;?php
class Form extends CI_Controller {
- function index()
+ public function index()
{
$this->load->helper(array('form', 'url'));
@@ -525,7 +523,7 @@
$this->form_validation->set_rules('username', 'Username', 'callback_username_check');
$this->form_validation->set_rules('password', 'Password', 'required');
$this->form_validation->set_rules('passconf', 'Password Confirmation', 'required');
- $this->form_validation->set_rules('email', 'Email', 'required');
+ $this->form_validation->set_rules('email', 'Email', 'required|is_unique[users.email]');
if ($this->form_validation->run() == FALSE)
{
@@ -537,7 +535,7 @@
}
}
- function username_check($str)
+ public function username_check($str)
{
if ($str == 'test')
{
@@ -556,14 +554,13 @@
<p><dfn>Reload your form and submit it with the word "test" as the username. You can see that the form field data was passed to your
callback function for you to process.</dfn></p>
-<p><strong>To invoke a callback just put the function name in a rule, with "callback_" as the rule prefix.</strong></p>
+<p>To invoke a callback just put the function name in a rule, with "callback_" as the rule <strong>prefix</strong>. If you need
+to receive an extra parameter in your callback function, just add it normally after the function name between square brackets,
+as in: "callback_foo<strong>[bar]</strong>", then it will be passed as the second argument of your callback function.</p>
-<p>You can also process the form data that is passed to your callback and return it. If your callback returns anything other than a boolean TRUE/FALSE
+<p><strong>Note:</strong> You can also process the form data that is passed to your callback and return it. If your callback returns anything other than a boolean TRUE/FALSE
it is assumed that the data is your newly processed form data.</p>
-
-
-
<a name="settingerrors"></a>
<h2>Setting Error Messages</h2>
@@ -947,6 +944,13 @@
</tr>
<tr>
+ <td class="td"><strong>is_unique</strong></td>
+ <td class="td">Yes</td>
+ <td class="td">Returns FALSE if the form element is not unique to the table and field name in the parameter.</td>
+ <td class="td">is_unique[table.field]</td>
+ </tr>
+
+ <tr>
<td class="td"><strong>min_length</strong></td>
<td class="td">Yes</td>
<td class="td">Returns FALSE if the form element is shorter then the parameter value.</td>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/ftp.html CodeIgniter_2.1.0//user_guide/libraries/ftp.html
--- CodeIgniter_2.0.3//user_guide/libraries/ftp.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/ftp.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -74,7 +74,7 @@
<h2>Usage Examples</h2>
<p>In this example a connection is opened to the FTP server, and a local file is read and uploaded in ASCII mode. The
-file permissions are set to 755. Note: Setting permissions requires PHP 5.</p>
+file permissions are set to 755.</p>
<code>
$this->load->library('ftp');<br />
@@ -185,8 +185,7 @@
<p><strong>Mode options are:</strong>&nbsp; <kbd>ascii</kbd>, <kbd>binary</kbd>, and <kbd>auto</kbd> (the default). If
<kbd>auto</kbd> is used it will base the mode on the file extension of the source file.</p>
-<p>Permissions are available if you are running PHP 5 and can be passed as an <kbd>octal</kbd> value in the fourth parameter.</p>
-
+<p>Permissions can be passed as an <kbd>octal</kbd> value in the fourth parameter.</p>
<h2>$this->ftp->download()</h2>
@@ -267,7 +266,7 @@
<h2>$this->ftp->mkdir()</h2>
<p>Lets you create a directory on your server. Supply the path ending in the folder name you wish to create, with a trailing slash.
-Permissions can be set by passed an <kbd>octal</kbd> value in the second parameter (if you are running PHP 5).</p>
+Permissions can be set by passed an <kbd>octal</kbd> value in the second parameter.</p>
<code>
// Creates a folder named "bar"<br />
diff -ru CodeIgniter_2.0.3//user_guide/libraries/image_lib.html CodeIgniter_2.1.0//user_guide/libraries/image_lib.html
--- CodeIgniter_2.0.3//user_guide/libraries/image_lib.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/image_lib.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/input.html CodeIgniter_2.1.0//user_guide/libraries/input.html
--- CodeIgniter_2.0.3//user_guide/libraries/input.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/input.html 2011-11-15 03:31:59.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -73,11 +73,11 @@
<p>The security filtering function is called automatically when a new <a href="../general/controllers.html">controller</a> is invoked. It does the following:</p>
<ul>
-<li>Destroys the global GET array. Since CodeIgniter does not utilize GET strings, there is no reason to allow it.</li>
+<li>If $config['allow_get_array'] is FALSE(default is TRUE), destroys the global GET array.</li>
<li>Destroys all global variables in the event register_globals is turned on.</li>
-<li>Filters the POST/COOKIE array keys, permitting only alpha-numeric (and a few other) characters.</li>
+<li>Filters the GET/POST/COOKIE array keys, permitting only alpha-numeric (and a few other) characters.</li>
<li>Provides XSS (Cross-site Scripting Hacks) filtering. This can be enabled globally, or upon request.</li>
-<li>Standardizes newline characters to \n</li>
+<li>Standardizes newline characters to \n(In Windows \r\n)</li>
</ul>
@@ -133,13 +133,13 @@
<code>$this->input->post('some_data', TRUE);</code>
<p>To return an array of all POST items call without any parameters.</p>
-<p>To return all POST items and pass them through the XSS filter leave the first parameter blank while setting the second parameter to boolean;</p>
+<p>To return all POST items and pass them through the XSS filter set the first parameter NULL while setting the second parameter to boolean;</p>
<p>The function returns FALSE (boolean) if there are no items in the POST.</p>
<code>
- $this->input->post(); // returns all POST items with XSS filter
+ $this->input->post(NULL, TRUE); // returns all POST items with XSS filter
<br />
- $this->input->post(NULL, FALSE); // returns all POST items without XSS
+ $this->input->post(); // returns all POST items without XSS filter
</code>
<h2>$this->input->get()</h2>
@@ -149,13 +149,13 @@
<code>$this->input->get('some_data', TRUE);</code>
<p>To return an array of all GET items call without any parameters.</p>
-<p>To return all GET items and pass them through the XSS filter leave the first parameter blank while setting the second parameter to boolean;</p>
+<p>To return all GET items and pass them through the XSS filter set the first parameter NULL while setting the second parameter to boolean;</p>
<p>The function returns FALSE (boolean) if there are no items in the GET.</p>
<code>
- $this->input->get(); // returns all GET items with XSS filter
+ $this->input->get(NULL, TRUE); // returns all GET items with XSS filter
<br />
- $this->input->get(NULL, FALSE); // returns all GET items without XSS filtering
+ $this->input->get(); // returns all GET items without XSS filtering
</code>
<h2>$this->input->get_post()</h2>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/javascript.html CodeIgniter_2.1.0//user_guide/libraries/javascript.html
--- CodeIgniter_2.0.3//user_guide/libraries/javascript.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/javascript.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/language.html CodeIgniter_2.1.0//user_guide/libraries/language.html
--- CodeIgniter_2.0.3//user_guide/libraries/language.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/language.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/loader.html CodeIgniter_2.1.0//user_guide/libraries/loader.html
--- CodeIgniter_2.0.3//user_guide/libraries/loader.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/loader.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
Only in CodeIgniter_2.1.0//user_guide/libraries: migration.html
diff -ru CodeIgniter_2.0.3//user_guide/libraries/output.html CodeIgniter_2.1.0//user_guide/libraries/output.html
--- CodeIgniter_2.0.3//user_guide/libraries/output.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/output.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/pagination.html CodeIgniter_2.1.0//user_guide/libraries/pagination.html
--- CodeIgniter_2.0.3//user_guide/libraries/pagination.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/pagination.html 2011-11-15 03:31:59.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -119,7 +119,11 @@
<p>The number of &quot;digit&quot; links you would like before and after the selected page number. For example, the number 2
will place two digits on either side, as in the example links at the very top of this page.</p>
-<h4>$config['page_query_string'] = TRUE</h4>
+
+<h4>$config['use_page_numbers'] = TRUE;</h4>
+<p>By default, the URI segment will use the starting index for the items you are paginating. If you prefer to show the the actual page number, set this to TRUE.</p>
+
+<h4>$config['page_query_string'] = TRUE;</h4>
<p>By default, the pagination library assume you are using <a href="../general/urls.html">URI Segments</a>, and constructs your links something like</p>
<p><code>http://example.com/index.php/test/page/20</code></p>
<p>If you have $config['enable_query_strings'] set to TRUE your links will automatically be re-written using Query Strings. This option can also be explictly set. Using $config['page_query_string'] set to TRUE, the pagination link will become.</p>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/parser.html CodeIgniter_2.1.0//user_guide/libraries/parser.html
--- CodeIgniter_2.0.3//user_guide/libraries/parser.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/parser.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/security.html CodeIgniter_2.1.0//user_guide/libraries/security.html
--- CodeIgniter_2.0.3//user_guide/libraries/security.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/security.html 2011-11-15 03:37:17.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/sessions.html CodeIgniter_2.1.0//user_guide/libraries/sessions.html
--- CodeIgniter_2.0.3//user_guide/libraries/sessions.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/sessions.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/table.html CodeIgniter_2.1.0//user_guide/libraries/table.html
--- CodeIgniter_2.0.3//user_guide/libraries/table.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/table.html 2011-11-01 01:15:36.000000000 +0900
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/trackback.html CodeIgniter_2.1.0//user_guide/libraries/trackback.html
--- CodeIgniter_2.0.3//user_guide/libraries/trackback.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/trackback.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/typography.html CodeIgniter_2.1.0//user_guide/libraries/typography.html
--- CodeIgniter_2.0.3//user_guide/libraries/typography.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/typography.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/unit_testing.html CodeIgniter_2.1.0//user_guide/libraries/unit_testing.html
--- CodeIgniter_2.0.3//user_guide/libraries/unit_testing.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/unit_testing.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/uri.html CodeIgniter_2.1.0//user_guide/libraries/uri.html
--- CodeIgniter_2.0.3//user_guide/libraries/uri.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/uri.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/user_agent.html CodeIgniter_2.1.0//user_guide/libraries/user_agent.html
--- CodeIgniter_2.0.3//user_guide/libraries/user_agent.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/user_agent.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/xmlrpc.html CodeIgniter_2.1.0//user_guide/libraries/xmlrpc.html
--- CodeIgniter_2.0.3//user_guide/libraries/xmlrpc.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/xmlrpc.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/libraries/zip.html CodeIgniter_2.1.0//user_guide/libraries/zip.html
--- CodeIgniter_2.0.3//user_guide/libraries/zip.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/libraries/zip.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/license.html CodeIgniter_2.1.0//user_guide/license.html
--- CodeIgniter_2.0.3//user_guide/license.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/license.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/nav/nav.js CodeIgniter_2.1.0//user_guide/nav/nav.js
--- CodeIgniter_2.0.3//user_guide/nav/nav.js 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/nav/nav.js 2011-11-01 01:15:36.000000000 +0900
@@ -37,7 +37,16 @@
'<li><a href="'+base+'overview/mvc.html">Model-View-Controller</a></li>' +
'<li><a href="'+base+'overview/goals.html">Architectural Goals</a></li>' +
'</ul>' +
-
+
+ '<h3>Tutorial</h3>' +
+ '<ul>' +
+ '<li><a href="'+base+'tutorial/index.html">Introduction</a></li>' +
+ '<li><a href="'+base+'tutorial/static_pages.html">Static pages</a></li>' +
+ '<li><a href="'+base+'tutorial/news_section.html">News section</a></li>' +
+ '<li><a href="'+base+'tutorial/create_news_items.html">Create news items</a></li>' +
+ '<li><a href="'+base+'tutorial/conclusion.html">Conclusion</a></li>' +
+ '</ul>' +
+
'</td><td class="td_sep" valign="top">' +
'<h3>General Topics</h3>' +
@@ -94,6 +103,7 @@
'<li><a href="'+base+'libraries/javascript.html">Javascript Class</a></li>' +
'<li><a href="'+base+'libraries/loader.html">Loader Class</a></li>' +
'<li><a href="'+base+'libraries/language.html">Language Class</a></li>' +
+ '<li><a href="'+base+'libraries/migration.html">Migration Class</a></li>' +
'<li><a href="'+base+'libraries/output.html">Output Class</a></li>' +
'<li><a href="'+base+'libraries/pagination.html">Pagination Class</a></li>' +
'<li><a href="'+base+'libraries/security.html">Security Class</a></li>' +
diff -ru CodeIgniter_2.0.3//user_guide/overview/appflow.html CodeIgniter_2.1.0//user_guide/overview/appflow.html
--- CodeIgniter_2.0.3//user_guide/overview/appflow.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/overview/appflow.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -60,7 +60,7 @@
<p>The following graphic illustrates how data flows throughout the system:</p>
-<div><img src="../images/appflowchart.gif" width="697" height="205" border="0" alt="CodeIgniter application flow" /></div>
+<div><img src="../images/appflowchart.gif" width="769" height="212" alt="CodeIgniter application flow"></div>
<ol>
diff -ru CodeIgniter_2.0.3//user_guide/overview/at_a_glance.html CodeIgniter_2.1.0//user_guide/overview/at_a_glance.html
--- CodeIgniter_2.0.3//user_guide/overview/at_a_glance.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/overview/at_a_glance.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/overview/cheatsheets.html CodeIgniter_2.1.0//user_guide/overview/cheatsheets.html
--- CodeIgniter_2.0.3//user_guide/overview/cheatsheets.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/overview/cheatsheets.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/overview/features.html CodeIgniter_2.1.0//user_guide/overview/features.html
--- CodeIgniter_2.0.3//user_guide/overview/features.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/overview/features.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/overview/getting_started.html CodeIgniter_2.1.0//user_guide/overview/getting_started.html
--- CodeIgniter_2.0.3//user_guide/overview/getting_started.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/overview/getting_started.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/overview/goals.html CodeIgniter_2.1.0//user_guide/overview/goals.html
--- CodeIgniter_2.0.3//user_guide/overview/goals.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/overview/goals.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/overview/index.html CodeIgniter_2.1.0//user_guide/overview/index.html
--- CodeIgniter_2.0.3//user_guide/overview/index.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/overview/index.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/overview/mvc.html CodeIgniter_2.1.0//user_guide/overview/mvc.html
--- CodeIgniter_2.0.3//user_guide/overview/mvc.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/overview/mvc.html 2011-11-01 01:15:36.000000000 +0900
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
diff -ru CodeIgniter_2.0.3//user_guide/toc.html CodeIgniter_2.1.0//user_guide/toc.html
--- CodeIgniter_2.0.3//user_guide/toc.html 2011-08-20 20:59:14.000000000 +0900
+++ CodeIgniter_2.1.0//user_guide/toc.html 2011-11-01 01:15:36.000000000 +0900
@@ -29,7 +29,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td>
</tr>
</table>
</div>
@@ -89,6 +89,14 @@
<li><a href="./overview/goals.html">Architectural Goals</a></li>
</ul>
+<h3>Tutorial</h3>
+<ul>
+ <li><a href="./tutorial/index.html">Introduction</a></li>
+ <li><a href="./tutorial/static_pages.html">Static pages</a></li>
+ <li><a href="./tutorial/news_section.html">News section</a></li>
+ <li><a href="./tutorial/create_news_items.html">Create news items</a></li>
+ <li><a href="./tutorial/conclusion.html">Conclusion</a></li>
+</ul>
</td>
<td valign="top" width="25%">
@@ -149,6 +157,7 @@
<li><a href="./libraries/javascript.html">Javascript Class</a></li>
<li><a href="./libraries/loader.html">Loader Class</a></li>
<li><a href="./libraries/language.html">Language Class</a></li>
+<li><a href="./libraries/migration.html">Migration Class</a></li>
<li><a href="./libraries/output.html">Output Class</a></li>
<li><a href="./libraries/pagination.html">Pagination Class</a></li>
<li><a href="./libraries/security.html">Security Class</a></li>
Only in CodeIgniter_2.1.0//user_guide: tutorial
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment