diff options
187 files changed, 1131 insertions, 901 deletions
diff --git a/application/config/config.php b/application/config/config.php index dc029a94b..1ec65435e 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -262,11 +262,13 @@ $config['sess_time_to_update'] = 300; | 'cookie_prefix' = Set a prefix if you need to avoid collisions | 'cookie_domain' = Set to .your-domain.com for site-wide cookies | 'cookie_path' = Typically will be a forward slash +| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists. | */ -$config['cookie_prefix'] = ''; -$config['cookie_domain'] = ''; -$config['cookie_path'] = '/'; +$config['cookie_prefix'] = ""; +$config['cookie_domain'] = ""; +$config['cookie_path'] = "/"; +$config['cookie_secure'] = FALSE; /* |-------------------------------------------------------------------------- @@ -357,4 +359,4 @@ $config['proxy_ips'] = ''; /* End of file config.php */ -/* Location: ./application/config/config.php */
\ No newline at end of file +/* Location: ./application/config/config.php */ diff --git a/application/config/migration.php b/application/config/migration.php deleted file mode 100644 index 37b1b8534..000000000 --- a/application/config/migration.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php defined('BASEPATH') OR exit('No direct script access allowed');
-/*
-|--------------------------------------------------------------------------
-| Enable/Disable Migrations
-|--------------------------------------------------------------------------
-|
-| Migrations are disabled by default for security reasons.
-| You should enable migrations whenever you intend to do a schema migration
-| and disable it back when you're done.
-|
-*/
-$config['migration_enabled'] = TRUE;
-
-
-/*
-|--------------------------------------------------------------------------
-| Migrations version
-|--------------------------------------------------------------------------
-|
-| This is used to set migration version that the file system should be on.
-| If you run $this->migration->latest() this is the version that schema will
-| be upgraded / downgraded to.
-|
-*/
-$config['migration_version'] = 1;
-
-
-/*
-|--------------------------------------------------------------------------
-| Migrations Path
-|--------------------------------------------------------------------------
-|
-| Path to your migrations folder.
-| Typically, it will be within your application path.
-| Also, writing permission is required within the migrations path.
-|
-*/
-$config['migration_path'] = APPPATH . 'migrations/';
diff --git a/application/config/mimes.php b/application/config/mimes.php index 58eea5f83..8065794ff 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -97,7 +97,8 @@ $mimes = array( 'hqx' => 'application/mac-binhex40', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'word' => array('application/msword', 'application/octet-stream'), 'xl' => 'application/excel', - 'eml' => 'message/rfc822' + 'eml' => 'message/rfc822', + 'json' => array('application/json', 'text/json') ); diff --git a/application/controllers/migrate.php b/application/controllers/migrate.php deleted file mode 100644 index e5442e79c..000000000 --- a/application/controllers/migrate.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -class Migrate extends CI_Controller -{ - function __construct() - { - parent::__construct(); - - $this->load->library('migration'); - - /** VERY IMPORTANT - only turn this on when you need it. */ -// show_error('Access to this controller is blocked, turn me on when you need me.'); - } - - // Install up to the most up-to-date version. - function install() - { - if ( ! $this->migration->current()) - { - show_error($this->migration->error); - exit; - } - - echo "<br />Migration Successful<br />"; - } - - // This will migrate up to the configed migration version - function version($id = NULL) - { - // No $id supplied? Use the config version - $id OR $id = $this->config->item('migration_version'); - - if ( ! $this->migration->version($id)) - { - show_error($this->migration->error); - exit; - } - - echo "<br />Migration Successful<br />"; - } -} diff --git a/application/controllers/welcome.php b/application/controllers/welcome.php index 79689f012..21bef43d9 100644 --- a/application/controllers/welcome.php +++ b/application/controllers/welcome.php @@ -2,12 +2,22 @@ class Welcome extends CI_Controller { - function __construct() - { - parent::__construct(); - } - - function index() + /** + * Index Page for this controller. + * + * Maps to the following URL + * http://example.com/index.php/welcome + * - or - + * http://example.com/index.php/welcome/index + * - or - + * Since this controller is set as the default controller in + * config/routes.php, it's displayed at http://example.com/ + * + * So any other public methods not prefixed with an underscore will + * map to /index.php/welcome/<method_name> + * @see http://codeigniter.com/user_guide/general/urls.html + */ + public function index() { $this->load->view('welcome_message'); } diff --git a/application/migrations/001_Create_accounts.php b/application/migrations/001_Create_accounts.php deleted file mode 100644 index 4b2fc936f..000000000 --- a/application/migrations/001_Create_accounts.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php defined('BASEPATH') OR exit('No direct script access allowed');
-
-class Migration_Create_accounts extends CI_Migration {
-
- function up()
- {
- if ( ! $this->db->table_exists('accounts'))
- {
- // Setup Keys
- $this->dbforge->add_key('id', TRUE);
-
- $this->dbforge->add_field(array(
- 'id' => array('type' => 'INT', 'constraint' => 5, 'unsigned' => TRUE, 'auto_increment' => TRUE),
- 'company_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE),
- 'first_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE),
- 'last_name' => array('type' => 'VARCHAR', 'constraint' => '200', 'null' => FALSE),
- 'phone' => array('type' => 'TEXT', 'null' => FALSE),
- 'email' => array('type' => 'TEXT', 'null' => FALSE),
- 'address' => array('type' => 'TEXT', 'null' => FALSE),
- 'Last_Update' => array('type' => 'DATETIME', 'null' => FALSE)
- ));
-
- $this->dbforge->add_field("Created_At TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP");
- $this->dbforge->create_table('accounts', TRUE);
- }
- }
-
- function down()
- {
- $this->dbforge->drop_table('accounts');
- }
-}
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 567e67f65..39a4d7ffd 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -32,7 +32,14 @@ * Define the CodeIgniter Version * ------------------------------------------------------ */ - define('CI_VERSION', '2.0'); + define('CI_VERSION', '2.0.1'); + +/* + * ------------------------------------------------------ + * Define the CodeIgniter Branch (Core = TRUE, Reactor = FALSE) + * ------------------------------------------------------ + */ + define('CI_CORE', FALSE); /* * ------------------------------------------------------ @@ -46,7 +53,14 @@ * Load the framework constants * ------------------------------------------------------ */ - require(APPPATH.'config/constants'.EXT); + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/constants'.EXT)) + { + require(APPPATH.'config/'.ENVIRONMENT.'/constants'.EXT); + } + else + { + require(APPPATH.'config/constants'.EXT); + } /* * ------------------------------------------------------ diff --git a/system/core/Common.php b/system/core/Common.php index cd6b93355..f424a2cc9 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -88,7 +88,7 @@ @unlink($file); return TRUE; } - elseif (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE) + elseif ( ! is_file($file) OR ($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE) { return FALSE; } diff --git a/system/core/Config.php b/system/core/Config.php index da22222dc..a2a7dd564 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -51,7 +51,7 @@ class CI_Config { // Set the base_url automatically if none was provided if ($this->config['base_url'] == '') { - if(isset($_SERVER['HTTP_HOST'])) + if (isset($_SERVER['HTTP_HOST'])) { $base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http'; $base_url .= '://'. $_SERVER['HTTP_HOST']; @@ -83,7 +83,7 @@ class CI_Config { $file = ($file == '') ? 'config' : str_replace(EXT, '', $file); $loaded = FALSE; - foreach($this->_config_paths as $path) + foreach ($this->_config_paths as $path) { $file_path = $path.'config/'.ENVIRONMENT.'/'.$file.EXT; @@ -318,4 +318,4 @@ class CI_Config { // END CI_Config class /* End of file Config.php */ -/* Location: ./system/core/Config.php */
\ No newline at end of file +/* Location: ./system/core/Config.php */ diff --git a/system/core/Hooks.php b/system/core/Hooks.php index 75fd811b0..d1e5586de 100644 --- a/system/core/Hooks.php +++ b/system/core/Hooks.php @@ -65,7 +65,15 @@ class CI_Hooks { // Grab the "hooks" definition file. // If there are no hooks, we're done. - @include(APPPATH.'config/hooks'.EXT); + if (is_file(APPPATH.'config/'.ENVIRONMENT.'/hooks'.EXT)) + { + include(APPPATH.'config/'.ENVIRONMENT.'/hooks'.EXT); + } + elseif (is_file(APPPATH.'config/hooks'.EXT)) + { + include(APPPATH.'config/hooks'.EXT); + } + if ( ! isset($hook) OR ! is_array($hook)) { diff --git a/system/core/Input.php b/system/core/Input.php index 3e82874fd..18131350f 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -109,8 +109,21 @@ class CI_Input { * @param bool * @return string */ - function get($index = '', $xss_clean = FALSE) + function get($index = NULL, $xss_clean = FALSE) { + // Check if a field has been provided + if ($index === NULL AND ! empty($_GET)) + { + $get = array(); + + // loop through the full _GET array + foreach (array_keys($_GET) as $key) + { + $get[$key] = $this->_fetch_from_array($_GET, $key, $xss_clean); + } + return $get; + } + return $this->_fetch_from_array($_GET, $index, $xss_clean); } @@ -124,8 +137,21 @@ class CI_Input { * @param bool * @return string */ - function post($index = '', $xss_clean = FALSE) + function post($index = NULL, $xss_clean = FALSE) { + // Check if a field has been provided + if ($index === NULL AND ! empty($_POST)) + { + $post = array(); + + // Loop through the full _POST array and return it + foreach (array_keys($_POST) as $key) + { + $post[$key] = $this->_fetch_from_array($_POST, $key, $xss_clean); + } + return $post; + } + return $this->_fetch_from_array($_POST, $index, $xss_clean); } @@ -182,13 +208,15 @@ class CI_Input { * @param string the cookie domain. Usually: .yourdomain.com * @param string the cookie path * @param string the cookie prefix + * @param bool true makes the cookie secure * @return void */ - function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '') + function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE) { if (is_array($name)) { - foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'name') as $item) + // always leave 'name' in last place, as the loop will break otherwise, due to $$item + foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'secure', 'name') as $item) { if (isset($name[$item])) { @@ -209,6 +237,10 @@ class CI_Input { { $path = config_item('cookie_path'); } + if ($secure == FALSE AND config_item('cookie_secure') != FALSE) + { + $secure = config_item('cookie_secure'); + } if ( ! is_numeric($expire)) { @@ -219,7 +251,7 @@ class CI_Input { $expire = ($expire > 0) ? time() + $expire : 0; } - setcookie($prefix.$name, $value, $expire, $path, $domain, 0); + setcookie($prefix.$name, $value, $expire, $path, $domain, $secure); } // -------------------------------------------------------------------- @@ -413,7 +445,7 @@ class CI_Input { { if (is_array($_GET) AND count($_GET) > 0) { - foreach($_GET as $key => $val) + foreach ($_GET as $key => $val) { $_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val); } @@ -423,7 +455,7 @@ class CI_Input { // Clean $_POST Data if (is_array($_POST) AND count($_POST) > 0) { - foreach($_POST as $key => $val) + foreach ($_POST as $key => $val) { $_POST[$this->_clean_input_keys($key)] = $this->_clean_input_data($val); } @@ -441,7 +473,7 @@ class CI_Input { unset($_COOKIE['$Path']); unset($_COOKIE['$Domain']); - foreach($_COOKIE as $key => $val) + foreach ($_COOKIE as $key => $val) { $_COOKIE[$this->_clean_input_keys($key)] = $this->_clean_input_data($val); } @@ -507,7 +539,7 @@ class CI_Input { { if (strpos($str, "\r") !== FALSE) { - $str = str_replace(array("\r\n", "\r"), PHP_EOL, $str); + $str = str_replace(array("\r\n", "\r", "\r\n\n"), PHP_EOL, $str); } } @@ -649,4 +681,4 @@ class CI_Input { // END Input class /* End of file Input.php */ -/* Location: ./system/core/Input.php */
\ No newline at end of file +/* Location: ./system/core/Input.php */ diff --git a/system/core/Lang.php b/system/core/Lang.php index fb177902e..0b926a303 100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -130,6 +130,13 @@ class CI_Lang { function line($line = '') { $line = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line]; + + // Because killer robots like unicorns! + if ($line === FALSE) + { + log_message('error', 'Could not find the language line "'.$line.'"'); + } + return $line; } diff --git a/system/core/Loader.php b/system/core/Loader.php index 72497c724..5c7a7eff8 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -79,7 +79,7 @@ class CI_Loader { { if (is_array($library)) { - foreach($library as $class) + foreach ($library as $read) { $this->library($class, $params); } @@ -117,7 +117,7 @@ class CI_Loader { { if (is_array($model)) { - foreach($model as $babe) + foreach ($model as $babe) { $this->model($babe); } @@ -965,7 +965,15 @@ class CI_Loader { */ function _ci_autoloader() { - include_once(APPPATH.'config/autoload'.EXT); + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload'.EXT)) + { + include_once(APPPATH.'config/'.ENVIRONMENT.'/autoload'.EXT); + } + else + { + include_once(APPPATH.'config/autoload'.EXT); + } + if ( ! isset($autoload)) { @@ -1093,4 +1101,4 @@ class CI_Loader { } /* End of file Loader.php */ -/* Location: ./system/core/Loader.php */
\ No newline at end of file +/* Location: ./system/core/Loader.php */ diff --git a/system/core/Output.php b/system/core/Output.php index 7fb9f7916..5ec096a47 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -28,19 +28,32 @@ */ class CI_Output { - var $final_output; - var $cache_expiration = 0; - var $headers = array(); - var $enable_profiler = FALSE; - var $parse_exec_vars = TRUE; // whether or not to parse variables like {elapsed_time} and {memory_usage} - - var $_zlib_oc = FALSE; - var $_profiler_sections = array(); + public $parse_exec_vars = TRUE; // whether or not to parse variables like {elapsed_time} and {memory_usage} + protected $final_output; + protected $cache_expiration = 0; + protected $headers = array(); + protected $mime_types = array(); + protected $enable_profiler = FALSE; + protected $_zlib_oc = FALSE; + protected $_profiler_sections = array(); function __construct() { $this->_zlib_oc = @ini_get('zlib.output_compression'); + // Get mime types for later + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT)) + { + include APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT; + } + else + { + include APPPATH.'config/mimes'.EXT; + } + + + $this->mime_types = $mimes; + log_message('debug', "Output Class Initialized"); } @@ -73,6 +86,8 @@ class CI_Output { function set_output($output) { $this->final_output = $output; + + return $this; } // -------------------------------------------------------------------- @@ -96,6 +111,8 @@ class CI_Output { { $this->final_output .= $output; } + + return $this; } // -------------------------------------------------------------------- @@ -125,6 +142,42 @@ class CI_Output { } $this->headers[] = array($header, $replace); + + return $this; + } + + // -------------------------------------------------------------------- + + /** + * Set Content Type Header + * + * @access public + * @param string extension of the file we're outputting + * @return void + */ + function set_content_type($mime_type) + { + if (strpos($mime_type, '/') === FALSE) + { + $extension = ltrim($mime_type, '.'); + + // Is this extension supported? + if (isset($this->mime_types[$extension])) + { + $mime_type =& $this->mime_types[$extension]; + + if (is_array($mime_type)) + { + $mime_type = current($mime_type); + } + } + } + + $header = 'Content-Type: '.$mime_type; + + $this->headers[] = array($header, TRUE); + + return $this; } // -------------------------------------------------------------------- @@ -141,6 +194,8 @@ class CI_Output { function set_status_header($code = 200, $text = '') { set_status_header($code, $text); + + return $this; } // -------------------------------------------------------------------- @@ -155,6 +210,8 @@ class CI_Output { function enable_profiler($val = TRUE) { $this->enable_profiler = (is_bool($val)) ? $val : TRUE; + + return $this; } // -------------------------------------------------------------------- @@ -174,6 +231,8 @@ class CI_Output { { $this->_profiler_sections[$section] = ($enable !== FALSE) ? TRUE : FALSE; } + + return $this; } // -------------------------------------------------------------------- @@ -188,6 +247,8 @@ class CI_Output { function cache($time) { $this->cache_expiration = ( ! is_numeric($time)) ? 0 : $time; + + return $this; } // -------------------------------------------------------------------- diff --git a/system/core/Router.php b/system/core/Router.php index 6893e6e92..2c78efe07 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -87,7 +87,15 @@ class CI_Router { } // Load the routes.php file. - @include(APPPATH.'config/routes'.EXT); + if (is_file(APPPATH.'config/'.ENVIRONMENT.'/routes'.EXT)) + { + include(APPPATH.'config/'.ENVIRONMENT.'/routes'.EXT); + } + elseif (is_file(APPPATH.'config/routes'.EXT)) + { + include(APPPATH.'config/routes'.EXT); + } + $this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route; unset($route); diff --git a/system/database/DB.php b/system/database/DB.php index 513e5aefd..93ee3922a 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -88,7 +88,7 @@ function &DB($params = '', $active_record_override = NULL) { parse_str($dns['query'], $extra); - foreach($extra as $key => $val) + foreach ($extra as $key => $val) { // booleans please if (strtoupper($val) == "TRUE") diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index ce9d1c1af..db8471364 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -954,7 +954,7 @@ class CI_DB_active_record extends CI_DB_driver { } else { - $this->ar_set[$this->_protect_identifiers($k)] = $this->escape($v); + $this->ar_set[$this->_protect_identifiers($k, FALSE, TRUE)] = $this->escape($v); } } @@ -1020,11 +1020,11 @@ class CI_DB_active_record extends CI_DB_driver { if ($query->num_rows() == 0) { - return '0'; + return 0; } $row = $query->row(); - return $row->numrows; + return (int) $row->numrows; } // -------------------------------------------------------------------- @@ -1156,7 +1156,7 @@ class CI_DB_active_record extends CI_DB_driver { $this->ar_set[] = array(); return; } - + ksort($row); // puts $row in the same order as our keys if ($escape === FALSE) @@ -1167,7 +1167,7 @@ class CI_DB_active_record extends CI_DB_driver { { $clean = array(); - foreach($row as $value) + foreach ($row as $value) { $clean[] = $this->escape($value); } @@ -1425,7 +1425,7 @@ class CI_DB_active_record extends CI_DB_driver { $index_set = FALSE; $clean = array(); - foreach($v as $k2 => $v2) + foreach ($v as $k2 => $v2) { if ($k2 == $index) { @@ -1569,7 +1569,7 @@ class CI_DB_active_record extends CI_DB_driver { } elseif (is_array($table)) { - foreach($table as $single_table) + foreach ($table as $single_table) { $this->delete($single_table, $where, $limit, FALSE); } diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 2d8f592e3..e7a9de475 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -767,7 +767,7 @@ class CI_DB_driver { if ($query->num_rows() > 0) { - foreach($query->result_array() as $row) + foreach ($query->result_array() as $row) { if (isset($row['TABLE_NAME'])) { @@ -834,7 +834,7 @@ class CI_DB_driver { $query = $this->query($sql); $retval = array(); - foreach($query->result_array() as $row) + foreach ($query->result_array() as $row) { if (isset($row['COLUMN_NAME'])) { @@ -904,7 +904,7 @@ class CI_DB_driver { $fields = array(); $values = array(); - foreach($data as $key => $val) + foreach ($data as $key => $val) { $fields[] = $this->_escape_identifiers($key); $values[] = $this->escape($val); @@ -932,7 +932,7 @@ class CI_DB_driver { } $fields = array(); - foreach($data as $key => $val) + foreach ($data as $key => $val) { $fields[$this->_protect_identifiers($key)] = $this->escape($val); } @@ -1175,7 +1175,7 @@ class CI_DB_driver { $trace = debug_backtrace(); - foreach($trace as $call) + foreach ($trace as $call) { if (isset($call['file']) && strpos($call['file'], BASEPATH.'database') === FALSE) { @@ -1248,7 +1248,7 @@ class CI_DB_driver { { $escaped_array = array(); - foreach($item as $k => $v) + foreach ($item as $k => $v) { $escaped_array[$this->_protect_identifiers($k)] = $this->_protect_identifiers($v); } diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 27f2c372d..a71fca78f 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -99,7 +99,7 @@ class CI_DB_forge { { if (is_array($key)) { - foreach($key as $one) + foreach ($key as $one) { $this->add_key($one, $primary); } diff --git a/system/database/DB_result.php b/system/database/DB_result.php index fb4268c21..76e1d6abb 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -78,7 +78,7 @@ class CI_DB_result { while ($row = $this->_fetch_object()) { $object = new $class_name(); - foreach($row as $key => $value) + foreach ($row as $key => $value) { $object->$key = $value; } diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 5a69132cd..b581a478c 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -253,7 +253,7 @@ class CI_DB_mssql_driver extends CI_DB { { if (is_array($str)) { - foreach($str as $key => $val) + foreach ($str as $key => $val) { $str[$key] = $this->escape_str($val, $like); } @@ -267,9 +267,9 @@ class CI_DB_mssql_driver extends CI_DB { // escape LIKE condition wildcards if ($like === TRUE) { - $str = str_replace( array('%', '_', $this->_like_escape_chr), - array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr), - $str); + $str = str_replace( array('%', $this->_like_escape_chr, '_'), + array($this->_like_escape_chr.'%', $this->_like_escape_chr.$this->_like_escape_chr, $this->_like_escape_chr.'_'), + $str); } return $str; @@ -551,7 +551,7 @@ class CI_DB_mssql_driver extends CI_DB { */ function _update($table, $values, $where, $orderby = array(), $limit = FALSE) { - foreach($values as $key => $val) + foreach ($values as $key => $val) { $valstr[] = $key." = ".$val; } diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 72c834b8f..4ff9b0a11 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -286,7 +286,7 @@ class CI_DB_mysql_driver extends CI_DB { { if (is_array($str)) { - foreach($str as $key => $val) + foreach ($str as $key => $val) { $str[$key] = $this->escape_str($val, $like); } @@ -590,7 +590,7 @@ class CI_DB_mysql_driver extends CI_DB { */ function _update($table, $values, $where, $orderby = array(), $limit = FALSE) { - foreach($values as $key => $val) + foreach ($values as $key => $val) { $valstr[] = $key . ' = ' . $val; } @@ -627,11 +627,11 @@ class CI_DB_mysql_driver extends CI_DB { $ids = array(); $where = ($where != '' AND count($where) >=1) ? implode(" ", $where).' AND ' : ''; - foreach($values as $key => $val) + foreach ($values as $key => $val) { $ids[] = $val[$index]; - foreach(array_keys($val) as $field) + foreach (array_keys($val) as $field) { if ($field != $index) { @@ -643,7 +643,7 @@ class CI_DB_mysql_driver extends CI_DB { $sql = "UPDATE ".$table." SET "; $cases = ''; - foreach($final as $k => $v) + foreach ($final as $k => $v) { $cases .= $k.' = CASE '."\n"; foreach ($v as $row) diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 8942100d4..ccdabce1a 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -287,7 +287,7 @@ class CI_DB_mysqli_driver extends CI_DB { { if (is_array($str)) { - foreach($str as $key => $val) + foreach ($str as $key => $val) { $str[$key] = $this->escape_str($val, $like); } @@ -571,7 +571,7 @@ class CI_DB_mysqli_driver extends CI_DB { */ function _update($table, $values, $where, $orderby = array(), $limit = FALSE) { - foreach($values as $key => $val) + foreach ($values as $key => $val) { $valstr[] = $key." = ".$val; } @@ -607,11 +607,11 @@ class CI_DB_mysqli_driver extends CI_DB { $ids = array(); $where = ($where != '' AND count($where) >=1) ? implode(" ", $where).' AND ' : ''; - foreach($values as $key => $val) + foreach ($values as $key => $val) { $ids[] = $val[$index]; - foreach(array_keys($val) as $field) + foreach (array_keys($val) as $field) { if ($field != $index) { @@ -623,7 +623,7 @@ class CI_DB_mysqli_driver extends CI_DB { $sql = "UPDATE ".$table." SET "; $cases = ''; - foreach($final as $k => $v) + foreach ($final as $k => $v) { $cases .= $k.' = CASE '."\n"; foreach ($v as $row) diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 64f53cc3f..14df104ff 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -253,7 +253,7 @@ class CI_DB_oci8_driver extends CI_DB { $sql = "begin $package.$procedure("; $have_cursor = FALSE; - foreach($params as $param) + foreach ($params as $param) { $sql .= $param['name'] . ","; @@ -395,7 +395,7 @@ class CI_DB_oci8_driver extends CI_DB { { if (is_array($str)) { - foreach($str as $key => $val) + foreach ($str as $key => $val) { $str[$key] = $this->escape_str($val, $like); } @@ -655,7 +655,7 @@ class CI_DB_oci8_driver extends CI_DB { */ function _update($table, $values, $where, $orderby = array(), $limit = FALSE) { - foreach($values as $key => $val) + foreach ($values as $key => $val) { $valstr[] = $key." = ".$val; } diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index c8e03c356..81e0d7cf2 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -264,7 +264,7 @@ class CI_DB_odbc_driver extends CI_DB { { if (is_array($str)) { - foreach($str as $key => $val) + foreach ($str as $key => $val) { $str[$key] = $this->escape_str($val, $like); } @@ -523,7 +523,7 @@ class CI_DB_odbc_driver extends CI_DB { */ function _update($table, $values, $where, $orderby = array(), $limit = FALSE) { - foreach($values as $key => $val) + foreach ($values as $key => $val) { $valstr[] = $key." = ".$val; } diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php index a81a2b8b7..5d64a464f 100644 --- a/system/database/drivers/odbc/odbc_result.php +++ b/system/database/drivers/odbc/odbc_result.php @@ -188,7 +188,7 @@ class CI_DB_odbc_result extends CI_DB_result { */ function _odbc_fetch_object(& $odbc_result) { $rs = array(); - $rs_obj = false; + $rs_obj = FALSE; if (odbc_fetch_into($odbc_result, $rs)) { foreach ($rs as $k=>$v) { $field_name= odbc_field_name($odbc_result, $k+1); @@ -210,7 +210,7 @@ class CI_DB_odbc_result extends CI_DB_result { */ function _odbc_fetch_array(& $odbc_result) { $rs = array(); - $rs_assoc = false; + $rs_assoc = FALSE; if (odbc_fetch_into($odbc_result, $rs)) { $rs_assoc=array(); foreach ($rs as $k=>$v) { diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 0bb7974d8..47ff36246 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -283,7 +283,7 @@ class CI_DB_postgre_driver extends CI_DB { { if (is_array($str)) { - foreach($str as $key => $val) + foreach ($str as $key => $val) { $str[$key] = $this->escape_str($val, $like); } @@ -330,21 +330,21 @@ class CI_DB_postgre_driver extends CI_DB { $v = $this->_version(); $v = $v['server']; - $table = func_num_args() > 0 ? func_get_arg(0) : null; - $column = func_num_args() > 1 ? func_get_arg(1) : null; + $table = func_num_args() > 0 ? func_get_arg(0) : NULL; + $column = func_num_args() > 1 ? func_get_arg(1) : NULL; - if ($table == null && $v >= '8.1') + if ($table == NULL && $v >= '8.1') { $sql='SELECT LASTVAL() as ins_id'; } - elseif ($table != null && $column != null && $v >= '8.0') + elseif ($table != NULL && $column != NULL && $v >= '8.0') { $sql = sprintf("SELECT pg_get_serial_sequence('%s','%s') as seq", $table, $column); $query = $this->query($sql); $row = $query->row(); $sql = sprintf("SELECT CURRVAL('%s') as ins_id", $row->seq); } - elseif ($table != null) + elseif ($table != NULL) { // seq_name passed in table parameter $sql = sprintf("SELECT CURRVAL('%s') as ins_id", $table); @@ -568,7 +568,7 @@ class CI_DB_postgre_driver extends CI_DB { */ function _update($table, $values, $where, $orderby = array(), $limit = FALSE) { - foreach($values as $key => $val) + foreach ($values as $key => $val) { $valstr[] = $key." = ".$val; } diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 5bfc1f558..eb4e585b3 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -280,7 +280,7 @@ class CI_DB_sqlite_driver extends CI_DB { { if (is_array($str)) { - foreach($str as $key => $val) + foreach ($str as $key => $val) { $str[$key] = $this->escape_str($val, $like); } @@ -537,7 +537,7 @@ class CI_DB_sqlite_driver extends CI_DB { */ function _update($table, $values, $where, $orderby = array(), $limit = FALSE) { - foreach($values as $key => $val) + foreach ($values as $key => $val) { $valstr[] = $key." = ".$val; } diff --git a/system/helpers/array_helper.php b/system/helpers/array_helper.php index 6b2415df2..075a31fdf 100644 --- a/system/helpers/array_helper.php +++ b/system/helpers/array_helper.php @@ -69,6 +69,7 @@ if ( ! function_exists('random_element')) { return $array; } + return $array[array_rand($array)]; } } diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index c0e3798f4..19ec0c778 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -87,7 +87,7 @@ if ( ! function_exists('create_captcha')) $current_dir = @opendir($img_path); - while($filename = @readdir($current_dir)) + while ($filename = @readdir($current_dir)) { if ($filename != "." and $filename != ".." and $filename != "index.html") { diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index 7701d503f..7cee02827 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -44,11 +44,11 @@ */ if ( ! function_exists('set_cookie')) { - function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '') + function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE) { // Set the config file options $CI =& get_instance(); - $CI->input->set_cookie($name, $value, $expire, $domain, $path, $prefix); + $CI->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure); } } diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 6cecd0d11..e537cdeca 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -58,7 +58,14 @@ if ( ! function_exists('force_download')) $extension = end($x); // Load the mime types - @include(APPPATH.'config/mimes'.EXT); + if (is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT)) + { + include(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT); + } + elseif (is_file(APPPATH.'config/mimes'.EXT)) + { + include(APPPATH.'config/mimes'.EXT); + } // Set a default mime if we can't find it if ( ! isset($mimes[$extension])) diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 334eef87c..7a35c3fa1 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -128,7 +128,7 @@ if ( ! function_exists('delete_files')) return FALSE; } - while(FALSE !== ($filename = @readdir($current_dir))) + while (FALSE !== ($filename = @readdir($current_dir))) { if ($filename != "." and $filename != "..") { @@ -352,7 +352,16 @@ if ( ! function_exists('get_mime_by_extension')) if ( ! is_array($mimes)) { - if ( ! require_once(APPPATH.'config/mimes.php')) + if (is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT)) + { + include(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT); + } + elseif (is_file(APPPATH.'config/mimes'.EXT)) + { + include(APPPATH.'config/mimes'.EXT); + } + + if ( ! is_array($mimes)) { return FALSE; } diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 758056b50..532309794 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -49,7 +49,10 @@ if ( ! function_exists('form_open')) $attributes = 'method="post"'; } - $action = ( strpos($action, '://') === FALSE) ? $CI->config->site_url($action) : $action; + if ($action && strpos($action, '://') === FALSE) + { + $action = $CI->config->site_url($action); + } $form = '<form action="'.$action.'"'; diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 68c6f5908..53fc899a3 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -258,7 +258,16 @@ if ( ! function_exists('doctype')) if ( ! is_array($_doctypes)) { - if ( ! require_once(APPPATH.'config/doctypes.php')) + if (is_file(APPPATH.'config/'.ENVIRONMENT.'/doctypes'.EXT)) + { + include(APPPATH.'config/'.ENVIRONMENT.'/doctypes'.EXT); + } + elseif (is_file(APPPATH.'config/doctypes'.EXT)) + { + include(APPPATH.'config/doctypes'.EXT); + } + + if ( ! is_array($_doctypes)) { return FALSE; } diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php index 68c1a1fc6..ac0d69da1 100644 --- a/system/helpers/language_helper.php +++ b/system/helpers/language_helper.php @@ -1,4 +1,4 @@ -<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); +<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php index a2caea5e3..611777559 100644 --- a/system/helpers/number_helper.php +++ b/system/helpers/number_helper.php @@ -1,4 +1,4 @@ -<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); +<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php index 80a8d79ad..6c901515d 100644 --- a/system/helpers/smiley_helper.php +++ b/system/helpers/smiley_helper.php @@ -59,7 +59,7 @@ if ( ! function_exists('smiley_js')) if (is_array($alias)) { - foreach($alias as $name => $id) + foreach ($alias as $name => $id) { $m[] = '"'.$name.'" : "'.$id.'"'; } @@ -101,7 +101,7 @@ EOF; { if (is_array($alias)) { - foreach($alias as $name => $id) + foreach ($alias as $name => $id) { $r .= 'smiley_map["'.$name.'"] = "'.$id.'";'."\n"; } @@ -229,13 +229,20 @@ if ( ! function_exists('_get_smiley_array')) { function _get_smiley_array() { - if ( ! file_exists(APPPATH.'config/smileys'.EXT)) + if ( ! file_exists(APPPATH.'config/smileys'.EXT) AND ! file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys'.EXT)) { return FALSE; } - include(APPPATH.'config/smileys'.EXT); - + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys'.EXT)) + { + include(APPPATH.'config/'.ENVIRONMENT.'/smileys'.EXT); + } + else + { + include(APPPATH.'config/smileys'.EXT); + } + if ( ! isset($smileys) OR ! is_array($smileys)) { return FALSE; diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index 47e6ccc93..664408912 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -366,12 +366,14 @@ if ( ! function_exists('convert_accented_characters')) { function convert_accented_characters($str) { - if ( ! file_exists(APPPATH.'config/foreign_chars'.EXT)) + if (is_file(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars'.EXT)) { - return $str; + include(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars'.EXT); + } + elseif (is_file(APPPATH.'config/foreign_chars'.EXT)) + { + include(APPPATH.'config/foreign_chars'.EXT); } - - include APPPATH.'config/foreign_chars'.EXT; if ( ! isset($foreign_characters)) { @@ -443,7 +445,7 @@ if ( ! function_exists('word_wrap')) } $temp = ''; - while((strlen($line)) > $charlim) + while ((strlen($line)) > $charlim) { // If the over-length word is a URL we won't wrap it if (preg_match("!\[url.+\]|://|wwww.!", $line)) diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php index b01885091..3f2409007 100644 --- a/system/language/english/form_validation_lang.php +++ b/system/language/english/form_validation_lang.php @@ -19,6 +19,9 @@ $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_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."; +$lang['less_than'] = "The %s field must contain a number less than %s."; +$lang['greater_than'] = "The %s field must contain a number greater than %s."; /* End of file form_validation_lang.php */ diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index 3ed357f2f..86d1a3b6a 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -39,7 +39,7 @@ class Cache_file extends CI_Driver { $path = $CI->config->item('cache_path'); - $this->_cache_path = ($path == '') ? BASEPATH.'cache/' : $path; + $this->_cache_path = ($path == '') ? APPPATH.'cache/' : $path; } // ------------------------------------------------------------------------ diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php index 15fc3da26..02e093d7e 100644 --- a/system/libraries/Driver.php +++ b/system/libraries/Driver.php @@ -1,4 +1,4 @@ -<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); +<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * @@ -36,7 +36,7 @@ class CI_Driver_Library { // subsequents calls will go straight to the proper child. function __get($child) { - if (! isset($this->lib_name)) + if ( ! isset($this->lib_name)) { $this->lib_name = get_class($this); } @@ -143,7 +143,7 @@ class CI_Driver { } } - foreach($r->getProperties() as $prop) + foreach ($r->getProperties() as $prop) { if ($prop->isPublic()) { diff --git a/system/libraries/Email.php b/system/libraries/Email.php index e5af38f45..6c21f114d 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -897,7 +897,7 @@ class CI_Email { } $temp = ''; - while((strlen($line)) > $charlim) + while ((strlen($line)) > $charlim) { // If the over-length word is a URL we won't wrap it if (preg_match("!\[url.+\]|://|wwww.!", $line)) @@ -973,7 +973,7 @@ class CI_Email { reset($this->_headers); $this->_header_str = ""; - foreach($this->_headers as $key => $val) + foreach ($this->_headers as $key => $val) { $val = trim($val); @@ -1607,14 +1607,14 @@ class CI_Email { $this->_send_command('from', $this->clean_email($this->_headers['From'])); - foreach($this->_recipients as $val) + foreach ($this->_recipients as $val) { $this->_send_command('to', $val); } if (count($this->_cc_array) > 0) { - foreach($this->_cc_array as $val) + foreach ($this->_cc_array as $val) { if ($val != "") { @@ -1625,7 +1625,7 @@ class CI_Email { if (count($this->_bcc_array) > 0) { - foreach($this->_bcc_array as $val) + foreach ($this->_bcc_array as $val) { if ($val != "") { @@ -1672,7 +1672,7 @@ class CI_Email { $errstr, $this->smtp_timeout); - if( ! is_resource($this->_smtp_connect)) + if ( ! is_resource($this->_smtp_connect)) { $this->_set_error_message('email_smtp_error', $errno." ".$errstr); return FALSE; diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 745fb7c03..adfd17db1 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1040,7 +1040,7 @@ class CI_Form_validation { return $this->valid_email(trim($str)); } - foreach(explode(',', $str) as $email) + foreach (explode(',', $str) as $email) { if (trim($email) != '' && $this->valid_email(trim($email)) === FALSE) { @@ -1177,7 +1177,7 @@ class CI_Form_validation { { if ( ! is_numeric($str)) { - return false; + return FALSE; } return $str > $min; } @@ -1195,7 +1195,7 @@ class CI_Form_validation { { if ( ! is_numeric($str)) { - return false; + return FALSE; } return $str < $max; } diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 41f9ad393..8902f524d 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -749,7 +749,7 @@ class CI_Image_lib { @chmod($this->full_dst_path, FILE_WRITE_MODE); - return true; + return TRUE; } // -------------------------------------------------------------------- diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php deleted file mode 100644 index 73c55c346..000000000 --- a/system/libraries/Migration.php +++ /dev/null @@ -1,336 +0,0 @@ -<?php defined('BASEPATH') OR exit('No direct script access allowed'); -/** - * CodeIgniter - * - * An open source application development framework for PHP 5.1.6 or newer - * - * @package CodeIgniter - * @author EllisLab Dev Team - * @copyright Copyright (c) 2006 - 2011, EllisLab, Inc. - * @license http://codeigniter.com/user_guide/license.html - * @link http://codeigniter.com - * @since Version 1.0 - * @filesource - */ - -// ------------------------------------------------------------------------ - -/** - * Migration Class - * - * All migrations should implement this, forces up() and down() and gives - * access to the CI super-global. - * - * @package CodeIgniter - * @subpackage Libraries - * @category Libraries - * @author Reactor Engineers - * @link - */ -class CI_Migration { - - private $_migration_enabled = FALSE; - private $_migration_path = NULL; - private $_migration_version = 0; - - public $error = ''; - - function __construct($config = array()) - { - # Only run this constructor on main library load - if (get_parent_class($this) !== FALSE) - { - return; - } - - foreach ($config as $key => $val) - { - $this->{'_' . $key} = $val; - } - - log_message('debug', 'Migrations class initialized'); - - // Are they trying to use migrations while it is disabled? - if ($this->_migration_enabled !== TRUE) - { - show_error('Migrations has been loaded but is disabled or set up incorrectly.'); - } - - // If not set, set it - $this->_migration_path == '' OR $this->_migration_path = APPPATH . 'migrations/'; - - // Add trailing slash if not set - $this->_migration_path = rtrim($this->_migration_path, '/').'/'; - - // They'll probably be using dbforge - $this->load->dbforge(); - - // If the migrations table is missing, make it - if ( ! $this->db->table_exists('migrations')) - { - $this->dbforge->add_field(array( - 'version' => array('type' => 'INT', 'constraint' => 3), - )); - - $this->dbforge->create_table('migrations', TRUE); - - $this->db->insert('migrations', array('version' => 0)); - } - } - - // -------------------------------------------------------------------- - - /** - * Migrate to a schema version - * - * Calls each migration step required to get to the schema version of - * choice - * - * @access public - * @param $version integer Target schema version - * @return mixed TRUE if already latest, FALSE if failed, int if upgraded - */ - function version($target_version) - { - $start = $current_version = $this->_get_version(); - $stop = $target_version; - - if ($target_version > $current_version) - { - // Moving Up - ++$start; - ++$stop; - $step = 1; - } - - else - { - // Moving Down - $step = -1; - } - - $method = $step === 1 ? 'up' : 'down'; - $migrations = array(); - - // We now prepare to actually DO the migrations - // But first let's make sure that everything is the way it should be - for ($i = $start; $i != $stop; $i += $step) - { - $f = glob(sprintf($this->_migration_path . '%03d_*.php', $i)); - - // Only one migration per step is permitted - if (count($f) > 1) - { - $this->error = sprintf($this->lang->line('multiple_migration_version'), $i); - return FALSE; - } - - // Migration step not found - if (count($f) == 0) - { - // If trying to migrate up to a version greater than the last - // existing one, migrate to the last one. - if ($step == 1) - { - break; - } - - // If trying to migrate down but we're missing a step, - // something must definitely be wrong. - $this->error = sprintf($this->lang->line('migration_not_found'), $i); - return FALSE; - } - - $file = basename($f[0]); - $name = basename($f[0], '.php'); - - // Filename validations - if (preg_match('/^\d{3}_(\w+)$/', $name, $match)) - { - $match[1] = strtolower($match[1]); - - // Cannot repeat a migration at different steps - if (in_array($match[1], $migrations)) - { - $this->error = sprintf($this->lang->line('multiple_migrations_name'), $match[1]); - return FALSE; - } - - include $f[0]; - $class = 'Migration_' . ucfirst($match[1]); - - if ( ! class_exists($class)) - { - $this->error = sprintf($this->lang->line('migration_class_doesnt_exist'), $class); - return FALSE; - } - - if ( ! is_callable(array($class, 'up')) || ! is_callable(array($class, 'down'))) - { - $this->error = sprintf($this->lang->line('wrong_migration_interface'), $class); - return FALSE; - } - - $migrations[] = $match[1]; - } - else - { - $this->error = sprintf($this->lang->line('invalid_migration_filename'), $file); - return FALSE; - } - } - - $this->log('Current schema version: ' . $current_version); - - $version = $i + ($step == 1 ? -1 : 0); - - // If there is nothing to do so quit - if ($migrations === array()) - { - return TRUE; - } - - $this->log('Moving ' . $method . ' to version ' . $version); - - // Loop through the migrations - foreach ($migrations AS $migration) - { - // Run the migration class - $class = 'Migration_' . ucfirst(strtolower($migration)); - call_user_func(array(new $class, $method)); - - $current_version += $step; - $this->_update_version($current_version); - } - - $this->log('All done. Schema is at version '.$current_version); - - return $current_version; - } - - // -------------------------------------------------------------------- - - /** - * Set's the schema to the latest migration - * - * @access public - * @return mixed true if already latest, false if failed, int if upgraded - */ - public function latest() - { - if ( ! $migrations = $this->find_migrations()) - { - throw new Exception('no_migrations_found'); - return false; - } - - $last_migration = basename(end($migrations)); - - // Calculate the last migration step from existing migration - // filenames and procceed to the standard version migration - $last_version = intval(substr($last_migration, 0, 3)); - return $this->version($last_version); - } - - // -------------------------------------------------------------------- - - /** - * Set's the schema to the migration version set in config - * - * @access public - * @return mixed true if already current, false if failed, int if upgraded - */ - public function current() - { - $version = $this->_migration_version; - return $this->version($version); - } - - // -------------------------------------------------------------------- - - /** - * Set's the schema to the latest migration - * - * @access public - * @return mixed true if already latest, false if failed, int if upgraded - */ - - protected static function find_migrations() - { - // Load all *_*.php files in the migrations path - $files = glob($this->_migration_path . '*_*.php'); - $file_count = count($files); - - for ($i = 0; $i < $file_count; $i++) - { - // Mark wrongly formatted files as false for later filtering - $name = basename($files[$i], '.php'); - if ( ! preg_match('/^\d{3}_(\w+)$/', $name)) - { - $files[$i] = FALSE; - } - } - - sort($files); - - return $files; - } - - // -------------------------------------------------------------------- - - /** - * Retrieves current schema version - * - * @access private - * @return integer Current Schema version - */ - private function _get_version() - { - $row = $this->db->get('migrations')->row(); - return $row ? $row->version : 0; - } - - // -------------------------------------------------------------------- - - /** - * Stores the current schema version - * - * @access private - * @param $migrations integer Schema version reached - * @return void Outputs a report of the migration - */ - private function _update_version($migrations) - { - return $this->db->update('migrations', array( - 'version' => $migrations - )); - } - - // -------------------------------------------------------------------- - - /** - * Stores the current schema version - * - * @access private - * @param $migrations integer Schema version reached - * @return void Outputs a report of the migration - */ - private function log($text) - { - echo $text.'<br/>'; - } - - // -------------------------------------------------------------------- - - /** - * Enable the use of CI super-global - * - * @access public - * @param $var - * @return mixed - */ - public function __get($var) - { - return get_instance()->$var; - } -}
\ No newline at end of file diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 6587eae0b..8a1f18ced 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -415,7 +415,7 @@ class CI_Profiler { $output .= "\n\n<table style='width:100%'>\n"; - foreach(array('HTTP_ACCEPT', 'HTTP_USER_AGENT', 'HTTP_CONNECTION', 'SERVER_PORT', 'SERVER_NAME', 'REMOTE_ADDR', 'SERVER_SOFTWARE', 'HTTP_ACCEPT_LANGUAGE', 'SCRIPT_NAME', 'REQUEST_METHOD',' HTTP_HOST', 'REMOTE_HOST', 'CONTENT_TYPE', 'SERVER_PROTOCOL', 'QUERY_STRING', 'HTTP_ACCEPT_ENCODING', 'HTTP_X_FORWARDED_FOR') as $header) + foreach (array('HTTP_ACCEPT', 'HTTP_USER_AGENT', 'HTTP_CONNECTION', 'SERVER_PORT', 'SERVER_NAME', 'REMOTE_ADDR', 'SERVER_SOFTWARE', 'HTTP_ACCEPT_LANGUAGE', 'SCRIPT_NAME', 'REQUEST_METHOD',' HTTP_HOST', 'REMOTE_HOST', 'CONTENT_TYPE', 'SERVER_PROTOCOL', 'QUERY_STRING', 'HTTP_ACCEPT_ENCODING', 'HTTP_X_FORWARDED_FOR') as $header) { $val = (isset($_SERVER[$header])) ? $_SERVER[$header] : ''; $output .= "<tr><td style='vertical-align: top;width:50%;padding:5px;color:#900;background-color:#ddd;'>".$header." </td><td style='width:50%;padding:5px;color:#000;background-color:#ddd;'>".$val."</td></tr>\n"; @@ -446,7 +446,7 @@ class CI_Profiler { $output .= "\n\n<table style='width:100%'>\n"; - foreach($this->CI->config->config as $config=>$val) + foreach ($this->CI->config->config as $config=>$val) { if (is_array($val)) { diff --git a/system/libraries/Security.php b/system/libraries/Security.php index ba64c7326..58db4e79c 100644 --- a/system/libraries/Security.php +++ b/system/libraries/Security.php @@ -117,8 +117,9 @@ class CI_Security { public function csrf_set_cookie() { $expire = time() + $this->csrf_expire; + $secure_cookie = (config_item('cookie_secure') === TRUE) ? 1 : 0; - setcookie($this->csrf_cookie_name, $this->csrf_hash, $expire, config_item('cookie_path'), config_item('cookie_domain'), 0); + 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"); } @@ -373,7 +374,7 @@ class CI_Security { $str = preg_replace("#<(/*)(script|xss)(.*?)\>#si", '[removed]', $str); } } - while($original != $str); + while ($original != $str); unset($original); diff --git a/system/libraries/Session.php b/system/libraries/Session.php index 53ff4f5d3..182294059 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -37,6 +37,7 @@ class CI_Session { var $cookie_prefix = ''; var $cookie_path = ''; var $cookie_domain = ''; + var $cookie_secure = FALSE; var $sess_time_to_update = 300; var $encryption_key = ''; var $flashdata_key = 'flash'; @@ -61,7 +62,7 @@ class CI_Session { // Set all the session preferences, which can either be set // manually via the $params array above or via the config file - foreach (array('sess_encrypt_cookie', 'sess_use_database', 'sess_table_name', 'sess_expiration', 'sess_expire_on_close', 'sess_match_ip', 'sess_match_useragent', 'sess_cookie_name', 'cookie_path', 'cookie_domain', 'sess_time_to_update', 'time_reference', 'cookie_prefix', 'encryption_key') as $key) + foreach (array('sess_encrypt_cookie', 'sess_use_database', 'sess_table_name', 'sess_expiration', 'sess_expire_on_close', 'sess_match_ip', 'sess_match_useragent', 'sess_cookie_name', 'cookie_path', 'cookie_domain', 'cookie_secure', 'sess_time_to_update', 'time_reference', 'cookie_prefix', 'encryption_key') as $key) { $this->$key = (isset($params[$key])) ? $params[$key] : $this->CI->config->item($key); } @@ -666,7 +667,7 @@ class CI_Session { $expire, $this->cookie_path, $this->cookie_domain, - 0 + $this->cookie_secure ); } diff --git a/system/libraries/Sha1.php b/system/libraries/Sha1.php index ad747a001..1a657572b 100644 --- a/system/libraries/Sha1.php +++ b/system/libraries/Sha1.php @@ -42,7 +42,7 @@ * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/general/encryption.html */ -class CI_SHA { +class CI_SHA1 { public function __construct() { @@ -88,7 +88,7 @@ class CI_SHA { $oldd = $d; $olde = $e; - for($j = 0; $j < 80; $j++) + for ($j = 0; $j < 80; $j++) { if ($j < 16) { diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 485541630..def696776 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -108,7 +108,7 @@ class CI_Table { } $new = array(); - while(count($array) > 0) + while (count($array) > 0) { $temp = array_splice($array, 0, $col_limit); @@ -280,7 +280,7 @@ class CI_Table { $out .= $this->template['heading_row_start']; $out .= $this->newline; - foreach($this->heading as $heading) + foreach ($this->heading as $heading) { $temp = $this->template['heading_cell_start']; @@ -310,7 +310,7 @@ class CI_Table { $out .= $this->newline; $i = 1; - foreach($this->rows as $row) + foreach ($this->rows as $row) { if ( ! is_array($row)) { @@ -323,7 +323,7 @@ class CI_Table { $out .= $this->template['row_'.$name.'start']; $out .= $this->newline; - foreach($row as $cell) + foreach ($row as $cell) { $temp = $this->template['cell_'.$name.'start']; @@ -367,6 +367,9 @@ class CI_Table { $out .= $this->template['table_close']; + // Clear table class properties before generating the table + $this->clear(); + return $out; } diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index e29b35c7a..b0a767822 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -94,7 +94,7 @@ class CI_Trackback { { $$item = $this->convert_ascii($$item); } - elseif($item == 'blog_name') + elseif ($item == 'blog_name') { $$item = $this->convert_ascii($$item); } @@ -261,7 +261,7 @@ class CI_Trackback { // Was it successful? $this->response = ""; - while( ! feof($fp)) + while ( ! feof($fp)) { $this->response .= fgets($fp, 128); } diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 8f84ffd7e..5816a5558 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -142,7 +142,8 @@ class CI_Upload { */ public function do_upload($field = 'userfile') { - // Is $_FILES[$field] set? If not, no reason to continue. + + // Is $_FILES[$field] set? If not, no reason to continue. if ( ! isset($_FILES[$field])) { $this->set_error('upload_no_file_selected'); @@ -214,7 +215,7 @@ class CI_Upload { $this->file_name = $this->_prep_filename($this->_file_name_override); // If no extension was provided in the file_name config item, use the uploaded one - if(strpos($this->_file_name_override, '.') === FALSE) + if (strpos($this->_file_name_override, '.') === FALSE) { $this->file_name .= $this->file_ext; } @@ -950,11 +951,21 @@ class CI_Upload { if (count($this->mimes) == 0) { - if (@require_once(APPPATH.'config/mimes'.EXT)) + if (is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT)) + { + include(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT); + } + elseif (is_file(APPPATH.'config/mimes'.EXT)) + { + include(APPPATH.'config//mimes'.EXT); + } + else { - $this->mimes = $mimes; - unset($mimes); + return FALSE; } + + $this->mimes = $mimes; + unset($mimes); } return ( ! isset($this->mimes[$mime])) ? FALSE : $this->mimes[$mime]; diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index 3774fc283..11af21491 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -84,7 +84,15 @@ class CI_User_agent { */ private function _load_agent_file() { - if ( ! @include(APPPATH.'config/user_agents'.EXT)) + if (is_file(APPPATH.'config/'.ENVIRONMENT.'/user_agents'.EXT)) + { + include(APPPATH.'config/'.ENVIRONMENT.'/user_agents'.EXT); + } + elseif (is_file(APPPATH.'config/user_agents'.EXT)) + { + include(APPPATH.'config/user_agents'.EXT); + } + else { return FALSE; } diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 9cf307cc0..a24bca9b6 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -207,7 +207,7 @@ class CI_Xmlrpc { $this->data = array(); - foreach($incoming as $key => $value) + foreach ($incoming as $key => $value) { $this->data[$key] = $this->values_parsing($value); } @@ -232,7 +232,7 @@ class CI_Xmlrpc { { if (is_array($value) && array_key_exists(0, $value)) { - if ( ! isset($value['1']) OR (! isset($this->xmlrpcTypes[$value['1']]))) + if ( ! isset($value['1']) OR ( ! isset($this->xmlrpcTypes[$value['1']]))) { if (is_array($value[0])) { @@ -243,7 +243,7 @@ class CI_Xmlrpc { $temp = new XML_RPC_Values($value['0'], 'string'); } } - elseif(is_array($value['0']) && ($value['1'] == 'struct' OR $value['1'] == 'array')) + elseif (is_array($value['0']) && ($value['1'] == 'struct' OR $value['1'] == 'array')) { while (list($k) = each($value['0'])) { @@ -281,7 +281,7 @@ class CI_Xmlrpc { $this->error = $this->result->errstr; return FALSE; } - elseif( ! is_object($this->result->val)) + elseif ( ! is_object($this->result->val)) { $this->error = $this->result->errstr; return FALSE; @@ -358,7 +358,7 @@ class XML_RPC_Client extends CI_Xmlrpc var $errno = ''; var $errstring = ''; var $timeout = 5; - var $no_multicall = false; + var $no_multicall = FALSE; public function __construct($path, $server, $port=80) { @@ -392,7 +392,7 @@ class XML_RPC_Client extends CI_Xmlrpc return $r; } - if(empty($msg->payload)) + if (empty($msg->payload)) { // $msg = XML_RPC_Messages $msg->createPayload(); @@ -553,11 +553,11 @@ class XML_RPC_Response { $kind = $xmlrpc_val->kindOf(); - if($kind == 'scalar') + if ($kind == 'scalar') { return $xmlrpc_val->scalarval(); } - elseif($kind == 'array') + elseif ($kind == 'array') { reset($xmlrpc_val->me); list($a,$b) = each($xmlrpc_val->me); @@ -565,18 +565,18 @@ class XML_RPC_Response $arr = array(); - for($i = 0; $i < $size; $i++) + for ($i = 0; $i < $size; $i++) { $arr[] = $this->xmlrpc_decoder($xmlrpc_val->me['array'][$i]); } return $arr; } - elseif($kind == 'struct') + elseif ($kind == 'struct') { reset($xmlrpc_val->me['struct']); $arr = array(); - while(list($key,$value) = each($xmlrpc_val->me['struct'])) + while (list($key,$value) = each($xmlrpc_val->me['struct'])) { $arr[$key] = $this->xmlrpc_decoder($value); } @@ -595,10 +595,8 @@ class XML_RPC_Response $t = 0; if (preg_match('/([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})/', $time, $regs)) { - if ($utc == 1) - $t = gmmktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]); - else - $t = mktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]); + $fnc = ($utc == 1) ? 'gmmktime' : 'mktime'; + $t = $fnc($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]); } return $t; } @@ -628,7 +626,7 @@ class XML_RPC_Message extends CI_Xmlrpc $this->method_name = $method; if (is_array($pars) && count($pars) > 0) { - for($i=0; $i<count($pars); $i++) + for ($i=0; $i<count($pars); $i++) { // $pars[$i] = XML_RPC_Values $this->params[] = $pars[$i]; @@ -646,7 +644,7 @@ class XML_RPC_Message extends CI_Xmlrpc $this->payload .= '<methodName>' . $this->method_name . "</methodName>\r\n"; $this->payload .= "<params>\r\n"; - for($i=0; $i<count($this->params); $i++) + for ($i=0; $i<count($this->params); $i++) { // $p = XML_RPC_Values $p = $this->params[$i]; @@ -664,7 +662,7 @@ class XML_RPC_Message extends CI_Xmlrpc { $data = ''; - while($datum = fread($fp, 4096)) + while ($datum = fread($fp, 4096)) { $data .= $datum; } @@ -684,7 +682,7 @@ class XML_RPC_Message extends CI_Xmlrpc // Check for data //------------------------------------- - if($data == "") + if ($data == "") { error_log($this->xmlrpcstr['no_data']); $r = new XML_RPC_Response(0, $this->xmlrpcerr['no_data'], $this->xmlrpcstr['no_data']); @@ -896,7 +894,7 @@ class XML_RPC_Message extends CI_Xmlrpc $this->xh[$the_parser]['isf'] = 1; break; case 'PARAM': - $this->xh[$the_parser]['value'] = null; + $this->xh[$the_parser]['value'] = NULL; break; case 'VALUE': $this->xh[$the_parser]['vt'] = 'value'; @@ -925,7 +923,7 @@ class XML_RPC_Message extends CI_Xmlrpc $this->xh[$the_parser]['valuestack'][0]['name'] = ''; // Set NULL value to check to see if value passed for this param/member - $this->xh[$the_parser]['value'] = null; + $this->xh[$the_parser]['value'] = NULL; break; case 'DATA': case 'METHODCALL': @@ -1108,7 +1106,7 @@ class XML_RPC_Message extends CI_Xmlrpc $this->xh[$the_parser]['lv'] = 2; // Found a value } - if( ! @isset($this->xh[$the_parser]['ac'])) + if ( ! @isset($this->xh[$the_parser]['ac'])) { $this->xh[$the_parser]['ac'] = ''; } @@ -1174,11 +1172,11 @@ class XML_RPC_Message extends CI_Xmlrpc { $kind = $param->kindOf(); - if($kind == 'scalar') + if ($kind == 'scalar') { return $param->scalarval(); } - elseif($kind == 'array') + elseif ($kind == 'array') { reset($param->me); list($a,$b) = each($param->me); @@ -1192,13 +1190,13 @@ class XML_RPC_Message extends CI_Xmlrpc return $arr; } - elseif($kind == 'struct') + elseif ($kind == 'struct') { reset($param->me['struct']); $arr = array(); - while(list($key,$value) = each($param->me['struct'])) + while (list($key,$value) = each($param->me['struct'])) { $arr[$key] = $this->decode_message($value); } @@ -1343,7 +1341,7 @@ class XML_RPC_Values extends CI_Xmlrpc // struct $rs .= "<struct>\n"; reset($val); - while(list($key2, $val2) = each($val)) + while (list($key2, $val2) = each($val)) { $rs .= "<member>\n<name>{$key2}</name>\n"; $rs .= $this->serializeval($val2); diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index 6bedfe324..9cd332147 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -59,10 +59,15 @@ class CI_Xmlrpcs extends CI_Xmlrpc log_message('debug', "XML-RPC Server Class Initialized"); } - //------------------------------------- - // Initialize Prefs and Serve - //------------------------------------- + // -------------------------------------------------------------------- + /** + * Initialize Prefs and Serve + * + * @access public + * @param mixed + * @return void + */ function initialize($config=array()) { if (isset($config['functions']) && is_array($config['functions'])) @@ -86,11 +91,15 @@ class CI_Xmlrpcs extends CI_Xmlrpc } } - //------------------------------------- - // Setting of System Methods - //------------------------------------- + // -------------------------------------------------------------------- - function set_system_methods () + /** + * Setting of System Methods + * + * @access public + * @return void + */ + function set_system_methods() { $this->methods = array( 'system.listMethods' => array( @@ -112,11 +121,14 @@ class CI_Xmlrpcs extends CI_Xmlrpc ); } + // -------------------------------------------------------------------- - //------------------------------------- - // Main Server Function - //------------------------------------- - + /** + * Main Server Function + * + * @access public + * @return void + */ function serve() { $r = $this->parseRequest(); @@ -129,11 +141,19 @@ class CI_Xmlrpcs extends CI_Xmlrpc exit($payload); } - //------------------------------------- - // Add Method to Class - //------------------------------------- + // -------------------------------------------------------------------- - function add_to_map($methodname,$function,$sig,$doc) + /** + * Add Method to Class + * + * @access public + * @param string method name + * @param string function + * @param string signature + * @param string docstring + * @return void + */ + function add_to_map($methodname, $function, $sig, $doc) { $this->methods[$methodname] = array( 'function' => $function, @@ -142,11 +162,15 @@ class CI_Xmlrpcs extends CI_Xmlrpc ); } + // -------------------------------------------------------------------- - //------------------------------------- - // Parse Server Request - //------------------------------------- - + /** + * Parse Server Request + * + * @access public + * @param string data + * @return object xmlrpc response + */ function parseRequest($data='') { global $HTTP_RAW_POST_DATA; @@ -196,7 +220,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc xml_get_current_line_number($parser))); xml_parser_free($parser); } - elseif($parser_object->xh[$parser]['isf']) + elseif ($parser_object->xh[$parser]['isf']) { return new XML_RPC_Response(0, $this->xmlrpcerr['invalid_return'], $this->xmlrpcstr['invalid_return']); } @@ -207,7 +231,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc $m = new XML_RPC_Message($parser_object->xh[$parser]['method']); $plist=''; - for($i=0; $i < count($parser_object->xh[$parser]['params']); $i++) + for ($i=0; $i < count($parser_object->xh[$parser]['params']); $i++) { if ($this->debug === TRUE) { @@ -239,10 +263,15 @@ class CI_Xmlrpcs extends CI_Xmlrpc return $r; } - //------------------------------------- - // Executes the Method - //------------------------------------- + // -------------------------------------------------------------------- + /** + * Executes the Method + * + * @access protected + * @param object + * @return mixed + */ function _execute($m) { $methName = $m->method_name; @@ -297,13 +326,13 @@ class CI_Xmlrpcs extends CI_Xmlrpc if (isset($this->methods[$methName]['signature'])) { $sig = $this->methods[$methName]['signature']; - for($i=0; $i<count($sig); $i++) + for ($i=0; $i<count($sig); $i++) { $current_sig = $sig[$i]; if (count($current_sig) == count($m->params)+1) { - for($n=0; $n < count($m->params); $n++) + for ($n=0; $n < count($m->params); $n++) { $p = $m->params[$n]; $pt = ($p->kindOf() == 'scalar') ? $p->scalarval() : $p->kindOf(); @@ -352,23 +381,27 @@ class CI_Xmlrpcs extends CI_Xmlrpc return call_user_func($this->methods[$methName]['function'], $m); } } + + // -------------------------------------------------------------------- - - //------------------------------------- - // Server Function: List Methods - //------------------------------------- - + /** + * Server Function: List Methods + * + * @access public + * @param mixed + * @return object + */ function listMethods($m) { $v = new XML_RPC_Values(); $output = array(); - foreach($this->methods as $key => $value) + foreach ($this->methods as $key => $value) { $output[] = new XML_RPC_Values($key, 'string'); } - foreach($this->system_methods as $key => $value) + foreach ($this->system_methods as $key => $value) { $output[]= new XML_RPC_Values($key, 'string'); } @@ -376,11 +409,16 @@ class CI_Xmlrpcs extends CI_Xmlrpc $v->addArray($output); return new XML_RPC_Response($v); } + + // -------------------------------------------------------------------- - //------------------------------------- - // Server Function: Return Signature for Method - //------------------------------------- - + /** + * Server Function: Return Signature for Method + * + * @access public + * @param mixed + * @return object + */ function methodSignature($m) { $parameters = $m->output_parameters(); @@ -393,11 +431,11 @@ class CI_Xmlrpcs extends CI_Xmlrpc $sigs = array(); $signature = $this->methods[$method_name]['signature']; - for($i=0; $i < count($signature); $i++) + for ($i=0; $i < count($signature); $i++) { $cursig = array(); $inSig = $signature[$i]; - for($j=0; $j<count($inSig); $j++) + for ($j=0; $j<count($inSig); $j++) { $cursig[]= new XML_RPC_Values($inSig[$j], 'string'); } @@ -417,10 +455,15 @@ class CI_Xmlrpcs extends CI_Xmlrpc return $r; } - //------------------------------------- - // Server Function: Doc String for Method - //------------------------------------- + // -------------------------------------------------------------------- + /** + * Server Function: Doc String for Method + * + * @access public + * @param mixed + * @return object + */ function methodHelp($m) { $parameters = $m->output_parameters(); @@ -437,11 +480,16 @@ class CI_Xmlrpcs extends CI_Xmlrpc return new XML_RPC_Response(0, $this->xmlrpcerr['introspect_unknown'], $this->xmlrpcstr['introspect_unknown']); } } + + // -------------------------------------------------------------------- - //------------------------------------- - // Server Function: Multi-call - //------------------------------------- - + /** + * Server Function: Multi-call + * + * @access public + * @param mixed + * @return object + */ function multicall($m) { // Disabled @@ -459,7 +507,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc $m = new XML_RPC_Message($value[0]); $plist=''; - for($i=0; $i < count($value[1]); $i++) + for ($i=0; $i < count($value[1]); $i++) { $m->addParam(new XML_RPC_Values($value[1][$i], 'string')); } @@ -477,11 +525,15 @@ class CI_Xmlrpcs extends CI_Xmlrpc return new XML_RPC_Response(new XML_RPC_Values($result, 'array')); } + // -------------------------------------------------------------------- - //------------------------------------- - // Multi-call Function: Error Handling - //------------------------------------- - + /** + * Multi-call Function: Error Handling + * + * @access public + * @param mixed + * @return object + */ function multicall_error($err) { $str = is_string($err) ? $this->xmlrpcstr["multicall_${err}"] : $err->faultString(); @@ -493,29 +545,45 @@ class CI_Xmlrpcs extends CI_Xmlrpc return new XML_RPC_Values($struct, 'struct'); } + // -------------------------------------------------------------------- - //------------------------------------- - // Multi-call Function: Processes method - //------------------------------------- - + /** + * Multi-call Function: Processes method + * + * @access public + * @param mixed + * @return object + */ function do_multicall($call) { if ($call->kindOf() != 'struct') + { return $this->multicall_error('notstruct'); + } elseif ( ! $methName = $call->me['struct']['methodName']) + { return $this->multicall_error('nomethod'); + } list($scalar_type,$scalar_value)=each($methName->me); $scalar_type = $scalar_type == $this->xmlrpcI4 ? $this->xmlrpcInt : $scalar_type; if ($methName->kindOf() != 'scalar' OR $scalar_type != 'string') + { return $this->multicall_error('notstring'); + } elseif ($scalar_value == 'system.multicall') + { return $this->multicall_error('recursion'); + } elseif ( ! $params = $call->me['struct']['params']) + { return $this->multicall_error('noparams'); + } elseif ($params->kindOf() != 'array') + { return $this->multicall_error('notarray'); + } list($a,$b)=each($params->me); $numParams = count($b); diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index 80633c708..666327d5c 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -289,7 +289,7 @@ class CI_Zip { while (FALSE !== ($file = readdir($fp))) { - if(substr($file, 0, 1) == '.') + if (substr($file, 0, 1) == '.') { continue; } diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 388f25d2a..bf86172d7 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="./toc.html">Table of Contents Page</a></td> </tr> </table> @@ -59,14 +59,59 @@ Change Log <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.0.1</h2> +<h2>Version 2.0.2</h2> <p>Release Date: n/a<br /> Hg Tag: n/a</p> <ul> + <li>General changes + <ul> + <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">Added Environment Support for Hooks.</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> + </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 form_validation_lang entries for <kbd>decimal</kbd>, <kbd>less_than</kbd> and <kbd>greater_than</kbd>.</li> +</ul> + +<h2>Version 2.0.1</h2> +<p>Release Date: March, 15, 2011<br /> +Hg Tag: v2.0.1</p> + +<ul> + <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, + 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> + </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/parser.html">Form validation Class</a>.</li> + <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> + </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> </ul> </li> </ul> @@ -75,6 +120,8 @@ Hg Tag: n/a</p> <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> </ul> <h2>Version 2.0.0</h2> @@ -138,6 +185,7 @@ Hg Tag: v2.0.0</p> <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> </ul> </li> <li>Database diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index 30c45fdde..dc06c87be 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -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.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -489,10 +489,10 @@ echo $this->db->count_all_results();<br /> <code> $data = array(<br /> - 'title' => 'My title' ,<br /> - 'name' => 'My Name' ,<br /> - 'date' => 'My date'<br /> - );<br /> + 'title' => 'My title' ,<br /> + 'name' => 'My Name' ,<br /> + 'date' => 'My date'<br /> +);<br /> <br /> $this->db->insert('mytable', $data); <br /><br /> @@ -517,10 +517,35 @@ $this->db->insert('mytable', $object); <br /><br /> // Produces: INSERT INTO mytable (title, content, date) VALUES ('My Title', 'My Content', 'My Date')</code> -<p>The first parameter will contain the table name, the second is an associative array of values.</p> +<p>The first parameter will contain the table name, the second is an object.</p> <p class="important"><strong>Note:</strong> All values are escaped automatically producing safer queries.</p> +<h2>$this->db->insert_batch();</h2> +<p>Generates an insert 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/> + array(<br /> + 'title' => 'My title' ,<br /> + 'name' => 'My Name' ,<br /> + 'date' => 'My date'<br /> + ),<br /> + array(<br /> + 'title' => 'Another title' ,<br /> + 'name' => 'Another Name' ,<br /> + 'date' => 'Another date'<br /> + )<br/> +);<br /> +<br /> +$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> + +<p>The first parameter will contain the table name, the second is an associative array of values.</p> + +<p class="important"><strong>Note:</strong> All values are escaped automatically producing safer queries.</p> diff --git a/user_guide/database/caching.html b/user_guide/database/caching.html index ec2e5c40b..4a18cbd64 100644 --- a/user_guide/database/caching.html +++ b/user_guide/database/caching.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/call_function.html b/user_guide/database/call_function.html index e34369f37..1f6079fb4 100644 --- a/user_guide/database/call_function.html +++ b/user_guide/database/call_function.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/configuration.html b/user_guide/database/configuration.html index d71cd34db..60e7065dd 100644 --- a/user_guide/database/configuration.html +++ b/user_guide/database/configuration.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/connecting.html b/user_guide/database/connecting.html index 1e971986e..8f923b140 100644 --- a/user_guide/database/connecting.html +++ b/user_guide/database/connecting.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/examples.html b/user_guide/database/examples.html index c0eabd846..10daef7ee 100644 --- a/user_guide/database/examples.html +++ b/user_guide/database/examples.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/fields.html b/user_guide/database/fields.html index b1dbd0012..8299c507c 100644 --- a/user_guide/database/fields.html +++ b/user_guide/database/fields.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/forge.html b/user_guide/database/forge.html index d18db5820..c7b141e84 100644 --- a/user_guide/database/forge.html +++ b/user_guide/database/forge.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html index f4ad8dfe6..b8a5785fa 100644 --- a/user_guide/database/helpers.html +++ b/user_guide/database/helpers.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/index.html b/user_guide/database/index.html index cc2d2166b..1dabb56b1 100644 --- a/user_guide/database/index.html +++ b/user_guide/database/index.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/queries.html b/user_guide/database/queries.html index e3d6ab186..b69f2260e 100644 --- a/user_guide/database/queries.html +++ b/user_guide/database/queries.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/results.html b/user_guide/database/results.html index e9a5cb4cf..aec6c973a 100644 --- a/user_guide/database/results.html +++ b/user_guide/database/results.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/table_data.html b/user_guide/database/table_data.html index 90ce478da..d95802921 100644 --- a/user_guide/database/table_data.html +++ b/user_guide/database/table_data.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/transactions.html b/user_guide/database/transactions.html index 448e468d9..f6db30191 100644 --- a/user_guide/database/transactions.html +++ b/user_guide/database/transactions.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html index ac3841641..268cf49ae 100644 --- a/user_guide/database/utilities.html +++ b/user_guide/database/utilities.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -96,7 +96,7 @@ already be running, since the utilities class relies on it.</p> <code> $dbs = $this->dbutil->list_databases();<br /> <br /> -foreach($dbs as $db)<br /> +foreach ($dbs as $db)<br /> {<br /> echo $db;<br /> }</code> diff --git a/user_guide/doc_style/index.html b/user_guide/doc_style/index.html index 2d2718d44..eb5986ba8 100644 --- a/user_guide/doc_style/index.html +++ b/user_guide/doc_style/index.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/alternative_php.html b/user_guide/general/alternative_php.html index 652cdad29..f4ec6ccc2 100644 --- a/user_guide/general/alternative_php.html +++ b/user_guide/general/alternative_php.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -94,7 +94,7 @@ written in a simplified format as well. Here is an example using foreach:</p> <code> <ul><br /> <br /> -<var><?php foreach($todo as $item): ?></var><br /> +<var><?php foreach ($todo as $item): ?></var><br /> <br /> <li><var><?=$item?></var></li><br /> <br /> diff --git a/user_guide/general/ancillary_classes.html b/user_guide/general/ancillary_classes.html index fc5d0bec5..d343cdc0d 100644 --- a/user_guide/general/ancillary_classes.html +++ b/user_guide/general/ancillary_classes.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/autoloader.html b/user_guide/general/autoloader.html index e05ee03ef..81ae311dd 100644 --- a/user_guide/general/autoloader.html +++ b/user_guide/general/autoloader.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html index 440896bb7..61b586f96 100644 --- a/user_guide/general/caching.html +++ b/user_guide/general/caching.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -68,7 +68,7 @@ By caching your pages, since they are saved in their fully rendered state, you c <h2>How Does Caching Work?</h2> <p>Caching can be enabled on a per-page basis, and you can set the length of time that a page should remain cached before being refreshed. -When a page is loaded for the first time, the cache file will be written to your <dfn>system/cache</dfn> folder. On subsequent page loads the cache file will be retrieved +When a page is loaded for the first time, the cache file will be written to your <dfn>application/cache</dfn> folder. On subsequent page loads the cache file will be retrieved and sent to the requesting user's browser. If it has expired, it will be deleted and refreshed before being sent to the browser.</p> <p>Note: The Benchmark tag is not cached so you can still view your page load speed when caching is enabled.</p> @@ -86,7 +86,7 @@ most logical to you. Once the tag is in place, your pages will begin being cache <p class="important"><strong>Warning:</strong> Because of the way CodeIgniter stores content for output, caching will only work if you are generating display for your controller with a <a href="./views.html">view</a>.</p> <p class="important"><strong>Note:</strong> Before the cache files can be written you must set the file permissions on your -<dfn>system/cache</dfn> folder such that it is writable.</p> +<dfn>application/cache</dfn> folder such that it is writable.</p> <h2>Deleting Caches</h2> diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html index 03c455346..225269e1d 100644 --- a/user_guide/general/common_functions.html +++ b/user_guide/general/common_functions.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index 91e700aba..2da98b6c7 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -98,7 +98,7 @@ Controllers <?php class Blog extends CI_Controller { - function index() + public function index() { echo 'Hello World!'; } @@ -153,12 +153,12 @@ class <var>blog</var> extends CI_Controller {<br /> <?php class Blog extends CI_Controller { - function index() + public function index() { echo 'Hello World!'; } - function comments() + public function comments() { echo 'Look at this!'; } @@ -187,7 +187,7 @@ class Blog extends CI_Controller { <?php<br /> class Products extends CI_Controller {<br /> <br /> - function shoes($sandals, $id)<br /> + public function shoes($sandals, $id)<br /> {<br /> echo $sandals;<br /> echo $id;<br /> @@ -220,7 +220,7 @@ specifying any URI segments you'll see your Hello World message by default.</p> <p>As noted above, the second segment of the URI typically determines which function in the controller gets called. CodeIgniter permits you to override this behavior through the use of the <kbd>_remap()</kbd> function:</p> -<code>function _remap()<br /> +<code>public function _remap()<br /> {<br /> // Some code here...<br /> }</code> @@ -231,7 +231,7 @@ allowing you to define your own function routing rules.</p> <p>The overridden function call (typically the second segment of the URI) will be passed as a parameter to the <kbd>_remap()</kbd> function:</p> -<code>function _remap(<var>$method</var>)<br /> +<code>public function _remap(<var>$method</var>)<br /> {<br /> if ($method == 'some_method')<br /> {<br /> @@ -245,10 +245,10 @@ allowing you to define your own function routing rules.</p> <p>Any extra segments after the method name are passed into <kbd>_remap()</kbd> as an optional second parameter. This array can be used in combination with PHP's <a href="http://php.net/call_user_func_array">call_user_func_array</a> to emulate CodeIgniter's default behavior.</p> -<code>function _remap($method, $params = array())<br /> +<code>public function _remap($method, $params = array())<br /> {<br /> $method = 'process_'.$method;<br /> - if (method_exists($this, $method)<br /> + if (method_exists($this, $method))<br /> {<br /> return call_user_func_array(array($this, $method), $params);<br /> }<br /> @@ -270,7 +270,7 @@ be called by the output class instead of echoing the finalized data directly. Th <p>Here is an example:</p> <code> -function _output($output)<br /> +public function _output($output)<br /> {<br /> echo $output;<br /> }</code> @@ -298,7 +298,7 @@ the available methods in the <a href="../libraries/output.html">Output Class</a> underscore as the name prefix and it will not be served via a URL request. For example, if you were to have a function like this:</p> <code> -function _utility()<br /> +private function _utility()<br /> {<br /> // some code<br /> }</code> @@ -346,7 +346,7 @@ called if the URL contains only the sub-folder. Simply name your default contro <?php<br /> class <kbd>Blog</kbd> extends CI_Controller {<br /> <br /> - function <kbd>__construct()</kbd><br /> + public function <kbd>__construct()</kbd><br /> {<br /> <var>parent::__construct();</var><br /> // Your own constructor code<br /> diff --git a/user_guide/general/core_classes.html b/user_guide/general/core_classes.html index 11410a31f..4edad8332 100644 --- a/user_guide/general/core_classes.html +++ b/user_guide/general/core_classes.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/creating_drivers.html b/user_guide/general/creating_drivers.html index 6208dd5d3..3d6640da6 100644 --- a/user_guide/general/creating_drivers.html +++ b/user_guide/general/creating_drivers.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html index b7b66f0c1..6d65f6599 100644 --- a/user_guide/general/creating_libraries.html +++ b/user_guide/general/creating_libraries.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -101,11 +101,11 @@ they are initialized.</p> <br /><br /> class Someclass {<br /> <br /> - function some_function()<br /> + public function some_function()<br /> {<br /> }<br /> }<br /><br /> -?></code> +/* End of file Someclass.php */</code> <h2>Using Your Class</h2> @@ -140,7 +140,7 @@ $this->load->library('Someclass', <kbd>$params</kbd>);</code> <br /> class Someclass {<br /> <br /> - function __construct($params)<br /> + public function __construct($params)<br /> {<br /> // Do something with $params<br /> }<br /> @@ -243,7 +243,7 @@ class MY_Email extends CI_Email {<br /><br /> <code> class MY_Email extends CI_Email {<br /> <br /> - function __construct()<br /> + public function __construct()<br /> {<br /> parent::__construct();<br /> }<br /> diff --git a/user_guide/general/credits.html b/user_guide/general/credits.html index b6915924c..7977956a8 100644 --- a/user_guide/general/credits.html +++ b/user_guide/general/credits.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/drivers.html b/user_guide/general/drivers.html index 83ed9852d..2b9f78cc4 100644 --- a/user_guide/general/drivers.html +++ b/user_guide/general/drivers.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/environments.html b/user_guide/general/environments.html new file mode 100644 index 000000000..76fe214bc --- /dev/null +++ b/user_guide/general/environments.html @@ -0,0 +1,126 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>Handling Multiple Environments : CodeIgniter User Guide</title> + +<style type='text/css' media='all'>@import url('../userguide.css');</style> +<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> + +<script type="text/javascript" src="../nav/nav.js"></script> +<script type="text/javascript" src="../nav/prototype.lite.js"></script> +<script type="text/javascript" src="../nav/moo.fx.js"></script> +<script type="text/javascript" src="../nav/user_guide_menu.js"></script> + +<meta http-equiv='expires' content='-1' /> +<meta http-equiv= 'pragma' content='no-cache' /> +<meta name='robots' content='all' /> +<meta name='author' content='ExpressionEngine Dev Team' /> +<meta name='description' content='CodeIgniter User Guide' /> + +</head> +<body> + +<!-- START NAVIGATION --> +<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> +<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> +<div id="masthead"> +<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> +<tr> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> +<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> +</tr> +</table> +</div> +<!-- END NAVIGATION --> + + +<!-- START BREADCRUMB --> +<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> +<tr> +<td id="breadcrumb"> +<a href="http://codeigniter.com/">CodeIgniter Home</a> › +<a href="../index.html">User Guide Home</a> › +Handling Multiple Environments +</td> +<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> +</tr> +</table> +<!-- END BREADCRUMB --> + +<br clear="all" /> + + +<!-- START CONTENT --> +<div id="content"> + +<h1>Handling Multiple Environments</h1> + +<p> + Developers often desire different system behavior depending on whether + an application is running in a development or production + environment. For example, verbose error output is something that would + be useful while developing an application, but it may also pose a security issue when "live". +</p> + +<h2>The ENVIRONMENT Constant</h2> + +<p> + By default, CodeIgniter comes with the environment constant set to + '<kbd>development</kbd>'. At the top of index.php, you will see: +</p> + +<code> +define('<var>ENVIRONMENT</var>', '<var>development</var>'); +</code> + +<p> + In addition to affecting some basic framework behavior (see the next section), + you may use this constant in your own development to differentiate + between which environment you are running in. +</p> + +<h2>Effects On Default Framework Behavior</h2> + +<p> + There are some places in the CodeIgniter system where the <kbd>ENVIRONMENT</kbd> + constant is used. This section describes how default framework behavior is + affected. +</p> + +<h3>Error Reporting</h3> + +<p> + Setting the <kbd>ENVIRONMENT</kbd> constant to a value of '<kbd>development</kbd>' will + cause all PHP errors to be rendered to the browser when they occur. Conversely, + setting the constant to '<kbd>production</kbd>' will disable all error output. Disabling + error reporting in production is a <a href="security.html">good security practice</a>. +</p> + +<h3>Configuration Files</h3> + +<p> + Optionally, you can have CodeIgniter load environment-specific + configuration files. This may be useful for managing things like differing API keys + across multiple environments. This is described in more detail in the + environment section of the <a href="../libraries/config.html#environments">Config Class</a> documentation. +</p> + +</div> +<!-- END CONTENT --> + + +<div id="footer"> +<p> +Previous Topic: <a href="managing_apps.html">Managing Applications</a> + · +<a href="#top">Top of Page</a> · +<a href="../index.html">User Guide Home</a> · +Next Topic: <a href="alternative_php.html">Alternative PHP Syntax</a> +</p> +<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2011 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> +</div> + +</body> +</html>
\ No newline at end of file diff --git a/user_guide/general/errors.html b/user_guide/general/errors.html index 98af3f0c7..ece80b2fd 100644 --- a/user_guide/general/errors.html +++ b/user_guide/general/errors.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -115,7 +115,7 @@ log_message('info', 'The purpose of some variable is to provide some value.');<b <p class="important"><strong>Note:</strong> In order for the log file to actually be written, the - "logs" folder must be writable. In addition, you must set the "threshold" for logging. + "logs" folder must be writable. In addition, you must set the "threshold" for logging in <dfn>application/config/config.php</dfn>. You might, for example, only want error messages to be logged, and not the other two types. If you set it to zero logging will be disabled.</p> diff --git a/user_guide/general/helpers.html b/user_guide/general/helpers.html index cc3e22644..95693a555 100644 --- a/user_guide/general/helpers.html +++ b/user_guide/general/helpers.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html index 1a77389a9..a72e84a43 100644 --- a/user_guide/general/hooks.html +++ b/user_guide/general/hooks.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/libraries.html b/user_guide/general/libraries.html index 82c409bf0..58ddc6d9b 100644 --- a/user_guide/general/libraries.html +++ b/user_guide/general/libraries.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/managing_apps.html b/user_guide/general/managing_apps.html index 4b4493dce..b08d4aa6b 100644 --- a/user_guide/general/managing_apps.html +++ b/user_guide/general/managing_apps.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/models.html b/user_guide/general/models.html index 9afec7ef2..2cd8e4d23 100644 --- a/user_guide/general/models.html +++ b/user_guide/general/models.html @@ -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.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/profiling.html b/user_guide/general/profiling.html index c8d7eb431..868cce7b7 100644 --- a/user_guide/general/profiling.html +++ b/user_guide/general/profiling.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/quick_reference.html b/user_guide/general/quick_reference.html index 388f25978..cb264803b 100644 --- a/user_guide/general/quick_reference.html +++ b/user_guide/general/quick_reference.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/requirements.html b/user_guide/general/requirements.html index fbe38261d..d8043aea2 100644 --- a/user_guide/general/requirements.html +++ b/user_guide/general/requirements.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/reserved_names.html b/user_guide/general/reserved_names.html index c12ee6e15..2dbbb5bb6 100644 --- a/user_guide/general/reserved_names.html +++ b/user_guide/general/reserved_names.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html index e973d2351..4413ef997 100644 --- a/user_guide/general/routing.html +++ b/user_guide/general/routing.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/security.html b/user_guide/general/security.html index 8a41dff9d..c47b5b25e 100644 --- a/user_guide/general/security.html +++ b/user_guide/general/security.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -87,6 +87,23 @@ array is <strong>unset</strong> by the Input class during system initialization. <p>During system initialization all global variables are unset, except those found in the $_POST and $_COOKIE arrays. The unsetting routine is effectively the same as register_globals = off.</p> +<a name="error_reporting"></a> +<h2>error_reporting</h2> + +<p> + In production environments, it is typically desirable to disable PHP's + error reporting by setting the internal error_reporting flag to a value of 0. This disables native PHP + errors from being rendered as output, which may potentially contain + sensitive information. +</p> + +<p> + Setting CodeIgniter's <kbd>ENVIRONMENT</kbd> constant in index.php to a + value of '<kbd>production</kbd>' will turn off these errors. In development + mode, it is recommended that a value of '<kbd>development</kbd>' is used. + More information about differentiating between environments can be found + on the <a href="environments.html">Handling Environments</a> page. +</p> <h2>magic_quotes_runtime</h2> diff --git a/user_guide/general/styleguide.html b/user_guide/general/styleguide.html index caddddcc4..821860829 100644 --- a/user_guide/general/styleguide.html +++ b/user_guide/general/styleguide.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html index 4ce6c3995..29ed8ea94 100644 --- a/user_guide/general/urls.html +++ b/user_guide/general/urls.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/general/views.html b/user_guide/general/views.html index fd5bde6af..2a06a9c66 100644 --- a/user_guide/general/views.html +++ b/user_guide/general/views.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -233,7 +233,7 @@ class Blog extends CI_Controller { <h3>My Todo List</h3> <ul> -<?php foreach($todo_list as $item):?> +<?php foreach ($todo_list as $item):?> <li><?php echo $item;?></li> diff --git a/user_guide/helpers/array_helper.html b/user_guide/helpers/array_helper.html index 2bbf89cad..75c069d6c 100644 --- a/user_guide/helpers/array_helper.html +++ b/user_guide/helpers/array_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/captcha_helper.html b/user_guide/helpers/captcha_helper.html index 3a863c995..ab684f3d9 100644 --- a/user_guide/helpers/captcha_helper.html +++ b/user_guide/helpers/captcha_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -68,7 +68,7 @@ CAPTCHA Helper <p>The following functions are available:</p> -<h2>captcha_create(<var>$data</var>)</h2> +<h2>create_captcha(<var>$data</var>)</h2> <p>Takes an array of information to generate the CAPTCHA as input and creates the image to your specifications, returning an array of associative data about the image.</p> diff --git a/user_guide/helpers/cookie_helper.html b/user_guide/helpers/cookie_helper.html index 860979bd8..e2a04fe1c 100644 --- a/user_guide/helpers/cookie_helper.html +++ b/user_guide/helpers/cookie_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/date_helper.html b/user_guide/helpers/date_helper.html index ba9aa8ef5..e22f28294 100644 --- a/user_guide/helpers/date_helper.html +++ b/user_guide/helpers/date_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/directory_helper.html b/user_guide/helpers/directory_helper.html index d9a3d0e99..bde72fa39 100644 --- a/user_guide/helpers/directory_helper.html +++ b/user_guide/helpers/directory_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/download_helper.html b/user_guide/helpers/download_helper.html index 7fc9c440e..c2653e3cd 100644 --- a/user_guide/helpers/download_helper.html +++ b/user_guide/helpers/download_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/email_helper.html b/user_guide/helpers/email_helper.html index 6e11ba0e6..9b21ca945 100644 --- a/user_guide/helpers/email_helper.html +++ b/user_guide/helpers/email_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html index 85a76e100..6f61f428b 100644 --- a/user_guide/helpers/file_helper.html +++ b/user_guide/helpers/file_helper.html @@ -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.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html index 62544c459..0a84fde66 100644 --- a/user_guide/helpers/form_helper.html +++ b/user_guide/helpers/form_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html index 07fd6d3dc..c7ab413ba 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/inflector_helper.html b/user_guide/helpers/inflector_helper.html index bd44fea74..3481739d7 100644 --- a/user_guide/helpers/inflector_helper.html +++ b/user_guide/helpers/inflector_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/language_helper.html b/user_guide/helpers/language_helper.html index 5c0cb26d5..82ccbce91 100644 --- a/user_guide/helpers/language_helper.html +++ b/user_guide/helpers/language_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/number_helper.html b/user_guide/helpers/number_helper.html index afe5bc3fe..23db58263 100644 --- a/user_guide/helpers/number_helper.html +++ b/user_guide/helpers/number_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/path_helper.html b/user_guide/helpers/path_helper.html index 205cce20e..c0a90f80a 100644 --- a/user_guide/helpers/path_helper.html +++ b/user_guide/helpers/path_helper.html @@ -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.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/security_helper.html b/user_guide/helpers/security_helper.html index 2dba7bb8e..03c25fcb0 100644 --- a/user_guide/helpers/security_helper.html +++ b/user_guide/helpers/security_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/smiley_helper.html b/user_guide/helpers/smiley_helper.html index 18df9876f..7021b73cc 100644 --- a/user_guide/helpers/smiley_helper.html +++ b/user_guide/helpers/smiley_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/string_helper.html b/user_guide/helpers/string_helper.html index 11b6b2736..701618bee 100644 --- a/user_guide/helpers/string_helper.html +++ b/user_guide/helpers/string_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/text_helper.html b/user_guide/helpers/text_helper.html index a7f0f2b18..7d646cb73 100644 --- a/user_guide/helpers/text_helper.html +++ b/user_guide/helpers/text_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/typography_helper.html b/user_guide/helpers/typography_helper.html index 425c20ec1..bcc11ee0b 100644 --- a/user_guide/helpers/typography_helper.html +++ b/user_guide/helpers/typography_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/url_helper.html b/user_guide/helpers/url_helper.html index 6d8bdc240..497bdb417 100644 --- a/user_guide/helpers/url_helper.html +++ b/user_guide/helpers/url_helper.html @@ -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.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/helpers/xml_helper.html b/user_guide/helpers/xml_helper.html index 446a01d8c..d7482c12a 100644 --- a/user_guide/helpers/xml_helper.html +++ b/user_guide/helpers/xml_helper.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/index.html b/user_guide/index.html index 882eec0f8..23fcd1c42 100644 --- a/user_guide/index.html +++ b/user_guide/index.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/downloads.html b/user_guide/installation/downloads.html index d580fde7b..f27eef05e 100644 --- a/user_guide/installation/downloads.html +++ b/user_guide/installation/downloads.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -58,25 +58,28 @@ Downloading CodeIgniter <h1>Downloading CodeIgniter</h1> <ul> -<li><a href="http://codeigniter.com/download.php">CodeIgniter V 1.7.2 (Current version)</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.7.1.zip">CodeIgniter V 1.7.1</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.7.0.zip">CodeIgniter V 1.7.0</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.6.3.zip">CodeIgniter V 1.6.3</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.6.2.zip">CodeIgniter V 1.6.2</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.6.1.zip">CodeIgniter V 1.6.1</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.6.0.zip">CodeIgniter V 1.6.0</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.5.4.zip">CodeIgniter V 1.5.4</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.5.3.zip">CodeIgniter V 1.5.3</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.5.2.zip">CodeIgniter V 1.5.2</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.5.1.zip">CodeIgniter V 1.5.1</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.4.1.zip">CodeIgniter V 1.4.1</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.3.3.zip">CodeIgniter V 1.3.3</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.3.2.zip">CodeIgniter V 1.3.2</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.3.1.zip">CodeIgniter V 1.3.1</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.3.zip">CodeIgniter V 1.3</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.2.zip">CodeIgniter V 1.2</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.1b.zip">CodeIgniter V 1.1</a></li> -<li><a href="http://codeigniter.com/download_files/CodeIgniter_1.0b.zip">CodeIgniter V 1.0</a></li> + <li><a href="http://codeigniter.com/downloads/">CodeIgniter V 2.0.1 (Current version)</a></li> + <li><a href="http://codeigniter.com/download_files/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> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.7.2.zip">CodeIgniter V 1.7.2</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.7.1.zip">CodeIgniter V 1.7.1</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.7.0.zip">CodeIgniter V 1.7.0</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.6.3.zip">CodeIgniter V 1.6.3</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.6.2.zip">CodeIgniter V 1.6.2</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.6.1.zip">CodeIgniter V 1.6.1</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.6.0.zip">CodeIgniter V 1.6.0</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.5.4.zip">CodeIgniter V 1.5.4</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.5.3.zip">CodeIgniter V 1.5.3</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.5.2.zip">CodeIgniter V 1.5.2</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.5.1.zip">CodeIgniter V 1.5.1</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.4.1.zip">CodeIgniter V 1.4.1</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.3.3.zip">CodeIgniter V 1.3.3</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.3.2.zip">CodeIgniter V 1.3.2</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.3.1.zip">CodeIgniter V 1.3.1</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.3.zip">CodeIgniter V 1.3</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.2.zip">CodeIgniter V 1.2</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.1b.zip">CodeIgniter V 1.1</a></li> + <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.0b.zip">CodeIgniter V 1.0</a></li> </ul> @@ -85,7 +88,7 @@ Downloading CodeIgniter <h1 id="hg">Mercurial Server</h1> <p><a href="http://mercurial.selenic.com">Mercurial</a> is a distributed version control system.</p> - <p>Public Hg access is available at <a href="http://bitbucket.org/ellislab/codeigniter/">BitBucket</a>. + <p>Public Hg access is available at <a href="http://bitbucket.org/ellislab/codeigniter-reactor/">BitBucket</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> diff --git a/user_guide/installation/index.html b/user_guide/installation/index.html index 9a611eb41..5d26a42ec 100644 --- a/user_guide/installation/index.html +++ b/user_guide/installation/index.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -74,6 +74,12 @@ variables at the top of the file with the new name you've chosen.</p> <p>After moving them, open your main <kdb>index.php</kbd> file and set the <samp>$system_folder</samp> and <samp>$application_folder</samp> variables, preferably with a full path, e.g. '<dfn>/www/MyUser/system</dfn>'.</p> +<p> + One additional measure to take in production environments is to disable + PHP error reporting and any other development-only functionality. In CodeIgniter, + this can be done by setting the <kbd>ENVIRONMENT</kbd> constant, which is + more fully described on the <a href="../general/security.html">security page</a>. +</p> <p>That's it!</p> diff --git a/user_guide/installation/troubleshooting.html b/user_guide/installation/troubleshooting.html index c1c423a76..aeb9c44c4 100644 --- a/user_guide/installation/troubleshooting.html +++ b/user_guide/installation/troubleshooting.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_120.html b/user_guide/installation/upgrade_120.html index da49549a5..765da680f 100644 --- a/user_guide/installation/upgrade_120.html +++ b/user_guide/installation/upgrade_120.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_130.html b/user_guide/installation/upgrade_130.html index 759177612..ec4aa5ca7 100644 --- a/user_guide/installation/upgrade_130.html +++ b/user_guide/installation/upgrade_130.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_131.html b/user_guide/installation/upgrade_131.html index a2f742532..18a2f8aff 100644 --- a/user_guide/installation/upgrade_131.html +++ b/user_guide/installation/upgrade_131.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_132.html b/user_guide/installation/upgrade_132.html index e0e562231..dc5bffe98 100644 --- a/user_guide/installation/upgrade_132.html +++ b/user_guide/installation/upgrade_132.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_133.html b/user_guide/installation/upgrade_133.html index 1fb537a76..833755619 100644 --- a/user_guide/installation/upgrade_133.html +++ b/user_guide/installation/upgrade_133.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_140.html b/user_guide/installation/upgrade_140.html index 9da635cf1..0993e6b62 100644 --- a/user_guide/installation/upgrade_140.html +++ b/user_guide/installation/upgrade_140.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_141.html b/user_guide/installation/upgrade_141.html index f1dad54f4..8f1366296 100644 --- a/user_guide/installation/upgrade_141.html +++ b/user_guide/installation/upgrade_141.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_150.html b/user_guide/installation/upgrade_150.html index dd5a90d7a..c70968570 100644 --- a/user_guide/installation/upgrade_150.html +++ b/user_guide/installation/upgrade_150.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_152.html b/user_guide/installation/upgrade_152.html index f548e259d..931305894 100644 --- a/user_guide/installation/upgrade_152.html +++ b/user_guide/installation/upgrade_152.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_153.html b/user_guide/installation/upgrade_153.html index d76d8f173..e000d173a 100644 --- a/user_guide/installation/upgrade_153.html +++ b/user_guide/installation/upgrade_153.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_154.html b/user_guide/installation/upgrade_154.html index 4c534ffcb..c6338c627 100644 --- a/user_guide/installation/upgrade_154.html +++ b/user_guide/installation/upgrade_154.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_160.html b/user_guide/installation/upgrade_160.html index 366826fb8..cbdbaff82 100644 --- a/user_guide/installation/upgrade_160.html +++ b/user_guide/installation/upgrade_160.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_161.html b/user_guide/installation/upgrade_161.html index c809b63dc..d279f32ff 100644 --- a/user_guide/installation/upgrade_161.html +++ b/user_guide/installation/upgrade_161.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_162.html b/user_guide/installation/upgrade_162.html index f4792c2f8..ca9fd926b 100644 --- a/user_guide/installation/upgrade_162.html +++ b/user_guide/installation/upgrade_162.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_163.html b/user_guide/installation/upgrade_163.html index 915a7231d..dac67e3bc 100644 --- a/user_guide/installation/upgrade_163.html +++ b/user_guide/installation/upgrade_163.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_170.html b/user_guide/installation/upgrade_170.html index d286cf289..441083670 100644 --- a/user_guide/installation/upgrade_170.html +++ b/user_guide/installation/upgrade_170.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_171.html b/user_guide/installation/upgrade_171.html index 6058232b9..4e5ec69e7 100644 --- a/user_guide/installation/upgrade_171.html +++ b/user_guide/installation/upgrade_171.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_172.html b/user_guide/installation/upgrade_172.html index b5c95b169..ecc7351aa 100644 --- a/user_guide/installation/upgrade_172.html +++ b/user_guide/installation/upgrade_172.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_200.html b/user_guide/installation/upgrade_200.html index c4a588772..6baea7338 100644 --- a/user_guide/installation/upgrade_200.html +++ b/user_guide/installation/upgrade_200.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrade_201.html b/user_guide/installation/upgrade_201.html new file mode 100644 index 000000000..879067c6e --- /dev/null +++ b/user_guide/installation/upgrade_201.html @@ -0,0 +1,103 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>Upgrading from 2.0.0 to 2.0.1 : CodeIgniter User Guide</title> + +<style type='text/css' media='all'>@import url('../userguide.css');</style> +<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> + +<script type="text/javascript" src="../nav/nav.js"></script> +<script type="text/javascript" src="../nav/prototype.lite.js"></script> +<script type="text/javascript" src="../nav/moo.fx.js"></script> +<script type="text/javascript" src="../nav/user_guide_menu.js"></script> + +<meta http-equiv='expires' content='-1' /> +<meta http-equiv= 'pragma' content='no-cache' /> +<meta name='robots' content='all' /> +<meta name='author' content='ExpressionEngine Dev Team' /> +<meta name='description' content='CodeIgniter User Guide' /> + +</head> +<body> + +<!-- START NAVIGATION --> +<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> +<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> +<div id="masthead"> +<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> +<tr> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> +<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> +</tr> +</table> +</div> +<!-- END NAVIGATION --> + + +<!-- START BREADCRUMB --> +<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> +<tr> +<td id="breadcrumb"> +<a href="http://codeigniter.com/">CodeIgniter Home</a> › +<a href="../index.html">User Guide Home</a> › +Upgrading from 2.0.0 to 2.0.1 +</td> +<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> +</tr> +</table> +<!-- END BREADCRUMB --> + +<br clear="all" /> + + +<!-- START CONTENT --> +<div id="content"> + +<h1>Upgrading from 2.0.0 to 2.0.1</h1> + +<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> + + +<h2>Step 1: Update your CodeIgniter files</h2> + +<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: Replace config/mimes.php</h2> + +<p>This config file has been updated to contain more mime types, please copy it to <kbd>application/config/mimes.php</kbd>.</p> + +<h2>Step 3: Check for forms posting to default controller</h2> + +<p> + The default behavior for <kbd>form_open()</kbd> when called with no parameters used to be to post to the default controller, but it will now just leave an empty action="" meaning the form will submit to the current URL. + If submitting to the default controller was the expected behavior it will need to be changed from: +</p> + +<code>echo form_open(); //<form action="" method="post" accept-charset="utf-8"></code> + +<p>to use either a / or <kbd>base_url()</kbd>:</p> + +<code>echo form_open('/'); //<form action="http://example.com/index.php/" method="post" accept-charset="utf-8"><br/> +echo form_open(base_url()); //<form action="http://example.com/" method="post" accept-charset="utf-8"></code> + +</div> +<!-- END CONTENT --> + + +<div id="footer"> +<p> +Previous Topic: <a href="index.html">Installation Instructions</a> + · +<a href="#top">Top of Page</a> · +<a href="../index.html">User Guide Home</a> · +Next Topic: <a href="troubleshooting.html">Troubleshooting</a> +</p> +<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2011 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> +</div> + +</body> +</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrade_b11.html b/user_guide/installation/upgrade_b11.html index dd0a9bcdb..b3f70c606 100644 --- a/user_guide/installation/upgrade_b11.html +++ b/user_guide/installation/upgrade_b11.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/upgrading.html b/user_guide/installation/upgrading.html index 9f95783cf..f72ef02d6 100644 --- a/user_guide/installation/upgrading.html +++ b/user_guide/installation/upgrading.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -60,26 +60,27 @@ Upgrading from a Previous Version <p>Please read the upgrade notes corresponding to the version you are upgrading from.</p> <ul> -<li><a href="upgrade_200.html">Upgrading from 1.7.2 to 2.0</a></li> -<li><a href="upgrade_172.html">Upgrading from 1.7.1 to 1.7.2</a></li> -<li><a href="upgrade_171.html">Upgrading from 1.7.0 to 1.7.1</a></li> -<li><a href="upgrade_170.html">Upgrading from 1.6.3 to 1.7.0</a></li> -<li><a href="upgrade_163.html">Upgrading from 1.6.2 to 1.6.3</a></li> -<li><a href="upgrade_162.html">Upgrading from 1.6.1 to 1.6.2</a></li> -<li><a href="upgrade_161.html">Upgrading from 1.6.0 to 1.6.1</a></li> -<li><a href="upgrade_160.html">Upgrading from 1.5.4 to 1.6.0</a></li> -<li><a href="upgrade_154.html">Upgrading from 1.5.3 to 1.5.4</a></li> -<li><a href="upgrade_153.html">Upgrading from 1.5.2 to 1.5.3</a></li> -<li><a href="upgrade_152.html">Upgrading from 1.5.0 or 1.5.1 to 1.5.2</a></li> -<li><a href="upgrade_150.html">Upgrading from 1.4.1 to 1.5.0</a></li> -<li><a href="upgrade_141.html">Upgrading from 1.4.0 to 1.4.1</a></li> -<li><a href="upgrade_140.html">Upgrading from 1.3.3 to 1.4.0</a></li> -<li><a href="upgrade_133.html">Upgrading from 1.3.2 to 1.3.3</a></li> -<li><a href="upgrade_132.html">Upgrading from 1.3.1 to 1.3.2</a></li> -<li><a href="upgrade_131.html">Upgrading from 1.3 to 1.3.1</a></li> -<li><a href="upgrade_130.html">Upgrading from 1.2 to 1.3</a></li> -<li><a href="upgrade_120.html">Upgrading from 1.1 to 1.2</a></li> -<li><a href="upgrade_b11.html">Upgrading from Beta 1.0 to Beta 1.1</a></li> + <li><a href="upgrade_201.html">Upgrading from 2.0 to 2.0.1</a></li> + <li><a href="upgrade_200.html">Upgrading from 1.7.2 to 2.0</a></li> + <li><a href="upgrade_172.html">Upgrading from 1.7.1 to 1.7.2</a></li> + <li><a href="upgrade_171.html">Upgrading from 1.7.0 to 1.7.1</a></li> + <li><a href="upgrade_170.html">Upgrading from 1.6.3 to 1.7.0</a></li> + <li><a href="upgrade_163.html">Upgrading from 1.6.2 to 1.6.3</a></li> + <li><a href="upgrade_162.html">Upgrading from 1.6.1 to 1.6.2</a></li> + <li><a href="upgrade_161.html">Upgrading from 1.6.0 to 1.6.1</a></li> + <li><a href="upgrade_160.html">Upgrading from 1.5.4 to 1.6.0</a></li> + <li><a href="upgrade_154.html">Upgrading from 1.5.3 to 1.5.4</a></li> + <li><a href="upgrade_153.html">Upgrading from 1.5.2 to 1.5.3</a></li> + <li><a href="upgrade_152.html">Upgrading from 1.5.0 or 1.5.1 to 1.5.2</a></li> + <li><a href="upgrade_150.html">Upgrading from 1.4.1 to 1.5.0</a></li> + <li><a href="upgrade_141.html">Upgrading from 1.4.0 to 1.4.1</a></li> + <li><a href="upgrade_140.html">Upgrading from 1.3.3 to 1.4.0</a></li> + <li><a href="upgrade_133.html">Upgrading from 1.3.2 to 1.3.3</a></li> + <li><a href="upgrade_132.html">Upgrading from 1.3.1 to 1.3.2</a></li> + <li><a href="upgrade_131.html">Upgrading from 1.3 to 1.3.1</a></li> + <li><a href="upgrade_130.html">Upgrading from 1.2 to 1.3</a></li> + <li><a href="upgrade_120.html">Upgrading from 1.1 to 1.2</a></li> + <li><a href="upgrade_b11.html">Upgrading from Beta 1.0 to Beta 1.1</a></li> </ul> diff --git a/user_guide/libraries/benchmark.html b/user_guide/libraries/benchmark.html index e8182d080..3213a6790 100644 --- a/user_guide/libraries/benchmark.html +++ b/user_guide/libraries/benchmark.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/caching.html b/user_guide/libraries/caching.html index 3d3354436..e04cf10b8 100644 --- a/user_guide/libraries/caching.html +++ b/user_guide/libraries/caching.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/calendar.html b/user_guide/libraries/calendar.html index 347b3d92b..1222235c9 100644 --- a/user_guide/libraries/calendar.html +++ b/user_guide/libraries/calendar.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/cart.html b/user_guide/libraries/cart.html index bc0721bb4..c8d69d787 100644 --- a/user_guide/libraries/cart.html +++ b/user_guide/libraries/cart.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -178,7 +178,7 @@ $this->cart->insert($data); <?php $i = 1; ?> -<?php foreach($this->cart->contents() as $items): ?> +<?php foreach ($this->cart->contents() as $items): ?> <?php echo form_hidden($i.'[rowid]', $items['rowid']); ?> diff --git a/user_guide/libraries/config.html b/user_guide/libraries/config.html index 98b6052a9..71c68332c 100644 --- a/user_guide/libraries/config.html +++ b/user_guide/libraries/config.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -150,23 +150,42 @@ $site_name = $blog_config['site_name'];</code> <p>Where <var>item_name</var> is the $config array index you want to change, and <var>item_value</var> is its value.</p> +<a name="environments"></a> <h2>Environments</h2> -<p>You can set the environment of you application and load config items depending on the current environment. It also disables PHP from displaying errors in environments other than development. To set your environment, open <strong>index.php</strong>, located at the root and change the <var>ENVIRONMENT</var> constant. By default, there is support for a development, test and production environment.</p> - -<code> -define('<var>ENVIRONMENT</var>', '<var>development</var>'); -</code> +<p> + You may load different configuration files depending on the current environment. + The <kbd>ENVIRONMENT</kbd> constant is defined in index.php, and is described + in detail in the <a href="../general/environments.html">Handling Environments</a> + section. +</p> + +<p> + To create an environment-specific configuration file, + create or copy a configuration file in application/config/{ENVIRONMENT}/{FILENAME}.php +</p> + +<p>For example, to create a production-only config.php, you would:</p> + +<ol> + <li>Create the directory application/config/production/</li> + <li>Copy your existing config.php into the above directory</li> + <li>Edit application/config/production/config.php so it contains your production settings</li> +</ol> + +<p> + When you set the <kbd>ENVIRONMENT</kbd> constant to 'production', the settings + for your new production-only config.php will be loaded. +</p> -<p>To make a config file environment-aware, copy the file from <samp>application/config/</samp> to <samp>application/config/development/</samp>, depending on the environment the config file belongs to. You can place the following configuration files in environment folders:</p> +<p>You can place the following configuration files in environment-specific folders:</p> <ul> -<li>Default config files</li> -<li>Database config files</li> -<li>Custom config files</li> +<li>Default CodeIgniter configuration files</li> +<li>Your own custom configuration files</li> </ul> -<p><strong>Note:</strong> CodeIgniter always tries to load the config file for the current environment first. If the file does not exist, the global config file (i.e. <samp>application/config/</samp>) is loaded. This means you are not obligated to place <strong>all</strong> your config files (but rather the files that change per environment) in an environment folder.</p> +<p><strong>Note:</strong> CodeIgniter always tries to load the configuration files for the current environment first. If the file does not exist, the global config file (i.e., the one in <samp>application/config/</samp>) is loaded. This means you are not obligated to place <strong>all</strong> of your configuration files in an environment folder − only the files that change per environment.</p> <h2>Helper Functions</h2> @@ -195,4 +214,4 @@ Next Topic: <a href="../database/index.html">Database Class</a> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/user_guide/libraries/email.html b/user_guide/libraries/email.html index a02d6587f..357c01ff1 100644 --- a/user_guide/libraries/email.html +++ b/user_guide/libraries/email.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/encryption.html b/user_guide/libraries/encryption.html index f6fb2b81d..b06adefc2 100644 --- a/user_guide/libraries/encryption.html +++ b/user_guide/libraries/encryption.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html index c5eab4695..5e5117a9e 100644 --- a/user_guide/libraries/file_uploading.html +++ b/user_guide/libraries/file_uploading.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -125,7 +125,7 @@ In it, place this code and save it to your <samp>applications/views/</samp> fold <h3>Your file was successfully uploaded!</h3> <ul> -<?php foreach($upload_data as $item => $value):?> +<?php foreach ($upload_data as $item => $value):?> <li><?php echo $item;?>: <?php echo $value;?></li> <?php endforeach; ?> </ul> diff --git a/user_guide/libraries/form_validation.html b/user_guide/libraries/form_validation.html index d6120054b..c72cfce1c 100644 --- a/user_guide/libraries/form_validation.html +++ b/user_guide/libraries/form_validation.html @@ -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.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html index e3c06741d..1c1ad73e9 100644 --- a/user_guide/libraries/ftp.html +++ b/user_guide/libraries/ftp.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/image_lib.html b/user_guide/libraries/image_lib.html index 0f023cff1..81ae09c6b 100644 --- a/user_guide/libraries/image_lib.html +++ b/user_guide/libraries/image_lib.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html index 552c49afd..d7e898bd1 100644 --- a/user_guide/libraries/input.html +++ b/user_guide/libraries/input.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -132,12 +132,32 @@ else<br /> <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>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 + <br /> + $this->input->post(NULL, FALSE); // returns all POST items without XSS +</code> + <h2>$this->input->get()</h2> <p>This function is identical to the post function, only it fetches get data:</p> <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>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 + <br /> + $this->input->get(NULL, FALSE); // returns all GET items without XSS filtering +</code> + <h2>$this->input->get_post()</h2> <p>This function will search through both the post and get streams for data, looking first in post, and then in get:</p> @@ -167,13 +187,14 @@ Array Method, and Discrete Parameters:</p> <p>Using this method, an associative array is passed to the first parameter:</p> <code>$cookie = array(<br /> - 'name' => 'The Cookie Name',<br /> - 'value' => 'The Value',<br /> - 'expire' => '86500',<br /> - 'domain' => '.some-domain.com',<br /> - 'path' => '/',<br /> - 'prefix' => 'myprefix_',<br /> - );<br /> + 'name' => 'The Cookie Name',<br /> + 'value' => 'The Value',<br /> + 'expire' => '86500',<br /> + 'domain' => '.some-domain.com',<br /> + 'path' => '/',<br /> + 'prefix' => 'myprefix_',<br /> + 'secure' => TRUE<br /> +);<br /> <br /> $this->input->set_cookie($cookie); </code> @@ -188,24 +209,25 @@ zero the cookie will only last as long as the browser is open.</p> <p>For site-wide cookies regardless of how your site is requested, add your URL to the <strong>domain</strong> starting with a period, like this: .your-domain.com</p> <p>The path is usually not needed since the function sets a root path.</p> <p>The prefix is only needed if you need to avoid name collisions with other identically named cookies for your server.</p> +<p>The secure boolean is only needed if you want to make it a secure cookie by setting it to TRUE.</p> <h4>Discrete Parameters</h4> <p>If you prefer, you can set the cookie by passing data using individual parameters:</p> -<code>$this->input->set_cookie($name, $value, $expire, $domain, $path, $prefix);</code> +<code>$this->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure);</code> -<h2>$this->input->get_cookie()</h2> +<h2>$this->input->cookie()</h2> <p>Lets you fetch a cookie. The first parameter will contain the name of the cookie you are looking for (including any prefixes):</p> -<code>get_cookie('some_cookie');</code> +<code>cookie('some_cookie');</code> <p>The function returns FALSE (boolean) if the item you are attempting to retrieve does not exist.</p> <p>The second optional parameter lets you run the data through the XSS filter. It's enabled by setting the second parameter to boolean TRUE;</p> -<p><code>get_cookie('some_cookie', TRUE);</code></p> +<p><code>cookie('some_cookie', TRUE);</code></p> <h2>$this->input->ip_address()</h2> @@ -231,7 +253,7 @@ else<br /> <h2>$this->input->user_agent()</h2> <p>Returns the user agent (web browser) being used by the current user. Returns FALSE if it's not available.</p> <code>echo $this->input->user_agent();</code> - +<p>See the <a href="user_agent.html">User Agent Class</a> for methods which extract information from the user agent string.</p> <h2>$this->input->request_headers()</h2> <p>Useful if running in a non-Apache environment where <a href="http://php.net/apache_request_headers">apache_request_headers()</a> will not be supported. Returns an array of headers.</p> diff --git a/user_guide/libraries/javascript.html b/user_guide/libraries/javascript.html index 18b7181b0..faa84174d 100644 --- a/user_guide/libraries/javascript.html +++ b/user_guide/libraries/javascript.html @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> -<title>JavaScript Driver : CodeIgniter User Guide</title> +<title>CodeIgniter User Guide : JavaScript Class</title> <style type='text/css' media='all'>@import url('../userguide.css');</style> <link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -58,7 +58,7 @@ JavaScript Driver <p class="important"><strong>Note:</strong> This driver is experimental. Its feature set and implementation may change in future releases.</p><br> -<h1>Javascript Driver</h1> +<h1>Javascript Class</h1> <p>CodeIgniter provides a library to help you with certain common functions that you may want to use with Javascript. Please note that CodeIgniter does not require the jQuery library to run, and that any scripting library will work equally well. The jQuery library is simply presented as a convenience if you choose to use it.</p> <h2>Initializing the Class</h2> <p>To initialize the Javascript class manually in your controller constructor, use the <dfn>$this->load->library</dfn> function. Currently, the only available library is jQuery, which will automatically be loaded like this:</p> @@ -244,4 +244,4 @@ Next Topic: <a href="language.html">Language Class</a></p> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/user_guide/libraries/language.html b/user_guide/libraries/language.html index dfdccad04..fcc28262d 100644 --- a/user_guide/libraries/language.html +++ b/user_guide/libraries/language.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html index 45a9e89a1..62a250482 100644 --- a/user_guide/libraries/loader.html +++ b/user_guide/libraries/loader.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/output.html b/user_guide/libraries/output.html index ab8f1d683..3e18fa0d9 100644 --- a/user_guide/libraries/output.html +++ b/user_guide/libraries/output.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -78,6 +78,21 @@ It is possible, however, for you to manually intervene with the output if you ne For example, if you build a page in one of your controller functions, don't set the output until the end.</p> +<h2>$this->output->set_content_type();</h2> + +<p>Permits you to set the mime-type of your page so you can serve JSON data, JPEG's, XML, etc easily.</p> + +<code>$this->output<br/> + ->set_content_type('application/json')<br/> + ->set_output(json_encode(array('foo' => 'bar')));<br/> +<br/> +$this->output<br/> + ->set_content_type('jpeg') // You could also use ".jpeg" which will have the full stop removed before looking in config/mimes.php<br/> + ->set_output(file_get_contents('files/something.jpg'));</code> + +<p><strong>Important:</strong> Make sure any non-mime string you pass to this method exists in config/mimes.php or it will have no effect.</p> + + <h2>$this->output->get_output();</h2> <p>Permits you to manually retrieve any output that has been sent for storage in the output class. Usage example:</p> diff --git a/user_guide/libraries/pagination.html b/user_guide/libraries/pagination.html index da07c79be..3db020adb 100644 --- a/user_guide/libraries/pagination.html +++ b/user_guide/libraries/pagination.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/parser.html b/user_guide/libraries/parser.html index 5bb403a7f..1089f4056 100644 --- a/user_guide/libraries/parser.html +++ b/user_guide/libraries/parser.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/security.html b/user_guide/libraries/security.html index 943f72a0f..6fbdf7744 100644 --- a/user_guide/libraries/security.html +++ b/user_guide/libraries/security.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/sessions.html b/user_guide/libraries/sessions.html index c8757995c..5243a83d6 100644 --- a/user_guide/libraries/sessions.html +++ b/user_guide/libraries/sessions.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html index 9de70775a..28994aa69 100644 --- a/user_guide/libraries/table.html +++ b/user_guide/libraries/table.html @@ -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.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/trackback.html b/user_guide/libraries/trackback.html index 32b1ee258..971b8f336 100644 --- a/user_guide/libraries/trackback.html +++ b/user_guide/libraries/trackback.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/typography.html b/user_guide/libraries/typography.html index 9c4272b37..14725cd1a 100644 --- a/user_guide/libraries/typography.html +++ b/user_guide/libraries/typography.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/unit_testing.html b/user_guide/libraries/unit_testing.html index 49c5881e1..e68bc3fde 100644 --- a/user_guide/libraries/unit_testing.html +++ b/user_guide/libraries/unit_testing.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/uri.html b/user_guide/libraries/uri.html index 0dbaffa49..7b5887fa0 100644 --- a/user_guide/libraries/uri.html +++ b/user_guide/libraries/uri.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/user_agent.html b/user_guide/libraries/user_agent.html index 8989fb2e1..2d303db3c 100644 --- a/user_guide/libraries/user_agent.html +++ b/user_guide/libraries/user_agent.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html index 7a8934d39..53931aee7 100644 --- a/user_guide/libraries/xmlrpc.html +++ b/user_guide/libraries/xmlrpc.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/libraries/zip.html b/user_guide/libraries/zip.html index 48e2562be..6cb0d195d 100644 --- a/user_guide/libraries/zip.html +++ b/user_guide/libraries/zip.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/license.html b/user_guide/license.html index bb01a7e8d..645358ac8 100644 --- a/user_guide/license.html +++ b/user_guide/license.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/nav/nav.js b/user_guide/nav/nav.js index 8f16e275f..eaa5f6237 100644 --- a/user_guide/nav/nav.js +++ b/user_guide/nav/nav.js @@ -59,6 +59,7 @@ function create_menu(basepath) '<li><a href="'+base+'general/caching.html">Caching</a></li>' + '<li><a href="'+base+'general/profiling.html">Profiling Your Application</a></li>' + '<li><a href="'+base+'general/managing_apps.html">Managing Applications</a></li>' + + '<li><a href="'+base+'general/environments.html">Handling Multiple Environments</a></li>' + '<li><a href="'+base+'general/alternative_php.html">Alternative PHP Syntax</a></li>' + '<li><a href="'+base+'general/security.html">Security</a></li>' + '<li><a href="'+base+'general/styleguide.html">PHP Style Guide</a></li>' + diff --git a/user_guide/overview/appflow.html b/user_guide/overview/appflow.html index c5af8bc15..09c13f9e7 100644 --- a/user_guide/overview/appflow.html +++ b/user_guide/overview/appflow.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/overview/at_a_glance.html b/user_guide/overview/at_a_glance.html index 9cbc8afb7..9b5707152 100644 --- a/user_guide/overview/at_a_glance.html +++ b/user_guide/overview/at_a_glance.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/overview/cheatsheets.html b/user_guide/overview/cheatsheets.html index 764d6d9e1..a421a1b62 100644 --- a/user_guide/overview/cheatsheets.html +++ b/user_guide/overview/cheatsheets.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/overview/features.html b/user_guide/overview/features.html index 6dfd15d90..e7e26ad50 100644 --- a/user_guide/overview/features.html +++ b/user_guide/overview/features.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/overview/getting_started.html b/user_guide/overview/getting_started.html index 5c00aba3d..d0e6bf707 100644 --- a/user_guide/overview/getting_started.html +++ b/user_guide/overview/getting_started.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/overview/goals.html b/user_guide/overview/goals.html index bf7bc8fa2..1ae3bbbd4 100644 --- a/user_guide/overview/goals.html +++ b/user_guide/overview/goals.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/overview/index.html b/user_guide/overview/index.html index 63eb5e930..accf98017 100644 --- a/user_guide/overview/index.html +++ b/user_guide/overview/index.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/overview/mvc.html b/user_guide/overview/mvc.html index 0b0fb25ee..5bed9cbae 100644 --- a/user_guide/overview/mvc.html +++ b/user_guide/overview/mvc.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/toc.html b/user_guide/toc.html index 5eb9c2acc..4e0b65212 100644 --- a/user_guide/toc.html +++ b/user_guide/toc.html @@ -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.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.1</h1></td> </tr> </table> </div> @@ -118,6 +118,13 @@ Table of Contents <li><a href="./doc_style/index.html">Writing Documentation</a></li> </ul> +<h3>Additional Resources</h3> + +<ul> +<li><a href="http://codeigniter.com/forums/">Community Forums</a></li> +<li><a href="http://codeigniter.com/wiki/">Community Wiki</a></li> +</ul> + </td> <td valign="top" width="25%"> @@ -127,7 +134,6 @@ Table of Contents <li><a href="./libraries/calendar.html">Calendar Class</a></li> <li><a href="./libraries/cart.html">Cart Class</a></li> <li><a href="./libraries/config.html">Config Class</a></li> -<li><a href="./database/index.html">Database Class</a></li> <li><a href="./libraries/email.html">Email Class</a></li> <li><a href="./libraries/encryption.html">Encryption Class</a></li> <li><a href="./libraries/file_uploading.html">File Uploading Class</a></li> @@ -157,6 +163,13 @@ Table of Contents </td> <td valign="top" width="25%"> +<h3>Driver Reference</h3> +<ul> +<li><a href="./libraries/caching.html">Caching Class</a></li> +<li><a href="./database/index.html">Database Class</a></li> +<li><a href="./libraries/javascript.html">Javascript Class</a></li> +</ul> + <h3>Helper Reference</h3> <ul> <li><a href="./helpers/array_helper.html">Array Helper</a></li> @@ -182,12 +195,7 @@ Table of Contents <li><a href="./helpers/xml_helper.html">XML Helper</a></li> </ul> -<h3>Additional Resources</h3> -<ul> -<li><a href="http://codeigniter.com/forums/">Community Forums</a></li> -<li><a href="http://codeigniter.com/wiki/">Community Wiki</a></li> -</ul> </td> |