From 6700b93c4d7a16e7288e4e2cd3223093926666ea Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 24 Sep 2011 14:25:33 +0300 Subject: [PATCH 001/106] Added _file_mime_type() method to system/libraries/Upload.php in order to fix a possible MIME-type injection (issue #60) --- system/libraries/Upload.php | 68 +++++++++++++++++++++++++++++++++++-- user_guide/changelog.html | 5 ++- 2 files changed, 70 insertions(+), 3 deletions(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 3177424c..93f763ed 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -196,7 +196,8 @@ public function do_upload($field = 'userfile') // Set the uploaded data as class variables $this->file_temp = $_FILES[$field]['tmp_name']; $this->file_size = $_FILES[$field]['size']; - $this->file_type = preg_replace("/^(.+?);.*$/", "\\1", $_FILES[$field]['type']); + $this->_file_mime_type($_FILES[$field]); + $this->file_type = preg_replace("/^(.+?);.*$/", "\\1", $this->file_type); $this->file_type = strtolower(trim(stripslashes($this->file_type), '"')); $this->file_name = $this->_prep_filename($_FILES[$field]['name']); $this->file_ext = $this->get_extension($this->file_name); @@ -1006,8 +1007,71 @@ protected function _prep_filename($filename) // -------------------------------------------------------------------- + /** + * File MIME type + * + * Detects the (actual) MIME type of the uploaded file, if possible. + * The input array is expected to be $_FILES[$field] + * + * @param array + * @return void + */ + protected function _file_mime_type($file) + { + $file_type = ''; + + // Use if the Fileinfo extension, if available (only versions above 5.3 support the FILEINFO_MIME_TYPE flag) + if ( (float) substr(phpversion(), 0, 3) >= 5.3 && function_exists('finfo_file')) + { + $finfo = new finfo(FILEINFO_MIME_TYPE); + if ($finfo !== FALSE) // This is possible, if there is no magic MIME database file found on the system + { + $file_type = $finfo->file($file['tmp_name']); + + /* According to the comments section of the PHP manual page, + * it is possible that this function returns an empty string + * for some files (e.g. if they don't exist in the magic MIME database. + */ + if (strlen($file_type) > 1) + { + $this->file_type = $file_info; + return; + } + } + } + + // Fall back to the deprecated mime_content_type(), if available + if (function_exists('mime_content_type')) + { + $this->file_type = @mime_content_type($file['tmp_name']); + return; + } + + /* This is an ugly hack, but UNIX-type systems provide a native way to detect the file type, + * which is still more secure than depending on the value of $_FILES[$field]['type']. + * + * Notes: + * - a 'W' in the substr() expression bellow, would mean that we're using Windows + * - many system admins would disable the exec() function due to security concerns, hence the function_exists() check + */ + if (substr(PHP_OS, 0, 1) !== 'W' && function_exists('exec')) + { + $output = array(); + @exec('file --brief --mime-type ' . escapeshellarg($file['tmp_path']), $output, $return_code); + if ($return_code === 0 && strlen($output[0]) > 0) // A return status code != 0 would mean failed execution + { + $this->file_type = rtrim($output[0]); + return; + } + } + + $this->file_type = $file['type']; + } + + // -------------------------------------------------------------------- + } // END Upload Class /* End of file Upload.php */ -/* Location: ./system/libraries/Upload.php */ \ No newline at end of file +/* Location: ./system/libraries/Upload.php */ diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 88b4363e..e44e2f70 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -70,7 +70,10 @@

Version 2.1.0 (planned)

  • Helpers
  • Database From 6a12d8faba9dcb4f321700c86d047f7b6a4f1780 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 24 Sep 2011 14:35:10 +0300 Subject: [PATCH 002/106] Remove an unnecessary variable initialization --- system/libraries/Upload.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 93f763ed..04abc9ac 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -1018,8 +1018,6 @@ protected function _prep_filename($filename) */ protected function _file_mime_type($file) { - $file_type = ''; - // Use if the Fileinfo extension, if available (only versions above 5.3 support the FILEINFO_MIME_TYPE flag) if ( (float) substr(phpversion(), 0, 3) >= 5.3 && function_exists('finfo_file')) { From 7bfb95b9c329a7905a20f9ebfeacccac7ffd7e41 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 24 Sep 2011 14:45:44 +0300 Subject: [PATCH 003/106] Fix alignment with tabs instead of spaces --- system/libraries/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 04abc9ac..fd9c8b3e 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -1058,7 +1058,7 @@ protected function _file_mime_type($file) @exec('file --brief --mime-type ' . escapeshellarg($file['tmp_path']), $output, $return_code); if ($return_code === 0 && strlen($output[0]) > 0) // A return status code != 0 would mean failed execution { - $this->file_type = rtrim($output[0]); + $this->file_type = rtrim($output[0]); return; } } From f1649bf567aa769b283bb0b74ed8aee5b44a704b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 24 Sep 2011 22:59:37 +0300 Subject: [PATCH 004/106] Fix an erroneus variable name and a typo in comments --- system/libraries/Upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index fd9c8b3e..a0f3e76b 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -1028,11 +1028,11 @@ protected function _file_mime_type($file) /* According to the comments section of the PHP manual page, * it is possible that this function returns an empty string - * for some files (e.g. if they don't exist in the magic MIME database. + * for some files (e.g. if they don't exist in the magic MIME database) */ if (strlen($file_type) > 1) { - $this->file_type = $file_info; + $this->file_type = $file_type; return; } } From dcfee7103408416329c42f376d23fb3c88d4cffc Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 4 Oct 2011 18:18:21 +0300 Subject: [PATCH 005/106] CI_Upload::_file_mime_type --- user_guide/changelog.html | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide/changelog.html b/user_guide/changelog.html index e44e2f70..b4bd8bb7 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -98,6 +98,7 @@

    Bug fixes for 2.1.0

  • If a config class was loaded first then a library with the same name is loaded, the config would be ignored.
  • Fixed a bug (Reactor #19) where 1) the 404_override route was being ignored in some cases, and 2) auto-loaded libraries were not available to the 404_override controller when a controller existed but the requested method did not.
  • Fixed a bug (Reactor #89) where MySQL export would fail if the table had hyphens or other non alphanumeric/underscore characters.
  • +
  • Fixed a bug (#60) - Added _file_mime_type() method to the File Uploading Library in order to fix a possible MIME-type injection (also fixes bug #394).
  • Version 2.0.3

    From c5efd10679a7b7b4010cd6cc30bd976d3fe8c1ef Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 4 Oct 2011 18:27:32 +0300 Subject: [PATCH 006/106] Change Windows OS detection approach --- system/libraries/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index a0f3e76b..05511b5d 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -1052,7 +1052,7 @@ protected function _file_mime_type($file) * - a 'W' in the substr() expression bellow, would mean that we're using Windows * - many system admins would disable the exec() function due to security concerns, hence the function_exists() check */ - if (substr(PHP_OS, 0, 1) !== 'W' && function_exists('exec')) + if (DIRECTORY_SEPARATOR !== '\\' && function_exists('exec')) { $output = array(); @exec('file --brief --mime-type ' . escapeshellarg($file['tmp_path']), $output, $return_code); From b7263d152a3c29751e39fd74972707f62f51ca72 Mon Sep 17 00:00:00 2001 From: Mark Huot Date: Fri, 23 Sep 2011 08:20:29 -0400 Subject: [PATCH 007/106] resolve a difference between the two memcache set method parameters --- system/libraries/Cache/drivers/Cache_memcached.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php index ec2fd216..fc586e02 100644 --- a/system/libraries/Cache/drivers/Cache_memcached.php +++ b/system/libraries/Cache/drivers/Cache_memcached.php @@ -64,7 +64,16 @@ public function get($id) */ public function save($id, $data, $ttl = 60) { - return $this->_memcached->add($id, array($data, time(), $ttl), $ttl); + if (get_class($this->_memcached) == 'Memcached') + { + return $this->_memcached->set($id, array($data, time(), $ttl), $ttl); + } + else if (get_class($this->_memcached) == 'Memcache') + { + return $this->_memcached->set($id, array($data, time(), $ttl), 0, $ttl); + } + + return FALSE; } // ------------------------------------------------------------------------ From e13aa67f3e8275d672dc08f21a3992e94bbe3038 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 7 Oct 2011 14:40:15 +0800 Subject: [PATCH 008/106] Fix #537 issue: replace new wav mimetype --- application/config/mimes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/config/mimes.php b/application/config/mimes.php index 82767d7c..f00e5b6e 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -65,8 +65,8 @@ 'rpm' => 'audio/x-pn-realaudio-plugin', 'ra' => 'audio/x-realaudio', 'rv' => 'video/vnd.rn-realvideo', - 'wav' => 'audio/x-wav', - 'bmp' => 'image/bmp', + 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'), + 'bmp' => array('image/bmp', 'image/x-windows-bmp'), 'gif' => 'image/gif', 'jpeg' => array('image/jpeg', 'image/pjpeg'), 'jpg' => array('image/jpeg', 'image/pjpeg'), @@ -103,4 +103,4 @@ /* End of file mimes.php */ -/* Location: ./application/config/mimes.php */ \ No newline at end of file +/* Location: ./application/config/mimes.php */ From 08b0a1cb53f0c3b54a2bf7f8ac0f8b2cd5d8f0ff Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Wed, 26 Oct 2011 23:39:38 +0100 Subject: [PATCH 009/106] Added changelog entry for bugfix. --- user_guide/changelog.html | 135 +++++++++++++++++++------------------- 1 file changed, 68 insertions(+), 67 deletions(-) diff --git a/user_guide/changelog.html b/user_guide/changelog.html index b4bd8bb7..dc1a1f36 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -59,13 +59,13 @@

    Change Log

    The Reactor Marker indicates items that were contributed to CodeIgniter via CodeIgniter Reactor.

    -

    Version 2.1.0 (planned)

    -

    Release Date: Not Released

    +

    Version 2.1.0

    +

    Release Date: November 01, 2011

    • General Changes
        -
      • Callback validation rules can now accept parameters like any other validation rule.
      • +
      • Callback validation rules can now accept parameters like any other validation rule.
    • Helpers @@ -78,27 +78,28 @@

      Version 2.1.0 (planned)

    • Database
        -
      • Added a CUBRID driver to the Database Driver. Thanks to the CUBRID team for supplying this patch.
      • -
      • Typecast limit and offset in the Database Driver to integers to avoid possible injection.
      • +
      • Added a CUBRID driver to the Database Driver. Thanks to the CUBRID team for supplying this patch.
      • +
      • Typecast limit and offset in the Database Driver to integers to avoid possible injection.
    • Libraries
        -
      • Changed $this->cart->insert() in the Cart Library to return the Row ID if a single item was inserted successfully.
      • -
      • Added support to set an optional parameter in your callback rules of validation using the Form Validation Library.
      • -
      • Added a Migration Library to assist with applying incremental updates to your database schema.
      • -
      • Driver children can be located in any package path.
      • +
      • Changed $this->cart->insert() in the Cart Library to return the Row ID if a single item was inserted successfully.
      • +
      • Added support to set an optional parameter in your callback rules of validation using the Form Validation Library.
      • +
      • Added a Migration Library to assist with applying incremental updates to your database schema.
      • +
      • Driver children can be located in any package path.

    Bug fixes for 2.1.0

      -
    • Fixed #378 Robots identified as regular browsers by the User Agent class.
    • -
    • If a config class was loaded first then a library with the same name is loaded, the config would be ignored.
    • -
    • Fixed a bug (Reactor #19) where 1) the 404_override route was being ignored in some cases, and 2) auto-loaded libraries were not available to the 404_override controller when a controller existed but the requested method did not.
    • +
    • Fixed #378 Robots identified as regular browsers by the User Agent class.
    • +
    • If a config class was loaded first then a library with the same name is loaded, the config would be ignored.
    • +
    • Fixed a bug (Reactor #19) where 1) the 404_override route was being ignored in some cases, and 2) auto-loaded libraries were not available to the 404_override controller when a controller existed but the requested method did not.
    • Fixed a bug (Reactor #89) where MySQL export would fail if the table had hyphens or other non alphanumeric/underscore characters.
    • Fixed a bug (#60) - Added _file_mime_type() method to the File Uploading Library in order to fix a possible MIME-type injection (also fixes bug #394).
    • +
    • Fixed a bug (#537) - Support for all wav type in browser.

    Version 2.0.3

    @@ -116,43 +117,43 @@

    Version 2.0.3

  • Added Session Class userdata to the output profiler. Additionally, added a show/hide toggle on HTTP Headers, Session Data and Config Variables.
  • Removed internal usage of the EXT constant.
  • Visual updates to the welcome_message view file and default error templates. Thanks to danijelb for the pull request.
  • -
  • Added insert_batch() function to the PostgreSQL database driver. Thanks to epallerols for the patch.
  • -
  • Added "application/x-csv" to mimes.php.
  • +
  • Added insert_batch() function to the PostgreSQL database driver. Thanks to epallerols for the patch.
  • +
  • Added "application/x-csv" to mimes.php.
  • Fixed a bug where Email library attachments with a "." in the name would using invalid MIME-types.
  • Helpers
    • Added an optional third parameter to heading() which allows adding html attributes to the rendered heading tag.
    • -
    • form_open() now only adds a hidden (Cross-site Reference Forgery) protection field when the form's action is internal and is set to the post method. (Reactor #165)
    • -
    • Re-worked plural() and singular() functions in the Inflector helper to support considerably more words.
    • +
    • form_open() now only adds a hidden (Cross-site Reference Forgery) protection field when the form's action is internal and is set to the post method. (Reactor #165)
    • +
    • Re-worked plural() and singular() functions in the Inflector helper to support considerably more words.
  • Libraries
    • Altered Session to use a longer match against the user_agent string. See upgrade notes if using database sessions.
    • -
    • Added is_unique to the Form Validation library.
    • -
    • Added $this->db->set_dbprefix() to the Database Driver.
    • -
    • Changed $this->cart->insert() in the Cart Library to return the Row ID if a single item was inserted successfully.
    • -
    • Added $this->load->get_var() to the Loader library to retrieve global vars set with $this->load->view() and $this->load->vars().
    • -
    • Changed $this->db->having() to insert quotes using escape() rather than escape_str().
    • +
    • Added is_unique to the Form Validation library.
    • +
    • Added $this->db->set_dbprefix() to the Database Driver.
    • +
    • Changed $this->cart->insert() in the Cart Library to return the Row ID if a single item was inserted successfully.
    • +
    • Added $this->load->get_var() to the Loader library to retrieve global vars set with $this->load->view() and $this->load->vars().
    • +
    • Changed $this->db->having() to insert quotes using escape() rather than escape_str().
  • Bug fixes for 2.0.3

      -
    • Added ENVIRONMENT to reserved constants. (Reactor #196)
    • -
    • Changed server check to ensure SCRIPT_NAME is defined. (Reactor #57)
    • -
    • Removed APPPATH.'third_party' from the packages autoloader to negate needless file stats if no packages exist or if the developer does not load any other packages by default.
    • +
    • Added ENVIRONMENT to reserved constants. (Reactor #196)
    • +
    • Changed server check to ensure SCRIPT_NAME is defined. (Reactor #57)
    • +
    • Removed APPPATH.'third_party' from the packages autoloader to negate needless file stats if no packages exist or if the developer does not load any other packages by default.
    • Fixed a bug (Reactor #231) where Sessions Library database table example SQL did not contain an index on last_activity. See Upgrade Notes.
    • Fixed a bug (Reactor #229) where the Sessions Library example SQL in the documentation contained incorrect SQL.
    • Fixed a bug (Core #340) where when passing in the second parameter to $this->db->select(), column names in subsequent queries would not be properly escaped.
    • -
    • Fixed issue #199 - Attributes passed as string does not include a space between it and the opening tag.
    • -
    • Fixed a bug where the method $this->cart->total_items() from Cart Library now returns the sum of the quantity of all items in the cart instead of your total count.
    • -
    • Fixed a bug where not setting 'null' when adding fields in db_forge for mysql and mysqli drivers would default to NULL instead of NOT NULL as the docs suggest.
    • -
    • Fixed a bug where using $this->db->select_max(), $this->db->select_min(), etc could throw notices. Thanks to w43l for the patch.
    • -
    • Replace checks for STDIN with php_sapi_name() == 'cli' which on the whole is more reliable. This should get parameters in crontab working.
    • +
    • Fixed issue #199 - Attributes passed as string does not include a space between it and the opening tag.
    • +
    • Fixed a bug where the method $this->cart->total_items() from Cart Library now returns the sum of the quantity of all items in the cart instead of your total count.
    • +
    • Fixed a bug where not setting 'null' when adding fields in db_forge for mysql and mysqli drivers would default to NULL instead of NOT NULL as the docs suggest.
    • +
    • Fixed a bug where using $this->db->select_max(), $this->db->select_min(), etc could throw notices. Thanks to w43l for the patch.
    • +
    • Replace checks for STDIN with php_sapi_name() == 'cli' which on the whole is more reliable. This should get parameters in crontab working.

    Version 2.0.2

    @@ -164,36 +165,36 @@

    Version 2.0.2

    • The Security library was moved to the core and is now loaded automatically. Please remove your loading calls.
    • The CI_SHA class is now deprecated. All supported versions of PHP provide a sha1() function.
    • -
    • constants.php will now be loaded from the environment folder if available.
    • -
    • Added language key error logging
    • -
    • Made Environment Support optional. Comment out or delete the constant to stop environment checks.
    • -
    • Added Environment Support for Hooks.
    • -
    • Added CI_ Prefix to the Cache driver.
    • -
    • Added CLI usage documentation.
    • +
    • constants.php will now be loaded from the environment folder if available.
    • +
    • Added language key error logging
    • +
    • Made Environment Support optional. Comment out or delete the constant to stop environment checks.
    • +
    • Added Environment Support for Hooks.
    • +
    • Added CI_ Prefix to the Cache driver.
    • +
    • Added CLI usage documentation.
  • Helpers
    • Removed the previously deprecated dohash() from the Security helper; use do_hash() instead.
    • -
    • Changed the 'plural' function so that it doesn't ruin the captalization of your string. It also take into consideration acronyms which are all caps.
    • +
    • Changed the 'plural' function so that it doesn't ruin the captalization of your string. It also take into consideration acronyms which are all caps.
  • Database
      -
    • $this->db->count_all_results() will now return an integer instead of a string.
    • +
    • $this->db->count_all_results() will now return an integer instead of a string.
  • Bug fixes for 2.0.2

      -
    • Fixed a bug (Reactor #145) where the Output Library had parse_exec_vars set to protected.
    • -
    • Fixed a bug (Reactor #80) where is_really_writable would create an empty file when on Windows or with safe_mode enabled.
    • -
    • Fixed various bugs with User Guide.
    • -
    • Added is_cli_request() method to documentation for Input class.
    • -
    • Added form_validation_lang entries for decimal, less_than and greater_than.
    • -
    • Fixed issue #153 Escape Str Bug in MSSQL driver.
    • -
    • Fixed issue #172 Google Chrome 11 posts incorrectly when action is empty.
    • +
    • Fixed a bug (Reactor #145) where the Output Library had parse_exec_vars set to protected.
    • +
    • Fixed a bug (Reactor #80) where is_really_writable would create an empty file when on Windows or with safe_mode enabled.
    • +
    • Fixed various bugs with User Guide.
    • +
    • Added is_cli_request() method to documentation for Input class.
    • +
    • Added form_validation_lang entries for decimal, less_than and greater_than.
    • +
    • Fixed issue #153 Escape Str Bug in MSSQL driver.
    • +
    • Fixed issue #172 Google Chrome 11 posts incorrectly when action is empty.
    @@ -205,34 +206,34 @@

    Version 2.0.1

  • General changes
    • Added $config['cookie_secure'] to the config file to allow requiring a secure (HTTPS) in order to set cookies.
    • -
    • Added the constant CI_CORE to help differentiate between Core: TRUE and Reactor: FALSE.
    • -
    • Added an ENVIRONMENT constant in index.php, which affects PHP error reporting settings, and optionally, +
    • Added the constant CI_CORE to help differentiate between Core: TRUE and Reactor: FALSE.
    • +
    • Added an ENVIRONMENT constant in index.php, which affects PHP error reporting settings, and optionally, which configuration files are loaded (see below). Read more on the Handling Environments page.
    • -
    • Added support for environment-specific configuration files.
    • +
    • Added support for environment-specific configuration files.
  • Libraries
      -
    • Added decimal, less_than and greater_than rules to the Form validation Class.
    • -
    • Input Class methods post() and get() will now return a full array if the first argument is not provided.
    • -
    • Secure cookies can now be made with the set_cookie() helper and Input Class method.
    • -
    • Added set_content_type() to Output Class to set the output Content-Type HTTP header based on a MIME Type or a config/mimes.php array key.
    • -
    • Output Class will now support method chaining.
    • +
    • Added decimal, less_than and greater_than rules to the Form validation Class.
    • +
    • Input Class methods post() and get() will now return a full array if the first argument is not provided.
    • +
    • Secure cookies can now be made with the set_cookie() helper and Input Class method.
    • +
    • Added set_content_type() to Output Class to set the output Content-Type HTTP header based on a MIME Type or a config/mimes.php array key.
    • +
    • Output Class will now support method chaining.
  • Helpers
      -
    • Changed the logic for form_open() in Form helper. If no value is passed it will submit to the current URL.
    • +
    • Changed the logic for form_open() in Form helper. If no value is passed it will submit to the current URL.
  • Bug fixes for 2.0.1

      -
    • CLI requests can now be run from any folder, not just when CD'ed next to index.php.
    • -
    • Fixed issue #41: Added audio/mp3 mime type to mp3.
    • -
    • Fixed a bug (Core #329) where the file caching driver referenced the incorrect cache directory.
    • -
    • Fixed a bug (Reactor #69) where the SHA1 library was named incorrectly.
    • +
    • CLI requests can now be run from any folder, not just when CD'ed next to index.php.
    • +
    • Fixed issue #41: Added audio/mp3 mime type to mp3.
    • +
    • Fixed a bug (Core #329) where the file caching driver referenced the incorrect cache directory.
    • +
    • Fixed a bug (Reactor #69) where the SHA1 library was named incorrectly.

    Version 2.0.0

    @@ -246,7 +247,7 @@

    Version 2.0.0

  • Scaffolding, having been deprecated for a number of versions, has been removed.
  • Plugins have been removed, in favor of Helpers. The CAPTCHA plugin has been converted to a Helper and documented. The JavaScript calendar plugin was removed due to the ready availability of great JavaScript calendars, particularly with jQuery.
  • Added new special Library type: Drivers.
  • -
  • Added full query-string support. See the config file for details.
  • +
  • Added full query-string support. See the config file for details.
  • Moved the application folder outside of the system folder.
  • Moved system/cache and system/logs directories to the application directory.
  • Added routing overrides to the main index.php file, enabling the normal routing to be overridden on a per "index" file basis.
  • @@ -256,15 +257,15 @@

    Version 2.0.0

  • In-development code is now hosted at BitBucket.
  • Removed the deprecated Validation Class.
  • Added CI_ Prefix to all core classes.
  • -
  • Package paths can now be set in application/config/autoload.php.
  • -
  • Upload library file_name can now be set without an extension, the extension will be taken from the uploaded file instead of the given name.
  • -
  • In Database Forge the name can be omitted from $this->dbforge->modify_column()'s 2nd param if you aren't changing the name.
  • -
  • $config['base_url'] is now empty by default and will guess what it should be.
  • -
  • Enabled full Command Line Interface compatibility with config['uri_protocol'] = 'CLI';.
  • +
  • Package paths can now be set in application/config/autoload.php.
  • +
  • Upload library file_name can now be set without an extension, the extension will be taken from the uploaded file instead of the given name.
  • +
  • In Database Forge the name can be omitted from $this->dbforge->modify_column()'s 2nd param if you aren't changing the name.
  • +
  • $config['base_url'] is now empty by default and will guess what it should be.
  • +
  • Enabled full Command Line Interface compatibility with config['uri_protocol'] = 'CLI';.
  • Libraries
      -
    • Added a Cache driver with APC, memcached, and file-based support.
    • +
    • Added a Cache driver with APC, memcached, and file-based support.
    • Added $prefix, $suffix and $first_url properties to Pagination library.
    • Added the ability to suppress first, previous, next, last, and page links by setting their values to FALSE in the Pagination library.
    • Added Security library, which now contains the xss_clean function, filename_security function and other security related functions.
    • @@ -295,8 +296,8 @@

      Version 2.0.0

    • Altered Form_Validation library to allow for method chaining on set_rules(), set_message() and set_error_delimiters() functions.
    • Altered Email Library to allow for method chaining.
    • Added request_headers(), get_request_header() and is_ajax_request() to the input class.
    • -
    • Altered User agent library so that is_browser(), is_mobile() and is_robot() can optionally check for a specific browser or mobile device.
    • -
    • Altered Input library so that post() and get() will return all POST and GET items (respectively) if there are no parameters passed in.
    • +
    • Altered User agent library so that is_browser(), is_mobile() and is_robot() can optionally check for a specific browser or mobile device.
    • +
    • Altered Input library so that post() and get() will return all POST and GET items (respectively) if there are no parameters passed in.
  • Database @@ -358,7 +359,7 @@

    Version 2.0.0

    Bug fixes for 2.0.0

      -
    • Fixed a bug where you could not change the User-Agent when sending email.
    • +
    • Fixed a bug where you could not change the User-Agent when sending email.
    • Fixed a bug where the Output class would send incorrect cached output for controllers implementing their own _output() method.
    • Fixed a bug where a failed query would not have a saved query execution time causing errors in the Profiler
    • Fixed a bug that was writing log entries when multiple identical helpers and plugins were loaded.
    • From 24f325c079d33a456f15311442ed21b437df1ea7 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 7 Oct 2011 10:03:01 -0400 Subject: [PATCH 010/106] if statment code style update --- system/database/drivers/pdo/pdo_driver.php | 792 +++++++++++++++++++++ 1 file changed, 792 insertions(+) create mode 100644 system/database/drivers/pdo/pdo_driver.php diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php new file mode 100644 index 00000000..19e069b0 --- /dev/null +++ b/system/database/drivers/pdo/pdo_driver.php @@ -0,0 +1,792 @@ +hostname, 'mysql') !== FALSE) + { + $this->_like_escape_str = ''; + $this->_like_escape_chr = ''; + } + else if (strpos($this->hostname, 'odbc') !== FALSE) + { + $this->_like_escape_str = " {escape '%s'} "; + $this->_like_escape_chr = '!'; + } + else + { + $this->_like_escape_str = " ESCAPE '%s' "; + $this->_like_escape_chr = '!'; + } + + $this->hostname = $this->hostname . ";dbname=".$this->database; + $this->trans_enabled = FALSE; + + $this->_random_keyword = ' RND('.time().')'; // database specific random keyword + } + + /** + * Non-persistent database connection + * + * @access private called by the base class + * @return resource + */ + function db_connect() + { + return new PDO($this->hostname,$this->username,$this->password, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT + )); + } + + // -------------------------------------------------------------------- + + /** + * Persistent database connection + * + * @access private called by the base class + * @return resource + */ + function db_pconnect() + { + return new PDO($this->hostname,$this->username,$this->password, array( + PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT, + PDO::ATTR_PERSISTENT => true + )); + } + + // -------------------------------------------------------------------- + + /** + * Reconnect + * + * Keep / reestablish the db connection if no queries have been + * sent for a length of time exceeding the server's idle timeout + * + * @access public + * @return void + */ + function reconnect() + { + if ($this->db->db_debug) + { + return $this->db->display_error('db_unsuported_feature'); + } + return FALSE; + } + + // -------------------------------------------------------------------- + + /** + * Select the database + * + * @access private called by the base class + * @return resource + */ + function db_select() + { + // Not needed for PDO + return TRUE; + } + + // -------------------------------------------------------------------- + + /** + * Set client character set + * + * @access public + * @param string + * @param string + * @return resource + */ + function db_set_charset($charset, $collation) + { + // @todo - add support if needed + return TRUE; + } + + // -------------------------------------------------------------------- + + /** + * Version number query string + * + * @access public + * @return string + */ + function _version() + { + return $this->conn_id->getAttribute(PDO::ATTR_CLIENT_VERSION); + } + + // -------------------------------------------------------------------- + + /** + * Execute the query + * + * @access private called by the base class + * @param string an SQL query + * @return object + */ + function _execute($sql) + { + $sql = $this->_prep_query($sql); + $result_id = $this->conn_id->query($sql); + + if (is_object($result_id)) + { + $this->affect_rows = $result_id->rowCount(); + } + else + { + $this->affect_rows = 0; + } + + return $result_id; + } + + // -------------------------------------------------------------------- + + /** + * Prep the query + * + * If needed, each database adapter can prep the query string + * + * @access private called by execute() + * @param string an SQL query + * @return string + */ + function _prep_query($sql) + { + return $sql; + } + + // -------------------------------------------------------------------- + + /** + * Begin Transaction + * + * @access public + * @return bool + */ + function trans_begin($test_mode = FALSE) + { + if ( ! $this->trans_enabled) + { + return TRUE; + } + + // When transactions are nested we only begin/commit/rollback the outermost ones + if ($this->_trans_depth > 0) + { + return TRUE; + } + + // Reset the transaction failure flag. + // If the $test_mode flag is set to TRUE transactions will be rolled back + // even if the queries produce a successful result. + $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; + + return $this->conn_id->beginTransaction(); + } + + // -------------------------------------------------------------------- + + /** + * Commit Transaction + * + * @access public + * @return bool + */ + function trans_commit() + { + if ( ! $this->trans_enabled) + { + return TRUE; + } + + // When transactions are nested we only begin/commit/rollback the outermost ones + if ($this->_trans_depth > 0) + { + return TRUE; + } + + $ret = $this->conn->commit(); + return $ret; + } + + // -------------------------------------------------------------------- + + /** + * Rollback Transaction + * + * @access public + * @return bool + */ + function trans_rollback() + { + if ( ! $this->trans_enabled) + { + return TRUE; + } + + // When transactions are nested we only begin/commit/rollback the outermost ones + if ($this->_trans_depth > 0) + { + return TRUE; + } + + $ret = $this->conn_id->rollBack(); + return $ret; + } + + // -------------------------------------------------------------------- + + /** + * Escape String + * + * @access public + * @param string + * @param bool whether or not the string will be used in a LIKE condition + * @return string + */ + function escape_str($str, $like = FALSE) + { + if (is_array($str)) + { + foreach ($str as $key => $val) + { + $str[$key] = $this->escape_str($val, $like); + } + + return $str; + } + + //Escape the string + $str = $this->conn_id->quote($str); + + //If there are duplicated quotes, trim them away + if (strpos($str, "'") === 0) + { + $str = substr($str, 1, -1); + } + + // 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); + } + + return $str; + } + + // -------------------------------------------------------------------- + + /** + * Affected Rows + * + * @access public + * @return integer + */ + function affected_rows() + { + return $this->affect_rows; + } + + // -------------------------------------------------------------------- + + /** + * Insert ID + * + * @access public + * @return integer + */ + function insert_id($name=NULL) + { + //Convenience method for postgres insertid + if (strpos($this->hostname, 'pgsql') !== FALSE) + { + $v = $this->_version(); + + $table = func_num_args() > 0 ? func_get_arg(0) : NULL; + + if ($table == NULL && $v >= '8.1') + { + $sql='SELECT LASTVAL() as ins_id'; + } + $query = $this->query($sql); + $row = $query->row(); + return $row->ins_id; + } + else + { + return $this->conn_id->lastInsertId($name); + } + } + + // -------------------------------------------------------------------- + + /** + * "Count All" query + * + * Generates a platform-specific query string that counts all records in + * the specified database + * + * @access public + * @param string + * @return string + */ + function count_all($table = '') + { + if ($table == '') + { + return 0; + } + + $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); + + if ($query->num_rows() == 0) + { + return 0; + } + + $row = $query->row(); + $this->_reset_select(); + return (int) $row->numrows; + } + + // -------------------------------------------------------------------- + + /** + * Show table query + * + * Generates a platform-specific query string so that the table names can be fetched + * + * @access private + * @param boolean + * @return string + */ + function _list_tables($prefix_limit = FALSE) + { + $sql = "SHOW TABLES FROM `".$this->database."`"; + + if ($prefix_limit !== FALSE AND $this->dbprefix != '') + { + //$sql .= " LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); + return FALSE; // not currently supported + } + + return $sql; + } + + // -------------------------------------------------------------------- + + /** + * Show column query + * + * Generates a platform-specific query string so that the column names can be fetched + * + * @access public + * @param string the table name + * @return string + */ + function _list_columns($table = '') + { + return "SHOW COLUMNS FROM ".$table; + } + + // -------------------------------------------------------------------- + + /** + * Field data query + * + * Generates a platform-specific query so that the column data can be retrieved + * + * @access public + * @param string the table name + * @return object + */ + function _field_data($table) + { + return "SELECT TOP 1 FROM ".$table; + } + + // -------------------------------------------------------------------- + + /** + * The error message string + * + * @access private + * @return string + */ + function _error_message() + { + $error_array = $this->conn_id->errorInfo(); + return $error_array[2]; + } + + // -------------------------------------------------------------------- + + /** + * The error message number + * + * @access private + * @return integer + */ + function _error_number() + { + return $this->conn_id->errorCode(); + } + + // -------------------------------------------------------------------- + + /** + * Escape the SQL Identifiers + * + * This function escapes column and table names + * + * @access private + * @param string + * @return string + */ + function _escape_identifiers($item) + { + if ($this->_escape_char == '') + { + return $item; + } + + foreach ($this->_reserved_identifiers as $id) + { + if (strpos($item, '.'.$id) !== FALSE) + { + $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); + + // remove duplicates if the user already included the escape + return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); + } + } + + if (strpos($item, '.') !== FALSE) + { + $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; + + } + else + { + $str = $this->_escape_char.$item.$this->_escape_char; + } + + // remove duplicates if the user already included the escape + return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); + } + + // -------------------------------------------------------------------- + + /** + * From Tables + * + * This function implicitly groups FROM tables so there is no confusion + * about operator precedence in harmony with SQL standards + * + * @access public + * @param type + * @return type + */ + function _from_tables($tables) + { + if ( ! is_array($tables)) + { + $tables = array($tables); + } + + return (count($tables) == 1) ? $tables[0] : '('.implode(', ', $tables).')'; + } + + // -------------------------------------------------------------------- + + /** + * Insert statement + * + * Generates a platform-specific insert string from the supplied data + * + * @access public + * @param string the table name + * @param array the insert keys + * @param array the insert values + * @return string + */ + function _insert($table, $keys, $values) + { + return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; + } + + // -------------------------------------------------------------------- + + /** + * Insert_batch statement + * + * Generates a platform-specific insert string from the supplied data + * + * @access public + * @param string the table name + * @param array the insert keys + * @param array the insert values + * @return string + */ + function _insert_batch($table, $keys, $values) + { + return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values); + } + + // -------------------------------------------------------------------- + + /** + * Update statement + * + * Generates a platform-specific update string from the supplied data + * + * @access public + * @param string the table name + * @param array the update data + * @param array the where clause + * @param array the orderby clause + * @param array the limit clause + * @return string + */ + function _update($table, $values, $where, $orderby = array(), $limit = FALSE) + { + foreach ($values as $key => $val) + { + $valstr[] = $key." = ".$val; + } + + $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; + + $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; + + $sql = "UPDATE ".$table." SET ".implode(', ', $valstr); + + $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : ''; + + $sql .= $orderby.$limit; + + return $sql; + } + + // -------------------------------------------------------------------- + + /** + * Update_Batch statement + * + * Generates a platform-specific batch update string from the supplied data + * + * @access public + * @param string the table name + * @param array the update data + * @param array the where clause + * @return string + */ + function _update_batch($table, $values, $index, $where = NULL) + { + $ids = array(); + $where = ($where != '' AND count($where) >=1) ? implode(" ", $where).' AND ' : ''; + + foreach ($values as $key => $val) + { + $ids[] = $val[$index]; + + foreach (array_keys($val) as $field) + { + if ($field != $index) + { + $final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field]; + } + } + } + + $sql = "UPDATE ".$table." SET "; + $cases = ''; + + foreach ($final as $k => $v) + { + $cases .= $k.' = CASE '."\n"; + foreach ($v as $row) + { + $cases .= $row."\n"; + } + + $cases .= 'ELSE '.$k.' END, '; + } + + $sql .= substr($cases, 0, -2); + + $sql .= ' WHERE '.$where.$index.' IN ('.implode(',', $ids).')'; + + return $sql; + } + + + // -------------------------------------------------------------------- + + /** + * Truncate statement + * + * Generates a platform-specific truncate string from the supplied data + * If the database does not support the truncate() command + * This function maps to "DELETE FROM table" + * + * @access public + * @param string the table name + * @return string + */ + function _truncate($table) + { + return $this->_delete($table); + } + + // -------------------------------------------------------------------- + + /** + * Delete statement + * + * Generates a platform-specific delete string from the supplied data + * + * @access public + * @param string the table name + * @param array the where clause + * @param string the limit clause + * @return string + */ + function _delete($table, $where = array(), $like = array(), $limit = FALSE) + { + $conditions = ''; + + if (count($where) > 0 OR count($like) > 0) + { + $conditions = "\nWHERE "; + $conditions .= implode("\n", $this->ar_where); + + if (count($where) > 0 && count($like) > 0) + { + $conditions .= " AND "; + } + $conditions .= implode("\n", $like); + } + + $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; + + return "DELETE FROM ".$table.$conditions.$limit; + } + + // -------------------------------------------------------------------- + + /** + * Limit string + * + * Generates a platform-specific LIMIT clause + * + * @access public + * @param string the sql query string + * @param integer the number of rows to limit the query to + * @param integer the offset value + * @return string + */ + function _limit($sql, $limit, $offset) + { + if (strpos($this->hostname, 'cubrid') !== FALSE || strpos($this->hostname, 'sqlite') !== FALSE) + { + if ($offset == 0) + { + $offset = ''; + } + else + { + $offset .= ", "; + } + + return $sql."LIMIT ".$offset.$limit; + } + else + { + $sql .= "LIMIT ".$limit; + + if ($offset > 0) + { + $sql .= " OFFSET ".$offset; + } + + return $sql; + } + } + + // -------------------------------------------------------------------- + + /** + * Close DB Connection + * + * @access public + * @param resource + * @return void + */ + function _close($conn_id) + { + $this->conn_id = null; + } + + +} + + + +/* End of file pdo_driver.php */ +/* Location: ./system/database/drivers/pdo/pdo_driver.php */ \ No newline at end of file From 6f531dc364553975a8ea4dce85927a09f6628902 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 10 Oct 2011 10:10:46 -0400 Subject: [PATCH 011/106] Converted database constructors to PHP5 type --- system/database/DB_cache.php | 2 +- system/database/DB_driver.php | 4 ++-- system/database/DB_forge.php | 2 +- system/database/DB_utility.php | 2 +- system/database/drivers/odbc/odbc_driver.php | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index 3bf065ca..ad1c28d7 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -33,7 +33,7 @@ class CI_DB_Cache { * Grabs the CI super object instance so we can access it. * */ - function CI_DB_Cache(&$db) + function __construct(&$db) { // Assign the main CI object to $this->CI // and load the file helper since we use it a lot diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index f3e824da..3680b85c 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -78,7 +78,7 @@ class CI_DB_driver { * * @param array */ - function CI_DB_driver($params) + function __construct($params) { if (is_array($params)) { @@ -1387,4 +1387,4 @@ function _protect_identifiers($item, $prefix_single = FALSE, $protect_identifier /* End of file DB_driver.php */ -/* Location: ./system/database/DB_driver.php */ \ No newline at end of file +/* Location: ./system/database/DB_driver.php */ diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 0dd29c23..6bc40411 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -35,7 +35,7 @@ class CI_DB_forge { * Grabs the CI super object instance so we can access it. * */ - function CI_DB_forge() + function __construct() { // Assign the main database object to $this->db $CI =& get_instance(); diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index a5f174f0..52196b7c 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -33,7 +33,7 @@ class CI_DB_utility extends CI_DB_forge { * Grabs the CI super object instance so we can access it. * */ - function CI_DB_utility() + function __construct() { // Assign the main database object to $this->db $CI =& get_instance(); diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 81e0d7cf..6e4ba896 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -48,9 +48,9 @@ class CI_DB_odbc_driver extends CI_DB { var $_random_keyword; - function CI_DB_odbc_driver($params) + function __construct($params) { - parent::CI_DB($params); + parent::__construct($params); $this->_random_keyword = ' RND('.time().')'; // database specific random keyword } From f27bcf350d18048d91d8a607520d19f0c8e11f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Cox?= Date: Mon, 22 Aug 2011 22:29:06 +0200 Subject: [PATCH 012/106] Cleanly applied patch of the user guide tutorial by Kenny and me. --- user_guide/nav/nav.js | 11 +- user_guide/toc.html | 8 + user_guide/tutorial/conclusion.html | 91 ++++++++ user_guide/tutorial/create_news_items.html | 181 +++++++++++++++ user_guide/tutorial/hard_coded_pages.html | 159 ++++++++++++++ user_guide/tutorial/introduction.html | 92 ++++++++ user_guide/tutorial/news_section.html | 242 +++++++++++++++++++++ user_guide/tutorial/static_pages.html | 206 ++++++++++++++++++ 8 files changed, 989 insertions(+), 1 deletion(-) create mode 100644 user_guide/tutorial/conclusion.html create mode 100644 user_guide/tutorial/create_news_items.html create mode 100644 user_guide/tutorial/hard_coded_pages.html create mode 100644 user_guide/tutorial/introduction.html create mode 100644 user_guide/tutorial/news_section.html create mode 100644 user_guide/tutorial/static_pages.html diff --git a/user_guide/nav/nav.js b/user_guide/nav/nav.js index b44994d4..b57851a6 100644 --- a/user_guide/nav/nav.js +++ b/user_guide/nav/nav.js @@ -37,7 +37,16 @@ function create_menu(basepath) '
    • Model-View-Controller
    • ' + '
    • Architectural Goals
    • ' + '
    ' + - + + '

    Tutorial

    ' + + '' + + '' + '

    General Topics

    ' + diff --git a/user_guide/toc.html b/user_guide/toc.html index 03311487..aedea446 100644 --- a/user_guide/toc.html +++ b/user_guide/toc.html @@ -89,6 +89,14 @@

    Introduction

  • Architectural Goals
  • +

    Tutorial

    + diff --git a/user_guide/tutorial/conclusion.html b/user_guide/tutorial/conclusion.html new file mode 100644 index 00000000..f0a22956 --- /dev/null +++ b/user_guide/tutorial/conclusion.html @@ -0,0 +1,91 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +

    CodeIgniter User Guide Version 2.0.2

    +
    + + + + + + + + + +
    + + +
    + + + +
    + + +

    Tutorial - Conclusion

    + +

    This tutorial did not cover all of the things you might expect of a full-fledged content management system, but it introduced you to the more important topics of routing, writing controllers, and models. We hope this tutorial gave you an insight into some of CodeIgniter's basic design patterns, which you can expand upon.

    + +

    Now that you've completed this tutorial, we recommend you check out the rest of the documentation. CodeIgniter is often praised because of its comprehensive documentation. Use this to your advantage and read the "Introduction" and "General Topics" sections thoroughly. You should read the class and helper references when needed.

    + +

    Every intermediate PHP programmer should be able to get the hang of CodeIgniter within a few days.

    + +

    If you still have questions about the framework or your own CodeIgniter code, you can:

    + + +
    + + + + + + + \ No newline at end of file diff --git a/user_guide/tutorial/create_news_items.html b/user_guide/tutorial/create_news_items.html new file mode 100644 index 00000000..66cfc6fd --- /dev/null +++ b/user_guide/tutorial/create_news_items.html @@ -0,0 +1,181 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +

    CodeIgniter User Guide Version 2.0.2

    +
    + + + + + + + + + +
    + + +
    + + + +
    + + +

    Tutorial - Create news items

    + +

    You now know how you can read data from a database using CodeIgnite, but you haven't written any information to the database yet. In this section you'll expand your news controller and model created earlier to include this functionality.

    + +

    Create a form

    + +

    To input data into the database you need to create a form where you can input the information to be stored. This means you'll be needing a form with two fields, one for the title and one for the text. You'll derive the slug from our title in the model. Create the new view at application/views/news/create.php.

    + + + +

    There are only two things here that probably look unfamiliar to you: the form_open() function and the validation_errors() function.

    + +

    The first function is provided by the form helper and renders the form element and adds extra functionality, like adding a hidden CSFR prevention field. The latter is used to report errors related to from validation.

    + +

    Go back to your news controller. You're going to do two things here, check whether the form was submitted and whether the submitted data passed the validation rules. You'll use the form validation library to do this.

    + +
    +function create()
    +{
    +	$this->load->helper('form');
    +	$this->load->library('form_validation');
    +	
    +	$data['title'] = 'Create a news item';
    +	
    +	$this->form_validation->set_rules('title', 'Title', 'required');
    +	$this->form_validation->set_rules('text', 'text', 'required');
    +	
    +	if ($this->form_validation->run() === FALSE)
    +	{
    +		$this->load->view('templates/header', $data);	
    +		$this->load->view('news/create');
    +		$this->load->view('templates/footer');
    +		
    +	}
    +	else
    +	{
    +		$this->news_model->set_news();
    +		$this->load->view('news/success');
    +	}
    +	
    +}
    +
    + +

    The code above adds a lot of functionality. The first few lines load the form helper and the form validation library. After that, rules for the form validation are set. The set_rules() method takes three arguments; the name of the input field, the name to be used in error messages, and the rule. In this case the title and text fields are required.

    + +

    CodeIgniter has a powerful form validation library as demonstrated above. You can read more about this library here.

    + +

    Continuing down, you can see a condition that checks whether the form validation ran successfully. If it did not, the form is displayed, if it was submitted and passed all the rules, the model is called. After this, a view is loaded to display a success message. Create a view at application/view/news/success.php and write a success message.

    + +

    Model

    + +

    The only thing that remains is writing a method that writes the data to the database. You'll use the Active Record class to insert the information and use the input library to get the posted data. Open up the model created earlier and add the following:

    + +
    +function set_news()
    +{
    +	$this->load->helper('url');
    +	
    +	$slug = url_title($this->input->post('title'), 'dash', TRUE);
    +	
    +	$data = array(
    +		'title' => $this->input->post('title'),
    +		'slug' => $slug,
    +		'text' => $this->input->post('text')
    +	);
    +	
    +	return $this->db->insert('news', $data);
    +	
    +}
    +
    + +

    This new method takes care of inserting the news item into the database. The third line contains a new function, url_title(). This function - provided by the URL helper - strips down the string you pass it, replacing all spaces by dashes (-) and makes sure everything is in lowercase characters. This leaves you with a nice slug, perfect for creating URIs.

    + +

    Let's continue with preparing the record that is going to be inserted later, inside the $data array. Each element corresponds with a column in the database table created earlier. You might notice a new method here, namely the post() method from the input library. This method makes sure the data is sanitized, protecting you from nasty attacks from others. The input library is loaded by default. At last, you insert our $data array into our database.

    + +

    Routing

    + +

    Before you can start adding news items into your CodeIgniter application you have to add an extra rule to config/routes.php file. Make sure your file contains the following. This makes sure CodeIgniter sees 'update' as a method instead of a news item's slug.

    + +
    +$route['news/create'] = 'news/create';
    +$route['news/(:any)'] = 'news/view/$1';
    +$route['news'] = 'news';
    +$route['(:any)'] = 'pages/view/$1';
    +$route['default_controller'] = 'pages/view';
    +
    + +

    Now point your browser to your local development environment where you installed CodeIgniter and add index.php/news/create to the URL. Congratulations, you just created your first CodeIgniter application! Add some news and check out the different pages you made.

    + +
    + + + + + + + \ No newline at end of file diff --git a/user_guide/tutorial/hard_coded_pages.html b/user_guide/tutorial/hard_coded_pages.html new file mode 100644 index 00000000..6201ed08 --- /dev/null +++ b/user_guide/tutorial/hard_coded_pages.html @@ -0,0 +1,159 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +

    CodeIgniter User Guide Version 2.0.2

    +
    + + + + + + + + + +
    + + +
    + + + +
    + + +

    Tutorial - Hard coded pages

    + +

    The first thing we're going to do is setting up a controller to handle our hard coded pages. A controller is a class with a collection of methods that represent the different actions you can perform on a certain object. In our case, we want to be able to view a page.

    + +

    Note: This tutorial assumes you've downloaded CodeIgniter and installed the framework in your development environment.

    + +

    Create a file at application/controllers/pages.php with the following code.

    + + + +

    If you're familiar with PHP classes you see that we create a Pages class with a view method that accepts one parameter, $page. Another interesting observation is that the Pages class is extending the CI_Controller class. This means that the new Pages class can access the methods and variables defined in the CI_Controller class. When you look at this class in system/core/controller.php you can see this class is doing something really important; assigning an instance from the CodeIgniter super object to the $this object. In most of your code, $this is the object you will use to interact with the framework.

    + +

    Now we've created our first method, it is time to do some basic templating. For this tutorial, we will be creating two views to acts as our footer and header. Let's create our header at application/views/templates/header.php and ad the following code.

    + + + +

    Our header doesn't do anything exciting. It contains the basic HTML code that we will want to display before loading the main view. You can also see that we echo the $title variable, which we didn't define. We will set this variable in the Pages controller a bit later. Let's go ahead and create a footer at application/views/templates/footer.php that includes the following code.

    + + + +

    Adding logic to the controller

    + +

    Now we've set up the basics so we can finally do some real programming. Earlier we set up our controller with a view method. Because we don't want to write a separate method for every page, we made the view method accept one parameter, the name of the page. These hard coded pages will be located in application/views/pages/. Create two files in this directory named home.php and about.php and put in some HTML content.

    + +

    In order to load these pages we'll have to check whether these page actually exists. When the page does exist, we load the view for that pages, including the header and footer and display it to the user. If it doesn't, we show a "404 Page not found" error.

    + + + +

    The first thing we do is checking whether the page we're looking for does actually exist. We use PHP's native file_exists() to do this check and pass the path where the file is supposed to be. Next is the function show_404(), a CodeIgniter function that renders the default error page and sets the appropriate HTTP headers.

    + +

    In the header template you saw we were using the $title variable to customize our page title. This is where we define the title, but instead of assigning the value to a variable, we assign it to the title element in the $data array. The last thing we need to do is loading the views in the order we want them to be displayed. We also pass the $data array to the header view to make its elements available in the header view file.

    + +

    Routing

    + +

    Actually, our controller is already functioning. Point your browser to index.php/pages/view to see your homepage. When you visit index.php/pages/view/about you will see the about page, again including your header and footer. Now we're going to get rid of the pages/view part in our URI. As you may have seen, CodeIgniter does its routing by the class, method and parameter, separated by slashes.

    + +

    Open the routing file located at application/config/routes.php and add the following two lines. Remove all other code that sets any element in the $route array.

    + + + +

    CodeIgniter reads its routing rules from top to bottom and routes the request to the first matching rule. These routes are stored in the $route array where the keys represent the incoming request and the value the path to the method, as described above.

    + +

    The first rule in our $routes array matches every request - using the wildcard operator (:any) - and passes the value to the view method of the pages class we created earlier. The default controller route makes sure every request to the root goes to the view method as well, which has the first parameter set to 'home' by default.

    + +
    + + + + + + + \ No newline at end of file diff --git a/user_guide/tutorial/introduction.html b/user_guide/tutorial/introduction.html new file mode 100644 index 00000000..cb91f485 --- /dev/null +++ b/user_guide/tutorial/introduction.html @@ -0,0 +1,92 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +

    CodeIgniter User Guide Version 2.0.2

    +
    + + + + + + + + + +
    + + +
    + + + +
    + + +

    Tutorial − Introduction

    + +

    This tutorial is intended to introduce you to the CodeIgniter framework and the basic principles of MVC architecture. + It will show you how a basic CodeIgniter application is constructed in step-by-step fashion. +

    + +

    In this tutorial, you will be creating a basic news application. You will begin by writing the code that can load static pages. Next, you will create a news section that reads news items from a database. Finally, you'll add a form to create news items in the database.

    + +

    This tutorial will primarily focus on:

    +
      +
    • Model-View-Controller basics
    • +
    • Routing basics
    • +
    • Form validation
    • +
    • Performing basic database queries using "Active Record"
    • +
    + +
    + + + + + + + \ No newline at end of file diff --git a/user_guide/tutorial/news_section.html b/user_guide/tutorial/news_section.html new file mode 100644 index 00000000..d0f64e0c --- /dev/null +++ b/user_guide/tutorial/news_section.html @@ -0,0 +1,242 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +

    CodeIgniter User Guide Version 2.0.2

    +
    + + + + + + + + + +
    + + +
    + + + +
    + + +

    Tutorial − News section

    + +

    In the last section, we went over some basic concepts of the framework by writing a class that includes static pages. We cleaned up the URI by adding custom routing rules. Now it's time to introduce dynamic content and start using a database.

    + +

    Setting up your model

    + +

    Instead of writing database operations right in the controller, queries should be placed in a model, so they can easily be reused later. Models are the place where you retrieve, insert, and update information in your database or other data stores. They represent your data.

    + +

    Open up the application/models directory and create a new file called news_model.php and add the following code. Make sure you've configured your database properly as described here.

    + +
    +<?php
    +class News_model extends CI_Model {
    +
    +	function __construct()
    +	{
    +		$this->load->database();
    +
    +	}
    +}
    +
    + +

    This code looks similar to the controller code that was used earlier. It creates a new model by extending CI_Model and loads the database library. This will make the database class available through the $this->db object.

    + +

    Before querying the database, a database schema has to be created. Connect to your database and run the SQL command below. Also add some seed records.

    + +
    +CREATE TABLE news (
    +	id int(11) NOT NULL AUTO_INCREMENT,
    +	title varchar(128) NOT NULL,
    +	slug varchar(128) NOT NULL,
    +	text text NOT NULL,
    +	PRIMARY KEY (id),
    +	KEY slug (slug)
    +);
    +
    + +

    Now that the database and a model have been set up, you'll need a method to get all of our posts from our database. To do this, the database abstraction layer that is included with CodeIgniter — ActiveRecord — is used. This makes it possible to write your 'queries' once and make them work on all supported database systems. Add the following code to your model.

    + +
    +function get_news($slug = FALSE)
    +{
    +	if ($slug === FALSE)
    +	{
    +		$query = $this->db->get('news');
    +		return $query->result_array();
    +
    +	}
    +	else
    +	{
    +		$query = $this->db->get_where('news', array('slug' => $slug));
    +		return $query->row_array();
    +
    +	}
    +
    +}
    +
    + +

    With this code you can perform two different queries. You can get all news records, or get a news item by its slug. You might have noticed that the $slug variable wasn't sanitized before running the query; Active Record does this for you.

    + +

    Display the news

    + +

    Now that the queries are written, the model should be tied to the views that are going to display the news items to the user. This could be done in our pages controller created earlier, but for the sake of clarity, a new "news" controller is defined. Create the new controller at application/controllers/news.php.

    + +
    +<?php
    +class News extends CI_Controller{
    +
    +	function __construct()
    +	{
    +		parent::__construct();
    +		$this->load->model('news_model');
    +
    +	}
    +
    +	function index()
    +	{
    +		$data['news'] = $this->news_model->get_news();
    +
    +	}
    +
    +	function view($slug)
    +	{
    +		$data['news'] = $this->news_model->get_news($slug);
    +
    +	}
    +
    +}
    +
    + +

    Looking at the code, you may see some similarity with the files we created earlier. First, the "__construct" method: it calls the constructor of its parent class (CI_Controller) and loads the model, so it can be used in all other methods in this controller.

    + +

    Next, there are two methods to view all news items and one for a specific news item. You can see that the $slug variable is passed to the model's method in the second method. The model is using this slug to identify the news item to be returned.

    + +

    Now the data is retrieved by the controller through our model, but nothing is displayed yet. The next thing to do is passing this data to the views.

    + +
    +function index()
    +{
    +	$data['news'] = $this->news_model->get_news();
    +	$data['title'] = 'News archive';
    +
    +	$this->load->view('templates/header', $data);
    +	$this->load->view('news/index', $data);
    +	$this->load->view('templates/footer');
    +
    +}
    +
    + +

    The code above gets all news records from the model and assigns it to a variable. The value for the title is also assigned to the $data['title'] element and all data is passed to the views. You now need to create a view to render the news items. Create application/views/news/index.php and add the next piece of code.

    + +
    +<?php foreach ($news as $news_item): ?>
    +
    +    <h2><?php echo $news_item['title'] ?></h2>
    +    <div id="main">
    +        <?php echo $news_item['text'] ?>
    +    </div>
    +    <p><a href="news/<?php echo $news_item['slug'] ?>">View article</a></p>
    +
    +<?php endforeach ?>
    +
    + +

    Here, each news item is looped and displayed to the user. You can see we wrote our template in PHP mixed with HTML. If you prefer to use a template language, you can use CodeIgniter's Template Parser class or a third party parser.

    + +

    The news overview page is now done, but a page to display individual news items is still absent. The model created earlier is made in such way that it can easily be used for this functionality. You only need to add some code to the controller and create a new view. Go back to the news controller and add the following lines to the file.

    + +
    +function view($slug)
    +{
    +	$data['news_item'] = $this->news_model->get_news($slug);
    +
    +	if (empty($data['news_item']))
    +	{
    +		show_404();
    +	}
    +
    +	$data['title'] = $data['news_item']['title'];
    +
    +	$this->load->view('templates/header', $data);
    +	$this->load->view('news/view', $data);
    +	$this->load->view('templates/footer');
    +
    +}
    +
    + +

    Instead of calling the get_news() method without a parameter, the $slug variable is passed, so it will return the specific news item. The only things left to do is create the corresponding view at application/views/news/view.php. Put the following code in this file.

    + +
    +<?php
    +echo '<h2>' . $news_item['title'] . '</h2>';
    +echo $news_item['text'];
    +
    + +

    Routing

    +

    Because of the wildcard routing rule created earlier, you need need an extra route to view the controller that you just made. Modify your routing file (application/config/routes.php) so it looks as follows. This makes sure the requests reaches the news controller instead of going directly to the pages controller. The first line routes URI's with a slug to the view method in the news controller.

    + +
    +$route['news/(:any)'] = 'news/view/$1';
    +$route['news'] = 'news';
    +$route['(:any)'] = 'pages/view/$1';
    +$route['default_controller'] = 'pages/view';
    +
    + +

    Point your browser to your document root, followed by index.php/news and watch your news page.

    + +
    + + + + + + + \ No newline at end of file diff --git a/user_guide/tutorial/static_pages.html b/user_guide/tutorial/static_pages.html new file mode 100644 index 00000000..69e5b744 --- /dev/null +++ b/user_guide/tutorial/static_pages.html @@ -0,0 +1,206 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +

    CodeIgniter User Guide Version 2.0.2

    +
    + + + + + + + + + +
    + + +
    + + + +
    + + +

    Tutorial − Static pages

    + +

    Note: This tutorial assumes you've downloaded CodeIgniter and installed the framework in your development environment.

    + +

    The first thing you're going to do is set up a controller to handle static pages. +A controller is simply a class that helps delegate work. It is the glue of your +web application.

    + +

    For example, when a call is made to: http://example.com/news/latest/10 We might imagine +that there is a controller named "news". The method being called on news +would be "latest". The news method's job could be to grab 10 +news items, and render them on the page. Very often in MVC, you'll see URL +patterns that match: http://example.com/[controller-class]/[controller-method]/[arguments] +As URL schemes become more complex, this may change. But for now, this is all we will need to know.

    + +

    Create a file at application/controllers/pages.php with the following code.

    + + + +

    You have created a class named "pages", with a view method that accepts one argument named $page. +The pages class is extending the CI_Controller class. +This means that the new pages class can access the methods and variables defined in the CI_Controller class +(system/core/Controller.php).

    + +

    The controller is what will become the center of every request to your web application. +In very technical CodeIgniter discussions, it may be referred to as the super object. +Like any php class, you refer to it within your controllers as $this. +Referring to $this is how you will load libraries, views, and generally +command the framework.

    + +

    Now you've created your first method, it's time to make some basic page templates. +We will be creating two "views" (page templates) that act as our page footer and header.

    + +

    Create the header at application/views/templates/header.php and add the following code.

    + + + +

    The header contains the basic HTML code that you'll want to display before loading the main view, together with a heading. +It will also output the $title variable, which we'll define later in the controller. +Now create a footer at application/views/templates/footer.php that includes the following code:

    + + + +

    Adding logic to the controller

    + +

    Earlier you set up a controller with a view() method. The method accepts one parameter, which is the name of the page to be loaded. +The static page templates will be located in the application/views/pages/ directory.

    + +

    In that directory, create two files named home.php and about.php. +Within those files, type some text − anything you'd like − and save them. +If you like to be particularly un-original, try "Hello World!".

    + +

    In order to load those pages, you'll have to check whether the requested page actually exists:

    + +
    +function view($page = 'home')
    +{
    +			
    +	if ( ! file_exists('application/views/pages/' . $page . EXT))
    +	{
    +		// Whoops, we don't have a page for that!
    +		show_404();
    +	}
    +	
    +	$data['title'] = ucfirst($page); // Capitalize the first letter
    +	
    +	$this->load->view('templates/header', $data);
    +	$this->load->view('pages/' . $page, $data);
    +	$this->load->view('templates/footer', $data);
    +	
    +}	
    +
    + +

    Now, when the page does exist, it is loaded, including the header and footer, and displayed to the user. If the page doesn't exist, a "404 Page not found" error is shown.

    + +

    The first line in this method checks whether the page actually exists. PHP's native file_exists() function is used to check whether the file is where it's expected to be. show_404() is a built-in CodeIgniter function that renders the default error page.

    + +

    In the header template, the $title variable was used to customize the page title. The value of title is defined in this method, but instead of assigning the value to a variable, it is assigned to the title element in the $data array.

    + +

    The last thing that has to be done is loading the views in the order they should be displayed. +The second parameter in the view() method is used to pass values to the view. Each value in the $data array is assigned to a variable with the name of its key. So the value of $data['title'] in the controller is equivalent to $title in the view.

    + +

    Routing

    + +

    The controller is now functioning! Point your browser to [your-site-url]index.php/pages/view to see your page. When you visit index.php/pages/view/about you'll see the about page, again including the header and footer.

    + +

    Using custom routing rules, you have the power to map any URI to any controller and method, and break free from the normal convention: +http://example.com/[controller-class]/[controller-method]/[arguments]

    + +

    Let's do that. Open the routing file located at application/config/routes.php and add the following two lines. Remove all other code that sets any element in the $route array.

    + +
    +$route['default_controller'] = 'pages';
    +$route['(:any)'] = 'pages/view/$1';
    +
    + +

    CodeIgniter reads its routing rules from top to bottom and routes the request to the first matching rule. Each rule is a regular expression +(left-side) mapped to a controller and method name separated by slashes (right-side). +When a request comes in, CodeIgniter looks for the first match, and calls the appropriate controller and method, possibly with arguments.

    + +

    More information about routing can be found in the URI Routing documentation.

    + +

    Here, the second rule in the $routes array matches any request using the wildcard string (:any). +and passes the parameter to the view() method of the pages class.

    + +

    Now visit index.php/about. Did it get routed correctly to the view() method +in the pages controller? Awesome!

    + +
    + + + + + + + \ No newline at end of file From b430ecd00aaa80c63734b508c82501bec3a0b703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Cox?= Date: Tue, 23 Aug 2011 14:54:42 +0200 Subject: [PATCH 013/106] Bumped the version number, corrected spelling mistakes (thanks @chrisberthe) and added links to the tutorial pages in the introduction. --- user_guide/tutorial/conclusion.html | 4 ++-- user_guide/tutorial/create_news_items.html | 6 +++--- user_guide/tutorial/introduction.html | 17 +++++++++++++---- user_guide/tutorial/news_section.html | 4 ++-- user_guide/tutorial/static_pages.html | 2 +- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/user_guide/tutorial/conclusion.html b/user_guide/tutorial/conclusion.html index f0a22956..f3bdaad1 100644 --- a/user_guide/tutorial/conclusion.html +++ b/user_guide/tutorial/conclusion.html @@ -28,7 +28,7 @@
    - +

    CodeIgniter User Guide Version 2.0.2

    CodeIgniter User Guide Version 2.0.3

    @@ -43,7 +43,7 @@ CodeIgniter Home  ›  User Guide Home  ›  Tutorial  ›  -Features +Conclusion
    Search User Guide   
    diff --git a/user_guide/tutorial/create_news_items.html b/user_guide/tutorial/create_news_items.html index 66cfc6fd..a2591793 100644 --- a/user_guide/tutorial/create_news_items.html +++ b/user_guide/tutorial/create_news_items.html @@ -28,7 +28,7 @@
    - +

    CodeIgniter User Guide Version 2.0.2

    CodeIgniter User Guide Version 2.0.3

    @@ -85,7 +85,7 @@

    Create a news item

    There are only two things here that probably look unfamiliar to you: the form_open() function and the validation_errors() function.

    -

    The first function is provided by the form helper and renders the form element and adds extra functionality, like adding a hidden CSFR prevention field. The latter is used to report errors related to from validation.

    +

    The first function is provided by the form helper and renders the form element and adds extra functionality, like adding a hidden CSFR prevention field. The latter is used to report errors related to form validation.

    Go back to your news controller. You're going to do two things here, check whether the form was submitted and whether the submitted data passed the validation rules. You'll use the form validation library to do this.

    @@ -150,7 +150,7 @@

    Model

    Routing

    -

    Before you can start adding news items into your CodeIgniter application you have to add an extra rule to config/routes.php file. Make sure your file contains the following. This makes sure CodeIgniter sees 'update' as a method instead of a news item's slug.

    +

    Before you can start adding news items into your CodeIgniter application you have to add an extra rule to config/routes.php file. Make sure your file contains the following. This makes sure CodeIgniter sees 'create' as a method instead of a news item's slug.

     $route['news/create'] = 'news/create';
    diff --git a/user_guide/tutorial/introduction.html b/user_guide/tutorial/introduction.html
    index cb91f485..78fd00b6 100644
    --- a/user_guide/tutorial/introduction.html
    +++ b/user_guide/tutorial/introduction.html
    @@ -28,7 +28,7 @@
     
    - +

    CodeIgniter User Guide Version 2.0.2

    CodeIgniter User Guide Version 2.0.3

    @@ -59,9 +59,7 @@

    Tutorial − Introduction

    -

    This tutorial is intended to introduce you to the CodeIgniter framework and the basic principles of MVC architecture. - It will show you how a basic CodeIgniter application is constructed in step-by-step fashion. -

    +

    This tutorial is intended to introduce you to the CodeIgniter framework and the basic principles of MVC architecture. It will show you how a basic CodeIgniter application is constructed in step-by-step fashion.

    In this tutorial, you will be creating a basic news application. You will begin by writing the code that can load static pages. Next, you will create a news section that reads news items from a database. Finally, you'll add a form to create news items in the database.

    @@ -73,6 +71,17 @@

    Tutorial − Introduction

  • Performing basic database queries using "Active Record"
  • +

    The entire tutorial is split up over several pages, each explaining a small part of the functionality of the CodeIgniter framework. You'll go through the following pages:

    +
      +
    • Introduction, this page, which gives you an overview of what to expect.
    • +
    • Static pages, which will teach you the basics of controllers, views and routing.
    • +
    • News section, where you'll start using models and will be doing some basic database operations.
    • +
    • Create news items, which will introduce more advanced database operations and form validation.
    • +
    • Conclusion, which will give you some pointers on further reading and other resources.
    • +
    + +

    Enjoy your exploration of the CodeIgniter framework.

    +
    diff --git a/user_guide/tutorial/news_section.html b/user_guide/tutorial/news_section.html index d0f64e0c..8d889996 100644 --- a/user_guide/tutorial/news_section.html +++ b/user_guide/tutorial/news_section.html @@ -28,7 +28,7 @@
    - +

    CodeIgniter User Guide Version 2.0.2

    CodeIgniter User Guide Version 2.0.3

    @@ -94,7 +94,7 @@

    Setting up your model

    );
    -

    Now that the database and a model have been set up, you'll need a method to get all of our posts from our database. To do this, the database abstraction layer that is included with CodeIgniter — ActiveRecord — is used. This makes it possible to write your 'queries' once and make them work on all supported database systems. Add the following code to your model.

    +

    Now that the database and a model have been set up, you'll need a method to get all of our posts from our database. To do this, the database abstraction layer that is included with CodeIgniter — Active Record — is used. This makes it possible to write your 'queries' once and make them work on all supported database systems. Add the following code to your model.

     function get_news($slug = FALSE)
    diff --git a/user_guide/tutorial/static_pages.html b/user_guide/tutorial/static_pages.html
    index 69e5b744..d5eec43d 100644
    --- a/user_guide/tutorial/static_pages.html
    +++ b/user_guide/tutorial/static_pages.html
    @@ -28,7 +28,7 @@
     
    - +

    CodeIgniter User Guide Version 2.0.2

    CodeIgniter User Guide Version 2.0.3

    From d5141d2008abbf709c30463797df16d3291e3c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Cox?= Date: Tue, 23 Aug 2011 15:27:38 +0200 Subject: [PATCH 014/106] Removed EXT constant and excessive else statement. --- user_guide/tutorial/news_section.html | 9 +++------ user_guide/tutorial/static_pages.html | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/user_guide/tutorial/news_section.html b/user_guide/tutorial/news_section.html index 8d889996..191f0e1e 100644 --- a/user_guide/tutorial/news_section.html +++ b/user_guide/tutorial/news_section.html @@ -105,12 +105,9 @@

    Setting up your model

    return $query->result_array(); } - else - { - $query = $this->db->get_where('news', array('slug' => $slug)); - return $query->row_array(); - - } + + $query = $this->db->get_where('news', array('slug' => $slug)); + return $query->row_array(); }
    diff --git a/user_guide/tutorial/static_pages.html b/user_guide/tutorial/static_pages.html index d5eec43d..bf52f454 100644 --- a/user_guide/tutorial/static_pages.html +++ b/user_guide/tutorial/static_pages.html @@ -137,7 +137,7 @@

    Adding logic to the controller

    function view($page = 'home') { - if ( ! file_exists('application/views/pages/' . $page . EXT)) + if ( ! file_exists('application/views/pages/' . $page . '.php')) { // Whoops, we don't have a page for that! show_404(); From 5cbced2f3899726241b7a3a83e47a92fb01dbf83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Cox?= Date: Tue, 23 Aug 2011 16:21:33 +0200 Subject: [PATCH 015/106] Forgot to save after bumping version number in hard_coded_pages.html. --- user_guide/tutorial/hard_coded_pages.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide/tutorial/hard_coded_pages.html b/user_guide/tutorial/hard_coded_pages.html index 6201ed08..e83f1ec8 100644 --- a/user_guide/tutorial/hard_coded_pages.html +++ b/user_guide/tutorial/hard_coded_pages.html @@ -28,7 +28,7 @@
    - +

    CodeIgniter User Guide Version 2.0.2

    CodeIgniter User Guide Version 2.0.3

    From 7bd6335c77cfc5fec9e7e788d45d110c1b09ffd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Cox?= Date: Sat, 27 Aug 2011 20:21:19 +0200 Subject: [PATCH 016/106] Renamed introduction to index and small code style fixes (patch by @ericbarnes). --- user_guide/nav/nav.js | 2 +- user_guide/toc.html | 2 +- user_guide/tutorial/conclusion.html | 2 +- user_guide/tutorial/create_news_items.html | 8 ++--- user_guide/tutorial/hard_coded_pages.html | 7 ++--- .../{introduction.html => index.html} | 2 +- user_guide/tutorial/news_section.html | 29 +++++++------------ user_guide/tutorial/static_pages.html | 16 +++++----- 8 files changed, 28 insertions(+), 40 deletions(-) rename user_guide/tutorial/{introduction.html => index.html} (98%) diff --git a/user_guide/nav/nav.js b/user_guide/nav/nav.js index b57851a6..bc668ec2 100644 --- a/user_guide/nav/nav.js +++ b/user_guide/nav/nav.js @@ -40,7 +40,7 @@ function create_menu(basepath) '

    Tutorial

    ' + '
      ' + - '
    • Introduction
    • ' + + '
    • Introduction
    • ' + '
    • Static pages
    • ' + '
    • News section
    • ' + '
    • Create news items
    • ' + diff --git a/user_guide/toc.html b/user_guide/toc.html index aedea446..bd6aaf51 100644 --- a/user_guide/toc.html +++ b/user_guide/toc.html @@ -91,7 +91,7 @@

      Introduction

      Tutorial

        -
      • Introduction
      • +
      • Introduction
      • Static pages
      • News section
      • Create news items
      • diff --git a/user_guide/tutorial/conclusion.html b/user_guide/tutorial/conclusion.html index f3bdaad1..ccf89175 100644 --- a/user_guide/tutorial/conclusion.html +++ b/user_guide/tutorial/conclusion.html @@ -42,7 +42,7 @@ CodeIgniter Home  ›  User Guide Home  ›  -Tutorial  ›  +Tutorial  ›  Conclusion
        Search User Guide   
        diff --git a/user_guide/tutorial/create_news_items.html b/user_guide/tutorial/create_news_items.html index a2591793..48c82c79 100644 --- a/user_guide/tutorial/create_news_items.html +++ b/user_guide/tutorial/create_news_items.html @@ -42,7 +42,7 @@ CodeIgniter Home  ›  User Guide Home  ›  -Tutorial  ›  +Tutorial  ›  Create news items
        Search User Guide   
        @@ -90,7 +90,7 @@

        Create a news item

        Go back to your news controller. You're going to do two things here, check whether the form was submitted and whether the submitted data passed the validation rules. You'll use the form validation library to do this.

        -function create()
        +public function create()
         {
         	$this->load->helper('form');
         	$this->load->library('form_validation');
        @@ -112,7 +112,6 @@ 

        Create a news item

        $this->news_model->set_news(); $this->load->view('news/success'); } - }
        @@ -127,7 +126,7 @@

        Model

        The only thing that remains is writing a method that writes the data to the database. You'll use the Active Record class to insert the information and use the input library to get the posted data. Open up the model created earlier and add the following:

        -function set_news()
        +public function set_news()
         {
         	$this->load->helper('url');
         	
        @@ -140,7 +139,6 @@ 

        Model

        ); return $this->db->insert('news', $data); - }
        diff --git a/user_guide/tutorial/hard_coded_pages.html b/user_guide/tutorial/hard_coded_pages.html index e83f1ec8..408634a7 100644 --- a/user_guide/tutorial/hard_coded_pages.html +++ b/user_guide/tutorial/hard_coded_pages.html @@ -68,7 +68,7 @@

        Tutorial - Hard coded pages

        <?php class Pages extends CI_Controller { - function view($page = 'home') + public function view($page = 'home') { } @@ -104,7 +104,7 @@

        Adding logic to the controller

        In order to load these pages we'll have to check whether these page actually exists. When the page does exist, we load the view for that pages, including the header and footer and display it to the user. If it doesn't, we show a "404 Page not found" error.

        diff --git a/user_guide/tutorial/introduction.html b/user_guide/tutorial/index.html similarity index 98% rename from user_guide/tutorial/introduction.html rename to user_guide/tutorial/index.html index 78fd00b6..4f665fe0 100644 --- a/user_guide/tutorial/introduction.html +++ b/user_guide/tutorial/index.html @@ -42,7 +42,7 @@ CodeIgniter Home  ›  User Guide Home  ›  -Tutorial  ›  +Tutorial  ›  Introduction
        Search User Guide   
        diff --git a/user_guide/tutorial/news_section.html b/user_guide/tutorial/news_section.html index 191f0e1e..b2d88318 100644 --- a/user_guide/tutorial/news_section.html +++ b/user_guide/tutorial/news_section.html @@ -42,7 +42,7 @@ CodeIgniter Home  ›  User Guide Home  ›  -Tutorial  ›  +Tutorial  ›  News section
        Search User Guide   
        @@ -71,10 +71,9 @@

        Setting up your model

        <?php class News_model extends CI_Model { - function __construct() + public function __construct() { $this->load->database(); - } } @@ -97,18 +96,16 @@

        Setting up your model

        Now that the database and a model have been set up, you'll need a method to get all of our posts from our database. To do this, the database abstraction layer that is included with CodeIgniter — Active Record — is used. This makes it possible to write your 'queries' once and make them work on all supported database systems. Add the following code to your model.

        -function get_news($slug = FALSE)
        +public function get_news($slug = FALSE)
         {
         	if ($slug === FALSE)
         	{
         		$query = $this->db->get('news');
         		return $query->result_array();
        -
         	}
         	
         	$query = $this->db->get_where('news', array('slug' => $slug));
         	return $query->row_array();
        -
         }
         
        @@ -120,27 +117,23 @@

        Display the news

         <?php
        -class News extends CI_Controller{
        +class News extends CI_Controller {
         
        -	function __construct()
        +	public function __construct()
         	{
         		parent::__construct();
         		$this->load->model('news_model');
        -
         	}
         
        -	function index()
        +	public function index()
         	{
         		$data['news'] = $this->news_model->get_news();
        -
         	}
         
        -	function view($slug)
        +	public function view($slug)
         	{
         		$data['news'] = $this->news_model->get_news($slug);
        -
         	}
        -
         }
         
        @@ -151,7 +144,7 @@

        Display the news

        Now the data is retrieved by the controller through our model, but nothing is displayed yet. The next thing to do is passing this data to the views.

        -function index()
        +public function index()
         {
         	$data['news'] = $this->news_model->get_news();
         	$data['title'] = 'News archive';
        @@ -159,7 +152,6 @@ 

        Display the news

        $this->load->view('templates/header', $data); $this->load->view('news/index', $data); $this->load->view('templates/footer'); - }
        @@ -182,7 +174,7 @@

        Display the news

        The news overview page is now done, but a page to display individual news items is still absent. The model created earlier is made in such way that it can easily be used for this functionality. You only need to add some code to the controller and create a new view. Go back to the news controller and add the following lines to the file.

        -function view($slug)
        +public function view($slug)
         {
         	$data['news_item'] = $this->news_model->get_news($slug);
         
        @@ -196,7 +188,6 @@ 

        Display the news

        $this->load->view('templates/header', $data); $this->load->view('news/view', $data); $this->load->view('templates/footer'); - }
        @@ -204,7 +195,7 @@

        Display the news

         <?php
        -echo '<h2>' . $news_item['title'] . '</h2>';
        +echo '<h2>'.$news_item['title'].'</h2>';
         echo $news_item['text'];
         
        diff --git a/user_guide/tutorial/static_pages.html b/user_guide/tutorial/static_pages.html index bf52f454..51a04c68 100644 --- a/user_guide/tutorial/static_pages.html +++ b/user_guide/tutorial/static_pages.html @@ -42,7 +42,7 @@ CodeIgniter Home  ›  User Guide Home  ›  -Tutorial  ›  +Tutorial  ›  Static pages
        Search User Guide   
        @@ -79,7 +79,7 @@

        Tutorial − Static pages

        class Pages extends CI_Controller { - function view($page = 'home') + public function view($page = 'home') { } @@ -134,10 +134,10 @@

        Adding logic to the controller

        In order to load those pages, you'll have to check whether the requested page actually exists:

        -function view($page = 'home')
        +public function view($page = 'home')
         {
         			
        -	if ( ! file_exists('application/views/pages/' . $page . '.php'))
        +	if ( ! file_exists('application/views/pages/'.$page.'.php'))
         	{
         		// Whoops, we don't have a page for that!
         		show_404();
        @@ -146,10 +146,10 @@ 

        Adding logic to the controller

        $data['title'] = ucfirst($page); // Capitalize the first letter $this->load->view('templates/header', $data); - $this->load->view('pages/' . $page, $data); + $this->load->view('pages/'.$page, $data); $this->load->view('templates/footer', $data); - -} + +}

        Now, when the page does exist, it is loaded, including the header and footer, and displayed to the user. If the page doesn't exist, a "404 Page not found" error is shown.

        @@ -193,7 +193,7 @@

        Routing

      Version 2.0.3

      From e8349294d8638dac1e689d137188bb7c7c7c19c5 Mon Sep 17 00:00:00 2001 From: Tom Klingenberg Date: Fri, 7 Oct 2011 20:03:30 +0200 Subject: [PATCH 020/106] CI_Loader::driver() processes empty library. Fixed. This causes endless recursion calls _ci_load_class(), see #550 --- system/core/Loader.php | 5 +++++ 1 file changed, 5 insertions(+) mode change 100755 => 100644 system/core/Loader.php diff --git a/system/core/Loader.php b/system/core/Loader.php old mode 100755 new mode 100644 index e7fa3d3f..6b7ee0c2 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -616,6 +616,11 @@ public function driver($library = '', $params = NULL, $object_name = NULL) require BASEPATH.'libraries/Driver.php'; } + if ($library == '') + { + return FALSE; + } + // We can save the loader some time since Drivers will *always* be in a subfolder, // and typically identically named to the library if ( ! strpos($library, '/')) From 13095cbc1b1b0509ac8c984e7a5fd704d9826569 Mon Sep 17 00:00:00 2001 From: diegorivera Date: Wed, 19 Oct 2011 02:56:15 -0200 Subject: [PATCH 021/106] Update system/libraries/Email.php --- system/libraries/Email.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index e28c23a0..2916b9a1 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -379,7 +379,15 @@ public function subject($subject) */ public function message($body) { - $this->_body = stripslashes(rtrim(str_replace("\r", "", $body))); + $this->_body = rtrim(str_replace("\r", "", $body)); + + //strip slashes only if magic quotes is ON + //if we do it with magic quotes OFF, it strips real, user-inputted chars. + if (get_magic_quotes_gpc()) + { + $this->_body = stripslashes($this->_body); + } + return $this; } From 6eab49a844b3542a5efee6620233a86f645a30f5 Mon Sep 17 00:00:00 2001 From: diegorivera Date: Wed, 19 Oct 2011 11:18:45 -0200 Subject: [PATCH 022/106] I wasn't following the CI code style guide. --- system/libraries/Email.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 2916b9a1..5f8d4868 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -383,10 +383,10 @@ public function message($body) //strip slashes only if magic quotes is ON //if we do it with magic quotes OFF, it strips real, user-inputted chars. - if (get_magic_quotes_gpc()) - { + if (get_magic_quotes_gpc()) + { $this->_body = stripslashes($this->_body); - } + } return $this; } From 75b1f3991013c17cacac18e47879c483fe1cf542 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 20 Oct 2011 10:11:59 +0300 Subject: [PATCH 023/106] get_magic_quotes_gpc() to be executed only if PHP version is 5.3 or lower --- system/core/Input.php | 11 +++++++---- system/libraries/Email.php | 10 +++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/system/core/Input.php b/system/core/Input.php index 5a033e7b..9bfb5f1f 100755 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -548,8 +548,12 @@ function _clean_input_data($str) return $new_array; } - // We strip slashes if magic quotes is on to keep things consistent - if (function_exists('get_magic_quotes_gpc') AND get_magic_quotes_gpc()) + /* We strip slashes if magic quotes is on to keep things consistent + + NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and + it will probably not exist in future versions at all. + */ + if ( ! is_php('5.4') && get_magic_quotes_gpc()) { $str = stripslashes($str); } @@ -714,7 +718,6 @@ public function is_cli_request() } } -// END Input class /* End of file Input.php */ -/* Location: ./system/core/Input.php */ +/* Location: ./system/core/Input.php */ \ No newline at end of file diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 5f8d4868..c8b727c3 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -381,9 +381,13 @@ public function message($body) { $this->_body = rtrim(str_replace("\r", "", $body)); - //strip slashes only if magic quotes is ON - //if we do it with magic quotes OFF, it strips real, user-inputted chars. - if (get_magic_quotes_gpc()) + /* strip slashes only if magic quotes is ON + if we do it with magic quotes OFF, it strips real, user-inputted chars. + + NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and + it will probably not exist in future versions at all. + */ + if ( ! is_php('5.4') && get_magic_quotes_gpc()) { $this->_body = stripslashes($this->_body); } From 3e1df1abe203db8c07ffbd9096aec77c458b80d5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Oct 2011 21:04:58 +0300 Subject: [PATCH 024/106] Cleanup and migrate oci8_driver and oci8_result from deprecated PHP4 to PHP5 style functions --- system/database/drivers/oci8/oci8_driver.php | 144 +++++++++++-------- system/database/drivers/oci8/oci8_result.php | 94 +++++------- 2 files changed, 120 insertions(+), 118 deletions(-) diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 14df104f..985466a7 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -35,8 +35,6 @@ * This is a modification of the DB_driver class to * permit access to oracle databases * - * NOTE: this uses the PHP 4 oci methods - * * @author Kelly McArdle * */ @@ -77,9 +75,9 @@ class CI_DB_oci8_driver extends CI_DB { * @access private called by the base class * @return resource */ - function db_connect() + public function db_connect() { - return @ocilogon($this->username, $this->password, $this->hostname); + return @oci_connect($this->username, $this->password, $this->hostname, $this->char_set); } // -------------------------------------------------------------------- @@ -90,9 +88,9 @@ function db_connect() * @access private called by the base class * @return resource */ - function db_pconnect() + public function db_pconnect() { - return @ociplogon($this->username, $this->password, $this->hostname); + return @oci_pconnect($this->username, $this->password, $this->hostname, $this->char_set); } // -------------------------------------------------------------------- @@ -106,9 +104,10 @@ function db_pconnect() * @access public * @return void */ - function reconnect() + public function reconnect() { // not implemented in oracle + return; } // -------------------------------------------------------------------- @@ -119,8 +118,9 @@ function reconnect() * @access private called by the base class * @return resource */ - function db_select() + public function db_select() { + // Not in Oracle - schemas are actually usernames return TRUE; } @@ -134,7 +134,7 @@ function db_select() * @param string * @return resource */ - function db_set_charset($charset, $collation) + public function db_set_charset($charset, $collation) { // @todo - add support if needed return TRUE; @@ -148,9 +148,9 @@ function db_set_charset($charset, $collation) * @access public * @return string */ - function _version() + public function _version() { - return ociserverversion($this->conn_id); + return oci_server_version($this->conn_id); } // -------------------------------------------------------------------- @@ -158,18 +158,18 @@ function _version() /** * Execute the query * - * @access private called by the base class + * @access public called by the base class * @param string an SQL query * @return resource */ - function _execute($sql) + public function _execute($sql) { // oracle must parse the query before it is run. All of the actions with // the query are based on the statement id returned by ociparse $this->stmt_id = FALSE; $this->_set_stmt_id($sql); - ocisetprefetch($this->stmt_id, 1000); - return @ociexecute($this->stmt_id, $this->_commit); + oci_set_prefetch($this->stmt_id, 1000); + return @oci_execute($this->stmt_id, $this->_commit); } /** @@ -179,11 +179,11 @@ function _execute($sql) * @param string an SQL query * @return none */ - function _set_stmt_id($sql) + private function _set_stmt_id($sql) { if ( ! is_resource($this->stmt_id)) { - $this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql)); + $this->stmt_id = oci_parse($this->conn_id, $this->_prep_query($sql)); } } @@ -198,7 +198,7 @@ function _set_stmt_id($sql) * @param string an SQL query * @return string */ - function _prep_query($sql) + private function _prep_query($sql) { return $sql; } @@ -211,9 +211,9 @@ function _prep_query($sql) * @access public * @return cursor id */ - function get_cursor() + public function get_cursor() { - $this->curs_id = ocinewcursor($this->conn_id); + $this->curs_id = oci_new_cursor($this->conn_id); return $this->curs_id; } @@ -237,7 +237,7 @@ function get_cursor() * type yes the type of the parameter * length yes the max size of the parameter */ - function stored_procedure($package, $procedure, $params) + public function stored_procedure($package, $procedure, $params) { if ($package == '' OR $procedure == '' OR ! is_array($params)) { @@ -257,7 +257,7 @@ function stored_procedure($package, $procedure, $params) { $sql .= $param['name'] . ","; - if (array_key_exists('type', $param) && ($param['type'] == OCI_B_CURSOR)) + if (array_key_exists('type', $param) && ($param['type'] === OCI_B_CURSOR)) { $have_cursor = TRUE; } @@ -278,7 +278,7 @@ function stored_procedure($package, $procedure, $params) * @access private * @return none */ - function _bind_params($params) + private function _bind_params($params) { if ( ! is_array($params) OR ! is_resource($this->stmt_id)) { @@ -295,7 +295,7 @@ function _bind_params($params) } } - ocibindbyname($this->stmt_id, $param['name'], $param['value'], $param['length'], $param['type']); + oci_bind_by_name($this->stmt_id, $param['name'], $param['value'], $param['length'], $param['type']); } } @@ -307,7 +307,7 @@ function _bind_params($params) * @access public * @return bool */ - function trans_begin($test_mode = FALSE) + public function trans_begin($test_mode = FALSE) { if ( ! $this->trans_enabled) { @@ -337,7 +337,7 @@ function trans_begin($test_mode = FALSE) * @access public * @return bool */ - function trans_commit() + public function trans_commit() { if ( ! $this->trans_enabled) { @@ -350,7 +350,7 @@ function trans_commit() return TRUE; } - $ret = OCIcommit($this->conn_id); + $ret = oci_commit($this->conn_id); $this->_commit = OCI_COMMIT_ON_SUCCESS; return $ret; } @@ -363,7 +363,7 @@ function trans_commit() * @access public * @return bool */ - function trans_rollback() + public function trans_rollback() { if ( ! $this->trans_enabled) { @@ -376,7 +376,7 @@ function trans_rollback() return TRUE; } - $ret = OCIrollback($this->conn_id); + $ret = oci_rollback($this->conn_id); $this->_commit = OCI_COMMIT_ON_SUCCESS; return $ret; } @@ -391,7 +391,7 @@ function trans_rollback() * @param bool whether or not the string will be used in a LIKE condition * @return string */ - function escape_str($str, $like = FALSE) + public function escape_str($str, $like = FALSE) { if (is_array($str)) { @@ -424,9 +424,9 @@ function escape_str($str, $like = FALSE) * @access public * @return integer */ - function affected_rows() + public function affected_rows() { - return @ocirowcount($this->stmt_id); + return @oci_num_rows($this->stmt_id); } // -------------------------------------------------------------------- @@ -437,7 +437,7 @@ function affected_rows() * @access public * @return integer */ - function insert_id() + public function insert_id() { // not supported in oracle return $this->display_error('db_unsupported_function'); @@ -455,7 +455,7 @@ function insert_id() * @param string * @return string */ - function count_all($table = '') + public function count_all($table = '') { if ($table == '') { @@ -480,11 +480,11 @@ function count_all($table = '') * * Generates a platform-specific query string so that the table names can be fetched * - * @access private + * @access public * @param boolean - * @return string + * @return string */ - function _list_tables($prefix_limit = FALSE) + public function _list_tables($prefix_limit = FALSE) { $sql = "SELECT TABLE_NAME FROM ALL_TABLES"; @@ -507,7 +507,7 @@ function _list_tables($prefix_limit = FALSE) * @param string the table name * @return string */ - function _list_columns($table = '') + public function _list_columns($table = '') { return "SELECT COLUMN_NAME FROM all_tab_columns WHERE table_name = '$table'"; } @@ -523,7 +523,7 @@ function _list_columns($table = '') * @param string the table name * @return object */ - function _field_data($table) + public function _field_data($table) { return "SELECT * FROM ".$table." where rownum = 1"; } @@ -533,12 +533,13 @@ function _field_data($table) /** * The error message string * - * @access private + * @access public * @return string */ - function _error_message() + public function _error_message() { - $error = ocierror($this->conn_id); + // If the error was during connection, no conn_id should be passed + $error = is_resource($this->conn_id) ? oci_error($this->conn_id) : oci_error(); return $error['message']; } @@ -547,12 +548,13 @@ function _error_message() /** * The error message number * - * @access private + * @access public * @return integer */ - function _error_number() + public function _error_number() { - $error = ocierror($this->conn_id); + // Same as _error_message() + $error = is_resource($this->conn_id) ? oci_error($this->conn_id) : oci_error(); return $error['code']; } @@ -563,11 +565,11 @@ function _error_number() * * This function escapes column and table names * - * @access private + * @access public * @param string * @return string */ - function _escape_identifiers($item) + public function _escape_identifiers($item) { if ($this->_escape_char == '') { @@ -610,7 +612,7 @@ function _escape_identifiers($item) * @param type * @return type */ - function _from_tables($tables) + public function _from_tables($tables) { if ( ! is_array($tables)) { @@ -633,9 +635,37 @@ function _from_tables($tables) * @param array the insert values * @return string */ - function _insert($table, $keys, $values) + public function _insert($table, $keys, $values) { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; + return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; + } + + // -------------------------------------------------------------------- + + /** + * Insert_batch statement + * + * Generates a platform-specific insert string from the supplied data + * + * @access public + * @param string the table name + * @param array the insert keys + * @param array the insert values + * @return string + */ + public function _insert_batch($table, $keys, $values) + { + $keys = implode(', ', $keys); + $sql = "INSERT ALL\n"; + + for ($i = 0, $c = count($values); $i < $c; $i++) + { + $sql .= ' INTO ' . $table . ' (' . $keys . ') VALUES ' . $values[$i] . "\n"; + } + + $sql .= 'SELECT * FROM dual'; + + return $sql; } // -------------------------------------------------------------------- @@ -653,7 +683,7 @@ function _insert($table, $keys, $values) * @param array the limit clause * @return string */ - function _update($table, $values, $where, $orderby = array(), $limit = FALSE) + public function _update($table, $values, $where, $orderby = array(), $limit = FALSE) { foreach ($values as $key => $val) { @@ -686,7 +716,7 @@ function _update($table, $values, $where, $orderby = array(), $limit = FALSE) * @param string the table name * @return string */ - function _truncate($table) + public function _truncate($table) { return "TRUNCATE TABLE ".$table; } @@ -704,7 +734,7 @@ function _truncate($table) * @param string the limit clause * @return string */ - function _delete($table, $where = array(), $like = array(), $limit = FALSE) + public function _delete($table, $where = array(), $like = array(), $limit = FALSE) { $conditions = ''; @@ -738,7 +768,7 @@ function _delete($table, $where = array(), $like = array(), $limit = FALSE) * @param integer the offset value * @return string */ - function _limit($sql, $limit, $offset) + public function _limit($sql, $limit, $offset) { $limit = $offset + $limit; $newsql = "SELECT * FROM (select inner_query.*, rownum rnum FROM ($sql) inner_query WHERE rownum < $limit)"; @@ -763,9 +793,9 @@ function _limit($sql, $limit, $offset) * @param resource * @return void */ - function _close($conn_id) + public function _close($conn_id) { - @ocilogoff($conn_id); + @oci_close($conn_id); } @@ -774,4 +804,4 @@ function _close($conn_id) /* End of file oci8_driver.php */ -/* Location: ./system/database/drivers/oci8/oci8_driver.php */ \ No newline at end of file +/* Location: ./system/database/drivers/oci8/oci8_driver.php */ diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 88531b43..7de1153b 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -40,14 +40,17 @@ class CI_DB_oci8_result extends CI_DB_result { * @access public * @return integer */ - function num_rows() + public function num_rows() { - $rowcount = count($this->result_array()); - @ociexecute($this->stmt_id); - - if ($this->curs_id) + if ($this->num_rows === 0 && count($this->result_array()) > 0) { - @ociexecute($this->curs_id); + $this->num_rows = count($this->result_array()); + @oci_execute($this->stmt_id); + + if ($this->curs_id) + { + @oci_execute($this->curs_id); + } } return $rowcount; @@ -61,9 +64,9 @@ function num_rows() * @access public * @return integer */ - function num_fields() + public function num_fields() { - $count = @ocinumcols($this->stmt_id); + $count = @oci_num_fields($this->stmt_id); // if we used a limit we subtract it if ($this->limit_used) @@ -84,13 +87,12 @@ function num_fields() * @access public * @return array */ - function list_fields() + public function list_fields() { $field_names = array(); - $fieldCount = $this->num_fields(); - for ($c = 1; $c <= $fieldCount; $c++) + for ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++) { - $field_names[] = ocicolumnname($this->stmt_id, $c); + $field_names[] = oci_field_name($this->stmt_id, $c); } return $field_names; } @@ -105,16 +107,15 @@ function list_fields() * @access public * @return array */ - function field_data() + public function field_data() { $retval = array(); - $fieldCount = $this->num_fields(); - for ($c = 1; $c <= $fieldCount; $c++) + for ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++) { - $F = new stdClass(); - $F->name = ocicolumnname($this->stmt_id, $c); - $F->type = ocicolumntype($this->stmt_id, $c); - $F->max_length = ocicolumnsize($this->stmt_id, $c); + $F = new stdClass(); + $F->name = oci_field_name($this->stmt_id, $c); + $F->type = oci_field_type($this->stmt_id, $c); + $F->max_length = oci_field_size($this->stmt_id, $c); $retval[] = $F; } @@ -129,11 +130,11 @@ function field_data() * * @return null */ - function free_result() + public function free_result() { if (is_resource($this->result_id)) { - ocifreestatement($this->result_id); + oci_free_statement($this->result_id); $this->result_id = FALSE; } } @@ -145,14 +146,13 @@ function free_result() * * Returns the result set as an array * - * @access private + * @access public * @return array */ - function _fetch_assoc(&$row) + public function _fetch_assoc() { $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id; - - return ocifetchinto($id, $row, OCI_ASSOC + OCI_RETURN_NULLS); + return oci_fetch_assoc($id); } // -------------------------------------------------------------------- @@ -162,41 +162,13 @@ function _fetch_assoc(&$row) * * Returns the result set as an object * - * @access private + * @access public * @return object */ - function _fetch_object() + public function _fetch_object() { - $result = array(); - - // If PHP 5 is being used we can fetch an result object - if (function_exists('oci_fetch_object')) - { - $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id; - - return @oci_fetch_object($id); - } - - // If PHP 4 is being used we have to build our own result - foreach ($this->result_array() as $key => $val) - { - $obj = new stdClass(); - if (is_array($val)) - { - foreach ($val as $k => $v) - { - $obj->$k = $v; - } - } - else - { - $obj->$key = $val; - } - - $result[] = $obj; - } - - return $result; + $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id; + return @oci_fetch_object($id); } // -------------------------------------------------------------------- @@ -207,7 +179,7 @@ function _fetch_object() * @access public * @return array */ - function result_array() + public function result_array() { if (count($this->result_array) > 0) { @@ -217,7 +189,7 @@ function result_array() // oracle's fetch functions do not return arrays. // The information is returned in reference parameters $row = NULL; - while ($this->_fetch_assoc($row)) + while ($row = $this->_fetch_assoc()) { $this->result_array[] = $row; } @@ -234,10 +206,10 @@ function result_array() * this internally before fetching results to make sure the * result set starts at zero * - * @access private + * @access public * @return array */ - function _data_seek($n = 0) + public function _data_seek($n = 0) { return FALSE; // Not needed } From c622a4155d912ad53143f5de94298eb8e60ba3e7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Oct 2011 21:17:11 +0300 Subject: [PATCH 025/106] Remove another 2 old comments --- system/database/drivers/oci8/oci8_result.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 7de1153b..ea5f7753 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -186,8 +186,6 @@ public function result_array() return $this->result_array; } - // oracle's fetch functions do not return arrays. - // The information is returned in reference parameters $row = NULL; while ($row = $this->_fetch_assoc()) { @@ -218,4 +216,4 @@ public function _data_seek($n = 0) /* End of file oci8_result.php */ -/* Location: ./system/database/drivers/oci8/oci8_result.php */ \ No newline at end of file +/* Location: ./system/database/drivers/oci8/oci8_result.php */ From cfe49186f26cd7bb6410abd4f1069b49325dc0e9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 20 Oct 2011 09:44:48 +0300 Subject: [PATCH 026/106] Some public and protected method declarations --- system/database/DB_result.php | 46 +++++++-------- system/database/drivers/oci8/oci8_driver.php | 60 ++++++++++---------- system/database/drivers/oci8/oci8_result.php | 12 ++-- 3 files changed, 59 insertions(+), 59 deletions(-) diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 0c4e7810..48d66c8e 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -45,7 +45,7 @@ class CI_DB_result { * @param string can be "object" or "array" * @return mixed either a result object or array */ - function result($type = 'object') + public function result($type = 'object') { if ($type == 'array') return $this->result_array(); else if ($type == 'object') return $this->result_object(); @@ -60,7 +60,7 @@ function result($type = 'object') * @param class_name A string that represents the type of object you want back * @return array of objects */ - function custom_result_object($class_name) + public function custom_result_object($class_name) { if (array_key_exists($class_name, $this->custom_result_object)) { @@ -79,12 +79,12 @@ function custom_result_object($class_name) while ($row = $this->_fetch_object()) { $object = new $class_name(); - + foreach ($row as $key => $value) { $object->$key = $value; } - + $result_object[] = $object; } @@ -100,7 +100,7 @@ function custom_result_object($class_name) * @access public * @return object */ - function result_object() + public function result_object() { if (count($this->result_object) > 0) { @@ -132,7 +132,7 @@ function result_object() * @access public * @return array */ - function result_array() + public function result_array() { if (count($this->result_array) > 0) { @@ -166,7 +166,7 @@ function result_array() * @param string can be "object" or "array" * @return mixed either a result object or array */ - function row($n = 0, $type = 'object') + public function row($n = 0, $type = 'object') { if ( ! is_numeric($n)) { @@ -198,7 +198,7 @@ function row($n = 0, $type = 'object') * @access public * @return object */ - function set_row($key, $value = NULL) + public function set_row($key, $value = NULL) { // We cache the row data for subsequent uses if ( ! is_array($this->row_data)) @@ -230,7 +230,7 @@ function set_row($key, $value = NULL) * @access public * @return object */ - function custom_row_object($n, $type) + public function custom_row_object($n, $type) { $result = $this->custom_result_object($type); @@ -253,7 +253,7 @@ function custom_row_object($n, $type) * @access public * @return object */ - function row_object($n = 0) + public function row_object($n = 0) { $result = $this->result_object(); @@ -278,7 +278,7 @@ function row_object($n = 0) * @access public * @return array */ - function row_array($n = 0) + public function row_array($n = 0) { $result = $this->result_array(); @@ -304,7 +304,7 @@ function row_array($n = 0) * @access public * @return object */ - function first_row($type = 'object') + public function first_row($type = 'object') { $result = $this->result($type); @@ -323,7 +323,7 @@ function first_row($type = 'object') * @access public * @return object */ - function last_row($type = 'object') + public function last_row($type = 'object') { $result = $this->result($type); @@ -342,7 +342,7 @@ function last_row($type = 'object') * @access public * @return object */ - function next_row($type = 'object') + public function next_row($type = 'object') { $result = $this->result($type); @@ -367,7 +367,7 @@ function next_row($type = 'object') * @access public * @return object */ - function previous_row($type = 'object') + public function previous_row($type = 'object') { $result = $this->result($type); @@ -394,14 +394,14 @@ function previous_row($type = 'object') * operational due to the unavailability of the database resource IDs with * cached results. */ - function num_rows() { return $this->num_rows; } - function num_fields() { return 0; } - function list_fields() { return array(); } - function field_data() { return array(); } - function free_result() { return TRUE; } - function _data_seek() { return TRUE; } - function _fetch_assoc() { return array(); } - function _fetch_object() { return array(); } + public function num_rows() { return $this->num_rows; } + public function num_fields() { return 0; } + public function list_fields() { return array(); } + public function field_data() { return array(); } + public function free_result() { return TRUE; } + protected function _data_seek() { return TRUE; } + protected function _fetch_assoc() { return array(); } + protected function _fetch_object() { return array(); } } // END DB_result class diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 985466a7..b4da3e96 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -145,10 +145,10 @@ public function db_set_charset($charset, $collation) /** * Version number query string * - * @access public + * @access protected * @return string */ - public function _version() + protected function _version() { return oci_server_version($this->conn_id); } @@ -158,11 +158,11 @@ public function _version() /** * Execute the query * - * @access public called by the base class + * @access protected called by the base class * @param string an SQL query * @return resource */ - public function _execute($sql) + protected function _execute($sql) { // oracle must parse the query before it is run. All of the actions with // the query are based on the statement id returned by ociparse @@ -480,11 +480,11 @@ public function count_all($table = '') * * Generates a platform-specific query string so that the table names can be fetched * - * @access public + * @access protected * @param boolean * @return string */ - public function _list_tables($prefix_limit = FALSE) + protected function _list_tables($prefix_limit = FALSE) { $sql = "SELECT TABLE_NAME FROM ALL_TABLES"; @@ -503,11 +503,11 @@ public function _list_tables($prefix_limit = FALSE) * * Generates a platform-specific query string so that the column names can be fetched * - * @access public + * @access protected * @param string the table name * @return string */ - public function _list_columns($table = '') + protected function _list_columns($table = '') { return "SELECT COLUMN_NAME FROM all_tab_columns WHERE table_name = '$table'"; } @@ -523,7 +523,7 @@ public function _list_columns($table = '') * @param string the table name * @return object */ - public function _field_data($table) + protected function _field_data($table) { return "SELECT * FROM ".$table." where rownum = 1"; } @@ -533,10 +533,10 @@ public function _field_data($table) /** * The error message string * - * @access public + * @access protected * @return string */ - public function _error_message() + protected function _error_message() { // If the error was during connection, no conn_id should be passed $error = is_resource($this->conn_id) ? oci_error($this->conn_id) : oci_error(); @@ -548,10 +548,10 @@ public function _error_message() /** * The error message number * - * @access public + * @access protected * @return integer */ - public function _error_number() + protected function _error_number() { // Same as _error_message() $error = is_resource($this->conn_id) ? oci_error($this->conn_id) : oci_error(); @@ -565,11 +565,11 @@ public function _error_number() * * This function escapes column and table names * - * @access public + * @access protected * @param string * @return string */ - public function _escape_identifiers($item) + protected function _escape_identifiers($item) { if ($this->_escape_char == '') { @@ -608,11 +608,11 @@ public function _escape_identifiers($item) * This function implicitly groups FROM tables so there is no confusion * about operator precedence in harmony with SQL standards * - * @access public + * @access protected * @param type * @return type */ - public function _from_tables($tables) + protected function _from_tables($tables) { if ( ! is_array($tables)) { @@ -635,7 +635,7 @@ public function _from_tables($tables) * @param array the insert values * @return string */ - public function _insert($table, $keys, $values) + protected function _insert($table, $keys, $values) { return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; } @@ -647,13 +647,13 @@ public function _insert($table, $keys, $values) * * Generates a platform-specific insert string from the supplied data * - * @access public + * @access protected * @param string the table name * @param array the insert keys * @param array the insert values * @return string */ - public function _insert_batch($table, $keys, $values) + protected function _insert_batch($table, $keys, $values) { $keys = implode(', ', $keys); $sql = "INSERT ALL\n"; @@ -675,7 +675,7 @@ public function _insert_batch($table, $keys, $values) * * Generates a platform-specific update string from the supplied data * - * @access public + * @access protected * @param string the table name * @param array the update data * @param array the where clause @@ -683,7 +683,7 @@ public function _insert_batch($table, $keys, $values) * @param array the limit clause * @return string */ - public function _update($table, $values, $where, $orderby = array(), $limit = FALSE) + protected function _update($table, $values, $where, $orderby = array(), $limit = FALSE) { foreach ($values as $key => $val) { @@ -712,11 +712,11 @@ public function _update($table, $values, $where, $orderby = array(), $limit = FA * If the database does not support the truncate() command * This function maps to "DELETE FROM table" * - * @access public + * @access protected * @param string the table name * @return string */ - public function _truncate($table) + protected function _truncate($table) { return "TRUNCATE TABLE ".$table; } @@ -728,13 +728,13 @@ public function _truncate($table) * * Generates a platform-specific delete string from the supplied data * - * @access public + * @access protected * @param string the table name * @param array the where clause * @param string the limit clause * @return string */ - public function _delete($table, $where = array(), $like = array(), $limit = FALSE) + protected function _delete($table, $where = array(), $like = array(), $limit = FALSE) { $conditions = ''; @@ -762,13 +762,13 @@ public function _delete($table, $where = array(), $like = array(), $limit = FALS * * Generates a platform-specific LIMIT clause * - * @access public + * @access protected * @param string the sql query string * @param integer the number of rows to limit the query to * @param integer the offset value * @return string */ - public function _limit($sql, $limit, $offset) + protected function _limit($sql, $limit, $offset) { $limit = $offset + $limit; $newsql = "SELECT * FROM (select inner_query.*, rownum rnum FROM ($sql) inner_query WHERE rownum < $limit)"; @@ -789,11 +789,11 @@ public function _limit($sql, $limit, $offset) /** * Close DB Connection * - * @access public + * @access protected * @param resource * @return void */ - public function _close($conn_id) + protected function _close($conn_id) { @oci_close($conn_id); } diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index ea5f7753..ae133d7b 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -146,10 +146,10 @@ public function free_result() * * Returns the result set as an array * - * @access public + * @access protected * @return array */ - public function _fetch_assoc() + protected function _fetch_assoc() { $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id; return oci_fetch_assoc($id); @@ -162,10 +162,10 @@ public function _fetch_assoc() * * Returns the result set as an object * - * @access public + * @access protected * @return object */ - public function _fetch_object() + protected function _fetch_object() { $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id; return @oci_fetch_object($id); @@ -204,10 +204,10 @@ public function result_array() * this internally before fetching results to make sure the * result set starts at zero * - * @access public + * @access protected * @return array */ - public function _data_seek($n = 0) + protected function _data_seek($n = 0) { return FALSE; // Not needed } From 9c63d0bb34be4007178d5a7e46348d5e23fee3ff Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 01:55:44 +0100 Subject: [PATCH 027/106] Bumped CodeIgniter version to 2.1.0. --- system/core/CodeIgniter.php | 2 +- user_guide/changelog.html | 2 +- user_guide/database/active_record.html | 2 +- user_guide/database/caching.html | 2 +- user_guide/database/call_function.html | 2 +- user_guide/database/configuration.html | 2 +- user_guide/database/connecting.html | 2 +- user_guide/database/examples.html | 2 +- user_guide/database/fields.html | 2 +- user_guide/database/forge.html | 2 +- user_guide/database/helpers.html | 2 +- user_guide/database/index.html | 2 +- user_guide/database/queries.html | 2 +- user_guide/database/results.html | 2 +- user_guide/database/table_data.html | 2 +- user_guide/database/transactions.html | 2 +- user_guide/database/utilities.html | 2 +- user_guide/doc_style/index.html | 2 +- user_guide/general/alternative_php.html | 2 +- user_guide/general/ancillary_classes.html | 2 +- user_guide/general/autoloader.html | 2 +- user_guide/general/caching.html | 2 +- user_guide/general/cli.html | 2 +- user_guide/general/common_functions.html | 2 +- user_guide/general/controllers.html | 2 +- user_guide/general/core_classes.html | 2 +- user_guide/general/creating_drivers.html | 2 +- user_guide/general/creating_libraries.html | 2 +- user_guide/general/credits.html | 2 +- user_guide/general/drivers.html | 2 +- user_guide/general/environments.html | 2 +- user_guide/general/errors.html | 2 +- user_guide/general/helpers.html | 2 +- user_guide/general/hooks.html | 2 +- user_guide/general/libraries.html | 2 +- user_guide/general/managing_apps.html | 2 +- user_guide/general/models.html | 2 +- user_guide/general/profiling.html | 2 +- user_guide/general/quick_reference.html | 2 +- user_guide/general/requirements.html | 2 +- user_guide/general/reserved_names.html | 2 +- user_guide/general/routing.html | 2 +- user_guide/general/security.html | 2 +- user_guide/general/styleguide.html | 2 +- user_guide/general/urls.html | 2 +- user_guide/general/views.html | 2 +- user_guide/helpers/array_helper.html | 2 +- user_guide/helpers/captcha_helper.html | 2 +- user_guide/helpers/cookie_helper.html | 2 +- user_guide/helpers/date_helper.html | 2 +- user_guide/helpers/directory_helper.html | 2 +- user_guide/helpers/download_helper.html | 2 +- user_guide/helpers/email_helper.html | 2 +- user_guide/helpers/file_helper.html | 2 +- user_guide/helpers/form_helper.html | 2 +- user_guide/helpers/html_helper.html | 2 +- user_guide/helpers/inflector_helper.html | 2 +- user_guide/helpers/language_helper.html | 2 +- user_guide/helpers/number_helper.html | 2 +- user_guide/helpers/path_helper.html | 2 +- user_guide/helpers/security_helper.html | 2 +- user_guide/helpers/smiley_helper.html | 2 +- user_guide/helpers/string_helper.html | 2 +- user_guide/helpers/text_helper.html | 2 +- user_guide/helpers/typography_helper.html | 2 +- user_guide/helpers/xml_helper.html | 2 +- user_guide/index.html | 2 +- user_guide/installation/downloads.html | 2 +- user_guide/installation/index.html | 2 +- user_guide/installation/troubleshooting.html | 2 +- user_guide/installation/upgrade_120.html | 2 +- user_guide/installation/upgrade_130.html | 2 +- user_guide/installation/upgrade_131.html | 2 +- user_guide/installation/upgrade_132.html | 2 +- user_guide/installation/upgrade_133.html | 2 +- user_guide/installation/upgrade_140.html | 2 +- user_guide/installation/upgrade_141.html | 2 +- user_guide/installation/upgrade_150.html | 2 +- user_guide/installation/upgrade_152.html | 2 +- user_guide/installation/upgrade_153.html | 2 +- user_guide/installation/upgrade_154.html | 2 +- user_guide/installation/upgrade_160.html | 2 +- user_guide/installation/upgrade_161.html | 2 +- user_guide/installation/upgrade_162.html | 2 +- user_guide/installation/upgrade_163.html | 2 +- user_guide/installation/upgrade_170.html | 2 +- user_guide/installation/upgrade_171.html | 2 +- user_guide/installation/upgrade_172.html | 2 +- user_guide/installation/upgrade_200.html | 2 +- user_guide/installation/upgrade_201.html | 2 +- user_guide/installation/upgrade_202.html | 2 +- user_guide/installation/upgrade_203.html | 8 +- user_guide/installation/upgrade_b11.html | 2 +- user_guide/installation/upgrading.html | 4 +- user_guide/libraries/benchmark.html | 2 +- user_guide/libraries/caching.html | 2 +- user_guide/libraries/calendar.html | 2 +- user_guide/libraries/cart.html | 2 +- user_guide/libraries/config.html | 2 +- user_guide/libraries/email.html | 2 +- user_guide/libraries/encryption.html | 2 +- user_guide/libraries/file_uploading.html | 2 +- user_guide/libraries/form_validation.html | 2 +- user_guide/libraries/ftp.html | 2 +- user_guide/libraries/image_lib.html | 2 +- user_guide/libraries/input.html | 2 +- user_guide/libraries/javascript.html | 2 +- user_guide/libraries/language.html | 2 +- user_guide/libraries/loader.html | 2 +- user_guide/libraries/migration.html | 176 +++++++++++++++++++ user_guide/libraries/output.html | 2 +- user_guide/libraries/pagination.html | 2 +- user_guide/libraries/parser.html | 2 +- user_guide/libraries/security.html | 2 +- user_guide/libraries/sessions.html | 2 +- user_guide/libraries/table.html | 2 +- user_guide/libraries/trackback.html | 2 +- user_guide/libraries/typography.html | 2 +- user_guide/libraries/unit_testing.html | 2 +- user_guide/libraries/uri.html | 2 +- user_guide/libraries/user_agent.html | 2 +- user_guide/libraries/xmlrpc.html | 2 +- user_guide/libraries/zip.html | 2 +- user_guide/license.html | 2 +- user_guide/overview/appflow.html | 2 +- user_guide/overview/at_a_glance.html | 2 +- user_guide/overview/cheatsheets.html | 2 +- user_guide/overview/features.html | 2 +- user_guide/overview/getting_started.html | 2 +- user_guide/overview/goals.html | 2 +- user_guide/overview/index.html | 2 +- user_guide/overview/mvc.html | 2 +- user_guide/tutorial/conclusion.html | 2 +- user_guide/tutorial/create_news_items.html | 2 +- user_guide/tutorial/hard_coded_pages.html | 2 +- user_guide/tutorial/index.html | 2 +- user_guide/tutorial/news_section.html | 2 +- user_guide/tutorial/static_pages.html | 2 +- 138 files changed, 317 insertions(+), 141 deletions(-) create mode 100644 user_guide/libraries/migration.html diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 0a1391d1..d9977e1c 100755 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -39,7 +39,7 @@ * @var string * */ - define('CI_VERSION', '2.0.2'); + define('CI_VERSION', '2.1.0'); /** * CodeIgniter Branch (Core = TRUE, Reactor = FALSE) diff --git a/user_guide/changelog.html b/user_guide/changelog.html index b0da1ac5..35946a21 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index 3f44fcd5..074f869b 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/caching.html b/user_guide/database/caching.html index 16d380f5..e6e72f26 100644 --- a/user_guide/database/caching.html +++ b/user_guide/database/caching.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/call_function.html b/user_guide/database/call_function.html index 38cbd1b2..4fc89474 100644 --- a/user_guide/database/call_function.html +++ b/user_guide/database/call_function.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/configuration.html b/user_guide/database/configuration.html index f06b08fe..17a291ac 100644 --- a/user_guide/database/configuration.html +++ b/user_guide/database/configuration.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/connecting.html b/user_guide/database/connecting.html index 309f2bc1..f8660226 100644 --- a/user_guide/database/connecting.html +++ b/user_guide/database/connecting.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/examples.html b/user_guide/database/examples.html index 1bdecb79..58035557 100644 --- a/user_guide/database/examples.html +++ b/user_guide/database/examples.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/fields.html b/user_guide/database/fields.html index 3a1ea0cf..56c9d9fd 100644 --- a/user_guide/database/fields.html +++ b/user_guide/database/fields.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/forge.html b/user_guide/database/forge.html index 6b870989..2289e148 100644 --- a/user_guide/database/forge.html +++ b/user_guide/database/forge.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html index 6a8aba55..82f5c1d2 100644 --- a/user_guide/database/helpers.html +++ b/user_guide/database/helpers.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/index.html b/user_guide/database/index.html index c85e9bf4..8a957ece 100644 --- a/user_guide/database/index.html +++ b/user_guide/database/index.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/queries.html b/user_guide/database/queries.html index e7333efc..3152997c 100644 --- a/user_guide/database/queries.html +++ b/user_guide/database/queries.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/results.html b/user_guide/database/results.html index ec5f9776..a6b85d8c 100644 --- a/user_guide/database/results.html +++ b/user_guide/database/results.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/table_data.html b/user_guide/database/table_data.html index 14ff28d4..dc5b5419 100644 --- a/user_guide/database/table_data.html +++ b/user_guide/database/table_data.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/transactions.html b/user_guide/database/transactions.html index 1a25f165..dd5f73ed 100644 --- a/user_guide/database/transactions.html +++ b/user_guide/database/transactions.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html index 8231c7e7..7c30070f 100644 --- a/user_guide/database/utilities.html +++ b/user_guide/database/utilities.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/doc_style/index.html b/user_guide/doc_style/index.html index 27a1756e..aa7fff43 100644 --- a/user_guide/doc_style/index.html +++ b/user_guide/doc_style/index.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/alternative_php.html b/user_guide/general/alternative_php.html index a4ce418e..6e601af4 100644 --- a/user_guide/general/alternative_php.html +++ b/user_guide/general/alternative_php.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/ancillary_classes.html b/user_guide/general/ancillary_classes.html index fb78edae..0e3d54de 100644 --- a/user_guide/general/ancillary_classes.html +++ b/user_guide/general/ancillary_classes.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/autoloader.html b/user_guide/general/autoloader.html index b65674fd..69975120 100644 --- a/user_guide/general/autoloader.html +++ b/user_guide/general/autoloader.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html index b40e770a..a0d7596e 100644 --- a/user_guide/general/caching.html +++ b/user_guide/general/caching.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/cli.html b/user_guide/general/cli.html index befc9994..70ab1380 100644 --- a/user_guide/general/cli.html +++ b/user_guide/general/cli.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html index 65457759..2751133b 100644 --- a/user_guide/general/common_functions.html +++ b/user_guide/general/common_functions.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index 2d525141..91dd95a0 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/core_classes.html b/user_guide/general/core_classes.html index b8917864..be711903 100644 --- a/user_guide/general/core_classes.html +++ b/user_guide/general/core_classes.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/creating_drivers.html b/user_guide/general/creating_drivers.html index 36775545..77cccd03 100644 --- a/user_guide/general/creating_drivers.html +++ b/user_guide/general/creating_drivers.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html index aeec871b..f905bb7c 100644 --- a/user_guide/general/creating_libraries.html +++ b/user_guide/general/creating_libraries.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/credits.html b/user_guide/general/credits.html index 2785e7f2..00c57787 100644 --- a/user_guide/general/credits.html +++ b/user_guide/general/credits.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/drivers.html b/user_guide/general/drivers.html index d0e4a1f1..f463adb1 100644 --- a/user_guide/general/drivers.html +++ b/user_guide/general/drivers.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/environments.html b/user_guide/general/environments.html index 38ce862b..0245b085 100644 --- a/user_guide/general/environments.html +++ b/user_guide/general/environments.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/errors.html b/user_guide/general/errors.html index 83725dcc..d6bed9ea 100644 --- a/user_guide/general/errors.html +++ b/user_guide/general/errors.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/helpers.html b/user_guide/general/helpers.html index 3747eb7b..619e9ff7 100644 --- a/user_guide/general/helpers.html +++ b/user_guide/general/helpers.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html index c0d616c5..07d302a7 100644 --- a/user_guide/general/hooks.html +++ b/user_guide/general/hooks.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/libraries.html b/user_guide/general/libraries.html index 40533e12..73b642be 100644 --- a/user_guide/general/libraries.html +++ b/user_guide/general/libraries.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/managing_apps.html b/user_guide/general/managing_apps.html index e716d107..38851979 100644 --- a/user_guide/general/managing_apps.html +++ b/user_guide/general/managing_apps.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/models.html b/user_guide/general/models.html index 1696f424..7bda4d9a 100644 --- a/user_guide/general/models.html +++ b/user_guide/general/models.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/profiling.html b/user_guide/general/profiling.html index 9895b028..451b6f9e 100644 --- a/user_guide/general/profiling.html +++ b/user_guide/general/profiling.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/quick_reference.html b/user_guide/general/quick_reference.html index 242e9afb..6c07b335 100644 --- a/user_guide/general/quick_reference.html +++ b/user_guide/general/quick_reference.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/requirements.html b/user_guide/general/requirements.html index 405798f0..1393b40e 100644 --- a/user_guide/general/requirements.html +++ b/user_guide/general/requirements.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/reserved_names.html b/user_guide/general/reserved_names.html index 91d93a03..450c0f66 100644 --- a/user_guide/general/reserved_names.html +++ b/user_guide/general/reserved_names.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html index c6429628..d5c90a1b 100644 --- a/user_guide/general/routing.html +++ b/user_guide/general/routing.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/security.html b/user_guide/general/security.html index 5685bfa8..9e78d4c6 100644 --- a/user_guide/general/security.html +++ b/user_guide/general/security.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/styleguide.html b/user_guide/general/styleguide.html index 25fab654..c9431336 100644 --- a/user_guide/general/styleguide.html +++ b/user_guide/general/styleguide.html @@ -34,7 +34,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html index 580b5fc5..edf03309 100644 --- a/user_guide/general/urls.html +++ b/user_guide/general/urls.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/general/views.html b/user_guide/general/views.html index a2273f86..5dc1d325 100644 --- a/user_guide/general/views.html +++ b/user_guide/general/views.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/array_helper.html b/user_guide/helpers/array_helper.html index 956c54e8..92a11ed6 100644 --- a/user_guide/helpers/array_helper.html +++ b/user_guide/helpers/array_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/captcha_helper.html b/user_guide/helpers/captcha_helper.html index 991c2d3f..6c2671ad 100644 --- a/user_guide/helpers/captcha_helper.html +++ b/user_guide/helpers/captcha_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/cookie_helper.html b/user_guide/helpers/cookie_helper.html index 3fbaa8fa..2fde7f84 100644 --- a/user_guide/helpers/cookie_helper.html +++ b/user_guide/helpers/cookie_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/date_helper.html b/user_guide/helpers/date_helper.html index f930ea3a..e705593b 100644 --- a/user_guide/helpers/date_helper.html +++ b/user_guide/helpers/date_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/directory_helper.html b/user_guide/helpers/directory_helper.html index 5623d509..7fd7797a 100644 --- a/user_guide/helpers/directory_helper.html +++ b/user_guide/helpers/directory_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/download_helper.html b/user_guide/helpers/download_helper.html index cabacf8f..ccfe9ac7 100644 --- a/user_guide/helpers/download_helper.html +++ b/user_guide/helpers/download_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/email_helper.html b/user_guide/helpers/email_helper.html index 10730d7e..13ae220f 100644 --- a/user_guide/helpers/email_helper.html +++ b/user_guide/helpers/email_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html index 1194498a..0296191f 100644 --- a/user_guide/helpers/file_helper.html +++ b/user_guide/helpers/file_helper.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html index dd935ebd..ce809e94 100644 --- a/user_guide/helpers/form_helper.html +++ b/user_guide/helpers/form_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html index 92bfdfb2..a8277feb 100644 --- a/user_guide/helpers/html_helper.html +++ b/user_guide/helpers/html_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/inflector_helper.html b/user_guide/helpers/inflector_helper.html index d7fa959e..66982e8b 100644 --- a/user_guide/helpers/inflector_helper.html +++ b/user_guide/helpers/inflector_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/language_helper.html b/user_guide/helpers/language_helper.html index 1102d7a3..073c368d 100644 --- a/user_guide/helpers/language_helper.html +++ b/user_guide/helpers/language_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/number_helper.html b/user_guide/helpers/number_helper.html index 1ee7cbbd..c48987e6 100644 --- a/user_guide/helpers/number_helper.html +++ b/user_guide/helpers/number_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/path_helper.html b/user_guide/helpers/path_helper.html index 103690cc..00f4aa2e 100644 --- a/user_guide/helpers/path_helper.html +++ b/user_guide/helpers/path_helper.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/security_helper.html b/user_guide/helpers/security_helper.html index 7343da15..16d5c51f 100644 --- a/user_guide/helpers/security_helper.html +++ b/user_guide/helpers/security_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/smiley_helper.html b/user_guide/helpers/smiley_helper.html index 6f1fa591..8bdd1df2 100644 --- a/user_guide/helpers/smiley_helper.html +++ b/user_guide/helpers/smiley_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/string_helper.html b/user_guide/helpers/string_helper.html index 31412403..3d7ba1c5 100644 --- a/user_guide/helpers/string_helper.html +++ b/user_guide/helpers/string_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/text_helper.html b/user_guide/helpers/text_helper.html index 496eccb7..9f0d22ff 100644 --- a/user_guide/helpers/text_helper.html +++ b/user_guide/helpers/text_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/typography_helper.html b/user_guide/helpers/typography_helper.html index e7bd473a..a6bd809a 100644 --- a/user_guide/helpers/typography_helper.html +++ b/user_guide/helpers/typography_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/helpers/xml_helper.html b/user_guide/helpers/xml_helper.html index 0dbe5577..f410b211 100644 --- a/user_guide/helpers/xml_helper.html +++ b/user_guide/helpers/xml_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/index.html b/user_guide/index.html index bb1d2162..ac6d0f7f 100644 --- a/user_guide/index.html +++ b/user_guide/index.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/downloads.html b/user_guide/installation/downloads.html index f36b2bc0..5420dec8 100644 --- a/user_guide/installation/downloads.html +++ b/user_guide/installation/downloads.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/index.html b/user_guide/installation/index.html index 5e8ab388..f01c8b8d 100644 --- a/user_guide/installation/index.html +++ b/user_guide/installation/index.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/troubleshooting.html b/user_guide/installation/troubleshooting.html index 943e2d80..e79eb6a9 100644 --- a/user_guide/installation/troubleshooting.html +++ b/user_guide/installation/troubleshooting.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_120.html b/user_guide/installation/upgrade_120.html index 357f68bb..2b3d066c 100644 --- a/user_guide/installation/upgrade_120.html +++ b/user_guide/installation/upgrade_120.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_130.html b/user_guide/installation/upgrade_130.html index 7ad26bbf..dd146561 100644 --- a/user_guide/installation/upgrade_130.html +++ b/user_guide/installation/upgrade_130.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_131.html b/user_guide/installation/upgrade_131.html index bc624261..202468da 100644 --- a/user_guide/installation/upgrade_131.html +++ b/user_guide/installation/upgrade_131.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_132.html b/user_guide/installation/upgrade_132.html index beef9b27..99f8fd3a 100644 --- a/user_guide/installation/upgrade_132.html +++ b/user_guide/installation/upgrade_132.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_133.html b/user_guide/installation/upgrade_133.html index 4d61ac60..b9b7a7fd 100644 --- a/user_guide/installation/upgrade_133.html +++ b/user_guide/installation/upgrade_133.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_140.html b/user_guide/installation/upgrade_140.html index 721d7069..50891b91 100644 --- a/user_guide/installation/upgrade_140.html +++ b/user_guide/installation/upgrade_140.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_141.html b/user_guide/installation/upgrade_141.html index 7c81d052..afa8018b 100644 --- a/user_guide/installation/upgrade_141.html +++ b/user_guide/installation/upgrade_141.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_150.html b/user_guide/installation/upgrade_150.html index f622ea31..f910aa03 100644 --- a/user_guide/installation/upgrade_150.html +++ b/user_guide/installation/upgrade_150.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_152.html b/user_guide/installation/upgrade_152.html index d350aae7..55e43f72 100644 --- a/user_guide/installation/upgrade_152.html +++ b/user_guide/installation/upgrade_152.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_153.html b/user_guide/installation/upgrade_153.html index 50c6970e..3e6af7a3 100644 --- a/user_guide/installation/upgrade_153.html +++ b/user_guide/installation/upgrade_153.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_154.html b/user_guide/installation/upgrade_154.html index 90abaf30..627fa089 100644 --- a/user_guide/installation/upgrade_154.html +++ b/user_guide/installation/upgrade_154.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_160.html b/user_guide/installation/upgrade_160.html index 16c53eb4..70e589cc 100644 --- a/user_guide/installation/upgrade_160.html +++ b/user_guide/installation/upgrade_160.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_161.html b/user_guide/installation/upgrade_161.html index b167f1da..40877369 100644 --- a/user_guide/installation/upgrade_161.html +++ b/user_guide/installation/upgrade_161.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_162.html b/user_guide/installation/upgrade_162.html index 015b7da7..d6719084 100644 --- a/user_guide/installation/upgrade_162.html +++ b/user_guide/installation/upgrade_162.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_163.html b/user_guide/installation/upgrade_163.html index a1c3c8ff..cdf6bdf6 100644 --- a/user_guide/installation/upgrade_163.html +++ b/user_guide/installation/upgrade_163.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_170.html b/user_guide/installation/upgrade_170.html index a0e12c67..7c67f912 100644 --- a/user_guide/installation/upgrade_170.html +++ b/user_guide/installation/upgrade_170.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_171.html b/user_guide/installation/upgrade_171.html index 052af69f..014b2c58 100644 --- a/user_guide/installation/upgrade_171.html +++ b/user_guide/installation/upgrade_171.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_172.html b/user_guide/installation/upgrade_172.html index 97145329..961f3cae 100644 --- a/user_guide/installation/upgrade_172.html +++ b/user_guide/installation/upgrade_172.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_200.html b/user_guide/installation/upgrade_200.html index 9f9dce7d..b5d6e75e 100644 --- a/user_guide/installation/upgrade_200.html +++ b/user_guide/installation/upgrade_200.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_201.html b/user_guide/installation/upgrade_201.html index 036ef7c0..7edd0ba6 100644 --- a/user_guide/installation/upgrade_201.html +++ b/user_guide/installation/upgrade_201.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_202.html b/user_guide/installation/upgrade_202.html index b6c62b4d..9aaa561e 100644 --- a/user_guide/installation/upgrade_202.html +++ b/user_guide/installation/upgrade_202.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrade_203.html b/user_guide/installation/upgrade_203.html index 7dbc907e..2a0ab52b 100644 --- a/user_guide/installation/upgrade_203.html +++ b/user_guide/installation/upgrade_203.html @@ -3,7 +3,7 @@ -Upgrading from 2.0.2 to 2.0.3 : CodeIgniter User Guide +Upgrading from 2.0.2 to 2.1.0 : CodeIgniter User Guide @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      @@ -42,7 +42,7 @@ CodeIgniter Home  ›  User Guide Home  ›  -Upgrading from 2.0.2 to 2.0.3 +Upgrading from 2.0.2 to 2.1.0
      Search User Guide   
      @@ -55,7 +55,7 @@
      -

      Upgrading from 2.0.2 to 2.0.3

      +

      Upgrading from 2.0.2 to 2.1.0

      Before performing an update you should take your site offline by replacing the index.php file with a static one.

      diff --git a/user_guide/installation/upgrade_b11.html b/user_guide/installation/upgrade_b11.html index 7cf06cd9..dc3c1f07 100644 --- a/user_guide/installation/upgrade_b11.html +++ b/user_guide/installation/upgrade_b11.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      diff --git a/user_guide/installation/upgrading.html b/user_guide/installation/upgrading.html index 58a45ee9..d69b6bc9 100644 --- a/user_guide/installation/upgrading.html +++ b/user_guide/installation/upgrading.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter User Guide Version 2.0.3

      CodeIgniter User Guide Version 2.1.0

      @@ -60,7 +60,7 @@

      Upgrading From a Previous Version

      Please read the upgrade notes corresponding to the version you are upgrading from.

        -
      • Upgrading from 2.0.2 to 2.0.3
      • +
      • Upgrading from 2.0.2 to 2.1.0
      • Upgrading from 2.0.1 to 2.0.2
      • Upgrading from 2.0 to 2.0.1
      • Upgrading from 1.7.2 to 2.0
      • diff --git a/user_guide/libraries/benchmark.html b/user_guide/libraries/benchmark.html index c7b7ec9a..602e6fac 100644 --- a/user_guide/libraries/benchmark.html +++ b/user_guide/libraries/benchmark.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/caching.html b/user_guide/libraries/caching.html index 9b503f6d..9808aaa5 100644 --- a/user_guide/libraries/caching.html +++ b/user_guide/libraries/caching.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/calendar.html b/user_guide/libraries/calendar.html index 724c08f8..2abc4397 100644 --- a/user_guide/libraries/calendar.html +++ b/user_guide/libraries/calendar.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/cart.html b/user_guide/libraries/cart.html index f1e8473e..b867b709 100644 --- a/user_guide/libraries/cart.html +++ b/user_guide/libraries/cart.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/config.html b/user_guide/libraries/config.html index d522bbc5..08b612e7 100644 --- a/user_guide/libraries/config.html +++ b/user_guide/libraries/config.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/email.html b/user_guide/libraries/email.html index d246254a..7fc56d55 100644 --- a/user_guide/libraries/email.html +++ b/user_guide/libraries/email.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/encryption.html b/user_guide/libraries/encryption.html index 5c64127c..6ec629f9 100644 --- a/user_guide/libraries/encryption.html +++ b/user_guide/libraries/encryption.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html index a88c6722..2cb1ef5e 100644 --- a/user_guide/libraries/file_uploading.html +++ b/user_guide/libraries/file_uploading.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/form_validation.html b/user_guide/libraries/form_validation.html index d9d8a450..2028bcd2 100644 --- a/user_guide/libraries/form_validation.html +++ b/user_guide/libraries/form_validation.html @@ -27,7 +27,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html index 6c7ed5c6..3dbb0530 100644 --- a/user_guide/libraries/ftp.html +++ b/user_guide/libraries/ftp.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/image_lib.html b/user_guide/libraries/image_lib.html index 475f02a5..1caf791d 100644 --- a/user_guide/libraries/image_lib.html +++ b/user_guide/libraries/image_lib.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html index 311f76ee..cfb0d5e1 100644 --- a/user_guide/libraries/input.html +++ b/user_guide/libraries/input.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/javascript.html b/user_guide/libraries/javascript.html index 09530e24..3dda1fd6 100644 --- a/user_guide/libraries/javascript.html +++ b/user_guide/libraries/javascript.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/language.html b/user_guide/libraries/language.html index 1f670ea4..a9afcef9 100644 --- a/user_guide/libraries/language.html +++ b/user_guide/libraries/language.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html index af27176a..53440c53 100644 --- a/user_guide/libraries/loader.html +++ b/user_guide/libraries/loader.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/migration.html b/user_guide/libraries/migration.html new file mode 100644 index 00000000..ed99044d --- /dev/null +++ b/user_guide/libraries/migration.html @@ -0,0 +1,176 @@ + + + + + +Migration Class : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +

        CodeIgniter User Guide Version 2.1.0

        +
        + + + + + + + + + +
        + + +
        + + + +
        + + +

        Migration Class

        + +

        Migrations are a convenient way for you to alter your database in a structured and organized manner. You could edit fragments of SQL by hand but you would then be responsible for telling other developers that they need to go and run them. You’d also have to keep track of which changes need to be run against the production machines next time you deploy.

        + +

        The database table migration tracks which migrations have already been run so all you have to do is update your application files and call $this->migrate->current() to work out which migrations should be run. The current version is found in config/migration.php.

        + +

        Create a Migration

        + +

        This will be the first migration for a new site which has a blog. All migrations go in the folder application/migrations/ and have names such as: 001_add_blog.php.

        + +
        +defined('BASEPATH') OR exit('No direct script access allowed');
        +
        +class Migration_Add_blog extends CI_Migration {
        +
        +	public function up()
        +	{
        +		$this->dbforge->add_field(array(
        +			'blog_id' => array(
        +				'type' => 'INT',
        +				'constraint' => 5,
        +				'unsigned' => TRUE,
        +				'auto_increment' => TRUE
        +			),
        +			'blog_title' => array(
        +				'type' => 'VARCHAR',
        +				'constraint' => '100',
        +			),
        +			'blog_description' => array(
        +				'type' => 'TEXT',
        +				'null' => TRUE,
        +			),
        +		));
        +		
        +		$this->dbforge->create_table('blog');
        +	}
        +
        +	public function down()
        +	{
        +		$this->dbforge->drop_table('blog');
        +	}
        +
        + +

        Then in application/config/migration.php set $config['migration_version'] = 1;. + +

        Usage Example

        + +

        In this example some simple code is placed in application/controllers/migrate.php to update the schema.

        + +
        +$this->load->library('migration');
        +
        +if ( ! $this->migration->current())
        +{
        +	show_error($this->migration->error_string());
        +}
        +
        + + +

        Function Reference

        + +

        $this->migration->current()

        + +

        The current migration is whatever is set for $config['migration_version'] in application/config/migration.php.

        + + +

        $this->migration->latest()

        + +

        This works much the same way as current() but instead of looking for the $config['migration_version'] the Migration class will use the very newest migration found in the filesystem.

        + +

        $this->migration->version()

        + +

        Version can be used to roll back changes or step forwards programmatically to specific versions. It works just like current but ignores $config['migration_version'].

        + +
        +$this->load->library('migration');
        +
        +$this->migration->version(5);
        +
        + +

        Migration Preferences

        + +

        The following is a list of all the config options for migrations.

        + + + + + + + + + + + + + + + +
        PreferenceDefault ValueOptionsDescription
        migration_enabledFALSETRUE / FALSEEnable or disable migrations.
        migration_version0NoneThe current version your database should use.
        migration_pathAPPPATH.'migrations/'NoneThe path to your migrations folder.
        + + +
        + + + + + + + \ No newline at end of file diff --git a/user_guide/libraries/output.html b/user_guide/libraries/output.html index 7361d796..77fe464c 100644 --- a/user_guide/libraries/output.html +++ b/user_guide/libraries/output.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/pagination.html b/user_guide/libraries/pagination.html index 19655544..b5f971f5 100644 --- a/user_guide/libraries/pagination.html +++ b/user_guide/libraries/pagination.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/parser.html b/user_guide/libraries/parser.html index b8a53452..f449145a 100644 --- a/user_guide/libraries/parser.html +++ b/user_guide/libraries/parser.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/security.html b/user_guide/libraries/security.html index dd62a438..ad1d9ae8 100644 --- a/user_guide/libraries/security.html +++ b/user_guide/libraries/security.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/sessions.html b/user_guide/libraries/sessions.html index e09c31db..dfb73249 100644 --- a/user_guide/libraries/sessions.html +++ b/user_guide/libraries/sessions.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html index 1f34dd9e..003916ef 100644 --- a/user_guide/libraries/table.html +++ b/user_guide/libraries/table.html @@ -27,7 +27,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/trackback.html b/user_guide/libraries/trackback.html index a2912a59..03515846 100644 --- a/user_guide/libraries/trackback.html +++ b/user_guide/libraries/trackback.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/typography.html b/user_guide/libraries/typography.html index cd287933..12be119c 100644 --- a/user_guide/libraries/typography.html +++ b/user_guide/libraries/typography.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/unit_testing.html b/user_guide/libraries/unit_testing.html index 5ebec0cb..7d27ff1d 100644 --- a/user_guide/libraries/unit_testing.html +++ b/user_guide/libraries/unit_testing.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/uri.html b/user_guide/libraries/uri.html index 0e1c26f1..f04bb9f1 100644 --- a/user_guide/libraries/uri.html +++ b/user_guide/libraries/uri.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/user_agent.html b/user_guide/libraries/user_agent.html index e1d3640d..8b3dcee6 100644 --- a/user_guide/libraries/user_agent.html +++ b/user_guide/libraries/user_agent.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html index 3635c221..bb939dff 100644 --- a/user_guide/libraries/xmlrpc.html +++ b/user_guide/libraries/xmlrpc.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/libraries/zip.html b/user_guide/libraries/zip.html index 21cf8017..53fc71ef 100644 --- a/user_guide/libraries/zip.html +++ b/user_guide/libraries/zip.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/license.html b/user_guide/license.html index a0d694f2..f9769a41 100644 --- a/user_guide/license.html +++ b/user_guide/license.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/overview/appflow.html b/user_guide/overview/appflow.html index fbc68fab..61bf907a 100644 --- a/user_guide/overview/appflow.html +++ b/user_guide/overview/appflow.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/overview/at_a_glance.html b/user_guide/overview/at_a_glance.html index 641c04b2..7e93bd2a 100644 --- a/user_guide/overview/at_a_glance.html +++ b/user_guide/overview/at_a_glance.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/overview/cheatsheets.html b/user_guide/overview/cheatsheets.html index b7b10b90..60e65522 100644 --- a/user_guide/overview/cheatsheets.html +++ b/user_guide/overview/cheatsheets.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/overview/features.html b/user_guide/overview/features.html index 5f71c508..d1d5c8c2 100644 --- a/user_guide/overview/features.html +++ b/user_guide/overview/features.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/overview/getting_started.html b/user_guide/overview/getting_started.html index 2b6b3f28..ad6fa01e 100644 --- a/user_guide/overview/getting_started.html +++ b/user_guide/overview/getting_started.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/overview/goals.html b/user_guide/overview/goals.html index 6acaa65a..f2263c7a 100644 --- a/user_guide/overview/goals.html +++ b/user_guide/overview/goals.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/overview/index.html b/user_guide/overview/index.html index 08e61e28..f295d4e8 100644 --- a/user_guide/overview/index.html +++ b/user_guide/overview/index.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/overview/mvc.html b/user_guide/overview/mvc.html index 4721cbf6..4aebb109 100644 --- a/user_guide/overview/mvc.html +++ b/user_guide/overview/mvc.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/tutorial/conclusion.html b/user_guide/tutorial/conclusion.html index ccf89175..9cf14674 100644 --- a/user_guide/tutorial/conclusion.html +++ b/user_guide/tutorial/conclusion.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/tutorial/create_news_items.html b/user_guide/tutorial/create_news_items.html index 48c82c79..26b1ed10 100644 --- a/user_guide/tutorial/create_news_items.html +++ b/user_guide/tutorial/create_news_items.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/tutorial/hard_coded_pages.html b/user_guide/tutorial/hard_coded_pages.html index 408634a7..b34e9f1b 100644 --- a/user_guide/tutorial/hard_coded_pages.html +++ b/user_guide/tutorial/hard_coded_pages.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/tutorial/index.html b/user_guide/tutorial/index.html index 4f665fe0..65075fb2 100644 --- a/user_guide/tutorial/index.html +++ b/user_guide/tutorial/index.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/tutorial/news_section.html b/user_guide/tutorial/news_section.html index b2d88318..cf3377ff 100644 --- a/user_guide/tutorial/news_section.html +++ b/user_guide/tutorial/news_section.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        diff --git a/user_guide/tutorial/static_pages.html b/user_guide/tutorial/static_pages.html index 26c8306e..da2c58cd 100644 --- a/user_guide/tutorial/static_pages.html +++ b/user_guide/tutorial/static_pages.html @@ -28,7 +28,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        From 5543fd7ba20a1ddc9bdd0fb9505c1de310e9b833 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 01:55:56 +0100 Subject: [PATCH 028/106] Added long missing Migration documentation. --- application/config/migration.php | 5 ++--- user_guide/nav/nav.js | 1 + user_guide/toc.html | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/application/config/migration.php b/application/config/migration.php index dba87001..afa26456 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -4,9 +4,8 @@ | 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. +| Migrations are disabled by default but should be enabled +| whenever you intend to do a schema migration. | */ $config['migration_enabled'] = FALSE; diff --git a/user_guide/nav/nav.js b/user_guide/nav/nav.js index bc668ec2..b9b6e094 100644 --- a/user_guide/nav/nav.js +++ b/user_guide/nav/nav.js @@ -103,6 +103,7 @@ function create_menu(basepath) '
      • Javascript Class
      • ' + '
      • Loader Class
      • ' + '
      • Language Class
      • ' + + '
      • Migration Class
      • ' + '
      • Output Class
      • ' + '
      • Pagination Class
      • ' + '
      • Security Class
      • ' + diff --git a/user_guide/toc.html b/user_guide/toc.html index bd6aaf51..01b5a7b9 100644 --- a/user_guide/toc.html +++ b/user_guide/toc.html @@ -29,7 +29,7 @@
        - +

        CodeIgniter User Guide Version 2.0.3

        CodeIgniter User Guide Version 2.1.0

        @@ -157,6 +157,7 @@

        Class Reference

      • Javascript Class
      • Loader Class
      • Language Class
      • +
      • Migration Class
      • Output Class
      • Pagination Class
      • Security Class
      • From c53eb99a7cc5a49d2de7e96445146d88cf873f90 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 01:59:29 +0100 Subject: [PATCH 029/106] Removed PEAR snipe. --- user_guide/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/user_guide/index.html b/user_guide/index.html index ac6d0f7f..fa90983e 100644 --- a/user_guide/index.html +++ b/user_guide/index.html @@ -77,7 +77,6 @@

        Who is CodeIgniter For?

      • You want a framework that requires nearly zero configuration.
      • You want a framework that does not require you to use the command line.
      • You want a framework that does not require you to adhere to restrictive coding rules.
      • -
      • You are not interested in large-scale monolithic libraries like PEAR.
      • You do not want to be forced to learn a templating language (although a template parser is optionally available if you desire one).
      • You eschew complexity, favoring simple solutions.
      • You need clear, thorough documentation.
      • From 9744670222ba409c05a857c61daf0a0a5fac8774 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 02:03:03 +0100 Subject: [PATCH 030/106] Removed a bunch of PHP 5 specific messages from FTP documentation. --- user_guide/libraries/ftp.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html index 3dbb0530..175efe19 100644 --- a/user_guide/libraries/ftp.html +++ b/user_guide/libraries/ftp.html @@ -74,7 +74,7 @@

        Initializing the Class

        Usage Examples

        In this example a connection is opened to the FTP server, and a local file is read and uploaded in ASCII mode. The -file permissions are set to 755. Note: Setting permissions requires PHP 5.

        +file permissions are set to 755.

        $this->load->library('ftp');
        @@ -185,8 +185,7 @@

        $this->ftp->upload()

        Mode options are:  ascii, binary, and auto (the default). If auto is used it will base the mode on the file extension of the source file.

        -

        Permissions are available if you are running PHP 5 and can be passed as an octal value in the fourth parameter.

        - +

        Permissions can be passed as an octal value in the fourth parameter.

        $this->ftp->download()

        @@ -267,7 +266,7 @@

        $this->ftp->mirror()

        $this->ftp->mkdir()

        Lets you create a directory on your server. Supply the path ending in the folder name you wish to create, with a trailing slash. -Permissions can be set by passed an octal value in the second parameter (if you are running PHP 5).

        +Permissions can be set by passed an octal value in the second parameter.

        // Creates a folder named "bar"
        From fd82e02ee3636ed7feeedfeefeef794cf77c3a70 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Sun, 4 Sep 2011 13:55:28 +0100 Subject: [PATCH 031/106] Removed reference is IS_CLI in the documentation, which should have been $this->input->is_cli_request() --- user_guide/general/cli.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide/general/cli.html b/user_guide/general/cli.html index 70ab1380..5dda24b5 100644 --- a/user_guide/general/cli.html +++ b/user_guide/general/cli.html @@ -83,7 +83,7 @@

        Why run via the command-line?

        • Run your cron-jobs without needing to use wget or curl
        • -
        • Make your cron-jobs inaccessible from being loaded in the URL by checking for IS_CLI
        • +
        • Make your cron-jobs inaccessible from being loaded in the URL by checking for $this->input->is_cli_request()
        • Make interactive "tasks" that can do things like set permissions, prune cache folders, run backups, etc.
        • Integrate with other applications in other languages. For example, a random C++ script could call one command and run code in your models!
        From 0a4fe3128341264999e0826b4fbb55cfa441a619 Mon Sep 17 00:00:00 2001 From: mmestrovic Date: Thu, 1 Sep 2011 03:30:43 +0300 Subject: [PATCH 032/106] Updated download links for current and older versions. --- user_guide/installation/downloads.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/user_guide/installation/downloads.html b/user_guide/installation/downloads.html index 5420dec8..074fd8bc 100644 --- a/user_guide/installation/downloads.html +++ b/user_guide/installation/downloads.html @@ -58,7 +58,9 @@

        Downloading CodeIgniter

          -
        • CodeIgniter V 2.0.2 (Current version)
        • +
        • CodeIgniter V 2.1.0 (Current version)
        • +
        • CodeIgniter V 2.0.3
        • +
        • CodeIgniter V 2.0.2
        • CodeIgniter V 2.0.1
        • CodeIgniter V 2.0.0
        • CodeIgniter V 1.7.3
        • From 33d0502628df3e45b26d2a4075929016b2a7f8a8 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Sat, 20 Aug 2011 16:53:52 -0500 Subject: [PATCH 033/106] Removing duplicate instructions in the 2.0.3 update instructions. --- user_guide/installation/upgrade_203.html | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/user_guide/installation/upgrade_203.html b/user_guide/installation/upgrade_203.html index 2a0ab52b..3aceb7ff 100644 --- a/user_guide/installation/upgrade_203.html +++ b/user_guide/installation/upgrade_203.html @@ -65,25 +65,21 @@

          Step 1: Update your CodeIgniter files

          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.

          Note: If you have any custom developed files in these folders please make copies of them first.

          - -

          Step 2: Update CodeIgniter files

          - -

          Replace the files and directories in your "system" folder with the new versions:

          -

          Step 3: Update your main index.php file

          +

          Step 2: Update your main index.php file

          If you are running a stock index.php file simply replace your version with the new one.

          If your index.php file has internal modifications, please add your modifications to the new file and use it.

          -

          Step 4: Replace config/user_agents.php

          +

          Step 3: Replace config/user_agents.php

          This config file has been updated to contain more user agent types, please copy it to application/config/user_agents.php.

          -

          Step 5: Change references of the EXT constant to ".php"

          +

          Step 4: Change references of the EXT constant to ".php"

          Note: The EXT Constant has been marked as deprecated, but has not been removed from the application. You are encouraged to make the changes sooner rather than later.

          -

          Step 6: Remove APPPATH.'third_party' from autoload.php

          +

          Step 5: Remove APPPATH.'third_party' from autoload.php

          Open application/autoload.php, and look for the following:

          From 7fdfd219ab64a8dc8436a2897cea3982ff8253c5 Mon Sep 17 00:00:00 2001 From: mmestrovic Date: Wed, 14 Sep 2011 01:26:15 +0300 Subject: [PATCH 034/106] Added link: "Upgrading from 2.0.3 to 2.1.0" --- user_guide/installation/upgrading.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user_guide/installation/upgrading.html b/user_guide/installation/upgrading.html index d69b6bc9..c3f5ae6d 100644 --- a/user_guide/installation/upgrading.html +++ b/user_guide/installation/upgrading.html @@ -60,7 +60,8 @@

          Upgrading From a Previous Version

          Please read the upgrade notes corresponding to the version you are upgrading from.

            -
          • Upgrading from 2.0.2 to 2.1.0
          • +
          • Upgrading from 2.0.3 to 2.1.0
          • +
          • Upgrading from 2.0.2 to 2.0.3
          • Upgrading from 2.0.1 to 2.0.2
          • Upgrading from 2.0 to 2.0.1
          • Upgrading from 1.7.2 to 2.0
          • From 1e17cb655979909725e9fd58bbad1b136f8ebcc4 Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 27 Oct 2011 19:45:11 +0900 Subject: [PATCH 035/106] fix manual merge mistakes in user guide --- user_guide/installation/upgrade_203.html | 2 +- user_guide/libraries/form_validation.html | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/user_guide/installation/upgrade_203.html b/user_guide/installation/upgrade_203.html index 04899832..101dcfb7 100644 --- a/user_guide/installation/upgrade_203.html +++ b/user_guide/installation/upgrade_203.html @@ -28,7 +28,7 @@
            - +

            CodeIgniter User Guide Version 2.0.3

            CodeIgniter User Guide Version 2.1.0

            diff --git a/user_guide/libraries/form_validation.html b/user_guide/libraries/form_validation.html index 40d8b3bc..2028bcd2 100644 --- a/user_guide/libraries/form_validation.html +++ b/user_guide/libraries/form_validation.html @@ -514,13 +514,7 @@

            Callbacks: Your own Validation Functions

            class Form extends CI_Controller { -<<<<<<< HEAD -class Form extends CI_Controller { - - function index() -======= public function index() ->>>>>>> remotes/upstream/release/2.1.0 { $this->load->helper(array('form', 'url')); @@ -529,11 +523,7 @@

            Callbacks: Your own Validation Functions

            $this->form_validation->set_rules('username', 'Username', 'callback_username_check'); $this->form_validation->set_rules('password', 'Password', 'required'); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required'); -<<<<<<< HEAD - $this->form_validation->set_rules('email', 'Email', 'required'); -======= $this->form_validation->set_rules('email', 'Email', 'required|is_unique[users.email]'); ->>>>>>> remotes/upstream/release/2.1.0 if ($this->form_validation->run() == FALSE) { @@ -545,11 +535,7 @@

            Callbacks: Your own Validation Functions

            } } -<<<<<<< HEAD - function username_check($str) -======= public function username_check($str) ->>>>>>> remotes/upstream/release/2.1.0 { if ($str == 'test') { @@ -958,8 +944,6 @@

            Rule Reference

            -<<<<<<< HEAD -======= is_unique Yes Returns FALSE if the form element is not unique to the table and field name in the parameter. @@ -967,7 +951,6 @@

            Rule Reference

            ->>>>>>> remotes/upstream/release/2.1.0 min_length Yes Returns FALSE if the form element is shorter then the parameter value. From f7149f2562c6173f617b32538f438a1be3a4398d Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 12:42:01 +0100 Subject: [PATCH 036/106] Added upgrade guide for 2.1.0. --- user_guide/installation/upgrade_203.html | 4 +- user_guide/installation/upgrade_210.html | 89 ++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 user_guide/installation/upgrade_210.html diff --git a/user_guide/installation/upgrade_203.html b/user_guide/installation/upgrade_203.html index 3aceb7ff..d0d37677 100644 --- a/user_guide/installation/upgrade_203.html +++ b/user_guide/installation/upgrade_203.html @@ -42,7 +42,7 @@ CodeIgniter Home  ›  User Guide Home  ›  -Upgrading from 2.0.2 to 2.1.0 +Upgrading from 2.0.2 to 2.0.3
            Search User Guide   
            @@ -55,7 +55,7 @@
            -

            Upgrading from 2.0.2 to 2.1.0

            +

            Upgrading from 2.0.2 to 2.0.3

            Before performing an update you should take your site offline by replacing the index.php file with a static one.

            diff --git a/user_guide/installation/upgrade_210.html b/user_guide/installation/upgrade_210.html new file mode 100644 index 00000000..7edab2e7 --- /dev/null +++ b/user_guide/installation/upgrade_210.html @@ -0,0 +1,89 @@ + + + + + +Upgrading from 2.0.2 to 2.1.0 : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
            + + + + + +

            CodeIgniter User Guide Version 2.1.0

            +
            + + + + + + + + + +
            + + +
            + + + +
            + +

            Upgrading from 2.0.3 to 2.1.0

            + +

            Before performing an update you should take your site offline by replacing the index.php file with a static one.

            + +

            Step 1: Update your CodeIgniter files

            + +

            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.

            + +

            Note: If you have any custom developed files in these folders please make copies of them first.

            + +

            Step 2: Replace config/user_agents.php

            + +

            This config file has been updated to contain more user agent types, please copy it to application/config/user_agents.php.

            + + +
            + + + + + + + \ No newline at end of file From f2bae2cb50d040e17ca0323b394a60499e639834 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 12:46:52 +0100 Subject: [PATCH 037/106] Corrected 2.0.3 to 2.1.0. --- user_guide/installation/upgrade_203.html | 2 +- user_guide/installation/upgrade_210.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/user_guide/installation/upgrade_203.html b/user_guide/installation/upgrade_203.html index d0d37677..d4b703af 100644 --- a/user_guide/installation/upgrade_203.html +++ b/user_guide/installation/upgrade_203.html @@ -3,7 +3,7 @@ -Upgrading from 2.0.2 to 2.1.0 : CodeIgniter User Guide +Upgrading from 2.0.2 to 2.0.3 : CodeIgniter User Guide diff --git a/user_guide/installation/upgrade_210.html b/user_guide/installation/upgrade_210.html index 7edab2e7..d9a7213a 100644 --- a/user_guide/installation/upgrade_210.html +++ b/user_guide/installation/upgrade_210.html @@ -3,7 +3,7 @@ -Upgrading from 2.0.2 to 2.1.0 : CodeIgniter User Guide +Upgrading from 2.0.3 to 2.1.0 : CodeIgniter User Guide @@ -42,7 +42,7 @@ CodeIgniter Home  ›  User Guide Home  ›  -Upgrading from 2.0.2 to 2.1.0 +Upgrading from 2.0.3 to 2.1.0
            Search User Guide   
            From 36674a69d7306e82c533298f14a0002302623341 Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 27 Oct 2011 20:48:47 +0900 Subject: [PATCH 038/106] update user_guide_ja/CREDITS.txt --- user_guide_ja/CREDITS.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/user_guide_ja/CREDITS.txt b/user_guide_ja/CREDITS.txt index 47a76faa..eb86d72f 100644 --- a/user_guide_ja/CREDITS.txt +++ b/user_guide_ja/CREDITS.txt @@ -2,6 +2,9 @@ CodeIgniter User Guide Japanese Edition CodeIgniter Users Group in Japan, Japanese Translation Team +Version 2.1.0 + * Kenji Suzuki + Version 2.0.3 * Kenji Suzuki * Hayato Nasu From 9f5316e96ea635a15aa5906bfd2abaea19520970 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 14 Sep 2011 12:25:14 -0400 Subject: [PATCH 039/106] Fixed LIKE statement escaping issues --- system/database/drivers/pdo/pdo_driver.php | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index 19e069b0..4c911aa6 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -28,6 +28,7 @@ * @author ExpressionEngine Dev Team * @link http://codeigniter.com/user_guide/database/ */ + class CI_DB_pdo_driver extends CI_DB { var $dbdriver = 'pdo'; @@ -36,7 +37,7 @@ class CI_DB_pdo_driver extends CI_DB { var $_escape_char = ''; var $_like_escape_str; var $_like_escape_chr; - + /** * The syntax to count rows is slightly different across different @@ -50,7 +51,7 @@ class CI_DB_pdo_driver extends CI_DB { function __construct($params) { parent::__construct($params); - + // clause and character used for LIKE escape sequences if (strpos($this->hostname, 'mysql') !== FALSE) { @@ -67,7 +68,7 @@ function __construct($params) $this->_like_escape_str = " ESCAPE '%s' "; $this->_like_escape_chr = '!'; } - + $this->hostname = $this->hostname . ";dbname=".$this->database; $this->trans_enabled = FALSE; @@ -179,7 +180,7 @@ function _execute($sql) { $sql = $this->_prep_query($sql); $result_id = $this->conn_id->query($sql); - + if (is_object($result_id)) { $this->affect_rows = $result_id->rowCount(); @@ -188,7 +189,7 @@ function _execute($sql) { $this->affect_rows = 0; } - + return $result_id; } @@ -308,16 +309,16 @@ function escape_str($str, $like = FALSE) return $str; } - + //Escape the string $str = $this->conn_id->quote($str); - + //If there are duplicated quotes, trim them away if (strpos($str, "'") === 0) { $str = substr($str, 1, -1); } - + // escape LIKE condition wildcards if ($like === TRUE) { @@ -519,7 +520,7 @@ function _escape_identifiers($item) if (strpos($item, '.') !== FALSE) { $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; - + } else { @@ -569,7 +570,7 @@ function _insert($table, $keys, $values) { return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; } - + // -------------------------------------------------------------------- /** @@ -622,7 +623,7 @@ function _update($table, $values, $where, $orderby = array(), $limit = FALSE) return $sql; } - + // -------------------------------------------------------------------- /** @@ -764,7 +765,7 @@ function _limit($sql, $limit, $offset) { $sql .= " OFFSET ".$offset; } - + return $sql; } } From e06f2cb3700edd13426af4b66d3f2a4d0fefd080 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 13:00:00 +0100 Subject: [PATCH 040/106] Updated changelog. --- user_guide/changelog.html | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 35946a21..faa96b82 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -79,6 +79,7 @@

            Version 2.1.0

          • Database
          • @@ -88,6 +89,13 @@

            Version 2.1.0

          • Added support to set an optional parameter in your callback rules of validation using the Form Validation Library.
          • Added a Migration Library to assist with applying incremental updates to your database schema.
          • Driver children can be located in any package path.
          • + +
          + +
        • Core +
            +
          • Changed private functions in CI_URI to protected so MY_URI can override them.
          • +
          • Removed CI_CORE boolean constant from CodeIgniter.php (there are no longer Reactor and Core versions).
        @@ -97,7 +105,22 @@

        Bug fixes for 2.1.0

      • Fixed #378 Robots identified as regular browsers by the User Agent class.
      • If a config class was loaded first then a library with the same name is loaded, the config would be ignored.
      • Fixed a bug (Reactor #19) where 1) the 404_override route was being ignored in some cases, and 2) auto-loaded libraries were not available to the 404_override controller when a controller existed but the requested method did not.
      • -
      • Fixed a bug (Reactor #89) where MySQL export would fail if the table had hyphens or other non alphanumeric/underscore characters.
      • +
      • Fixed a bug (Reactor #89) where MySQL export would fail if the table had hyphens or other non alphanumeric/underscore characters.
      • +
      • Fixed a bug (#200) where MySQL queries would be malformed after calling count_all() then db->get()
      • +
      • Fixed bug #105 that stopped query errors from being logged unless database debugging was enabled
      • +
      • Fixed a bug (#181) where a mis-spelling was in the form validation language file.
      • +
      • Fixed a bug (#160) - Removed unneeded array copy in the file cache driver.
      • +
      • Fixed a bug (#150) - field_data() now correctly returns column length.
      • +
      • Fixed a bug (#8) - load_class() now looks for core classes in APPPATH first, allowing them to be replaced.
      • +
      • Fixed a bug (#24) - ODBC database driver called incorrect parent in __construct().
      • +
      • Fixed a bug (#85) - OCI8 (Oracle) database escape_str() function did not escape correct.
      • +
      • Fixed a bug (#344) - Using schema found in Saving Session Data to a Database, system would throw error "user_data does not have a default value" when deleting then creating a session.
      • +
      • Fixed a bug (#112) - OCI8 (Oracle) driver didn't pass the configured database character set when connecting.
      • +
      • Fixed a bug (#182) - OCI8 (Oracle) driver used to re-execute the statement whenever num_rows() is called.
      • +
      • Fixed a bug (#82) - WHERE clause field names in the DB update_string() method were not escaped, resulting in failed queries in some cases.
      • +
      • Fixed a bug (#89) - Fix a variable type mismatch in DB display_error() where an array is expected, but a string could be set instead.
      • +
      • Fixed a bug (#467) - Suppress warnings generated from get_magic_quotes_gpc() (deprecated in PHP 5.4)
      • +
      • Fixed a bug (#484) - First time _csrf_set_hash() is called, hash is never set to the cookie (in Security.php).
      • Fixed a bug (#60) - Added _file_mime_type() method to the File Uploading Library in order to fix a possible MIME-type injection (also fixes bug #394).
      • Fixed a bug (#537) - Support for all wav type in browser.
      • Fixed a bug (#576) - Using ini_get() function to detect if apc is enabled or not.
      • From da6aa15a41c2286ca161d036a02f6857ce060e27 Mon Sep 17 00:00:00 2001 From: Nithin Meppurathu Date: Sun, 21 Aug 2011 12:05:17 -0400 Subject: [PATCH 041/106] updated changelog and documentation for active record new 3rd argument option #none# to like clause --- user_guide/changelog.html | 3 +++ user_guide/database/active_record.html | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/user_guide/changelog.html b/user_guide/changelog.html index faa96b82..37dcaea4 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -81,6 +81,8 @@

        Version 2.1.0

      • Added a CUBRID driver to the Database Driver. Thanks to the CUBRID team for supplying this patch.
      • Added a PDO driver to the Database Driver.
      • Typecast limit and offset in the Database Driver to integers to avoid possible injection.
      • +
      • Added additional option 'none' for the optional third argument for $this->db->like() in the Database Driver. +
    • Libraries @@ -124,6 +126,7 @@

      Bug fixes for 2.1.0

    • Fixed a bug (#60) - Added _file_mime_type() method to the File Uploading Library in order to fix a possible MIME-type injection (also fixes bug #394).
    • Fixed a bug (#537) - Support for all wav type in browser.
    • Fixed a bug (#576) - Using ini_get() function to detect if apc is enabled or not.
    • +
    • Fixed a bug (#160) - Removed unneeded array copy in the file cache driver.

    Version 2.0.3

    diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index 074f869b..bd3c07d8 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -334,6 +334,13 @@

    $this->db->like();

    $this->db->like('title', 'match', 'both');
    // Produces: WHERE title LIKE '%match%'
    +If you do not want to use the wildcard (%) you can pass to the optional third argument the option 'none'. + + + $this->db->like('title', 'match', 'none');
    +// Produces: WHERE title LIKE 'match' +
    +
  • Associative array method: From 071e2fbcd775528fb69577c49eed909cb3a56300 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Wed, 10 Aug 2011 09:00:52 -0600 Subject: [PATCH 042/106] Typecast limit and offset in the Database Driver to integers. Fixes https://bitbucket.org/ellislab/codeigniter-reactor/issue/341/active-record-limit-function-have-sql#comment-597403 --- user_guide/changelog.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 37dcaea4..2552ed64 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -144,9 +144,9 @@

    Version 2.0.3

  • Added Session Class userdata to the output profiler. Additionally, added a show/hide toggle on HTTP Headers, Session Data and Config Variables.
  • Removed internal usage of the EXT constant.
  • Visual updates to the welcome_message view file and default error templates. Thanks to danijelb for the pull request.
  • -
  • Added insert_batch() function to the PostgreSQL database driver. Thanks to epallerols for the patch.
  • Added "application/x-csv" to mimes.php.
  • Fixed a bug where Email library attachments with a "." in the name would using invalid MIME-types.
  • +
  • Callback validation rules can now accept parameters like any other validation rule.
  • Helpers From 448148b0d8ed1459662cfe501197686b8a48b609 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Sat, 20 Aug 2011 14:23:14 -0500 Subject: [PATCH 043/106] Fixed a bug (#200) where MySQL queries would be malformed after calling db->count_all() then db->get() --- system/database/drivers/cubrid/cubrid_driver.php | 1 + system/database/drivers/mssql/mssql_driver.php | 1 + system/database/drivers/mysql/mysql_driver.php | 1 + system/database/drivers/mysqli/mysqli_driver.php | 1 + system/database/drivers/oci8/oci8_driver.php | 1 + system/database/drivers/odbc/odbc_driver.php | 1 + system/database/drivers/postgre/postgre_driver.php | 1 + system/database/drivers/sqlite/sqlite_driver.php | 1 + system/database/drivers/sqlsrv/sqlsrv_driver.php | 1 + 9 files changed, 9 insertions(+) diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php index 3f010924..d0114041 100644 --- a/system/database/drivers/cubrid/cubrid_driver.php +++ b/system/database/drivers/cubrid/cubrid_driver.php @@ -398,6 +398,7 @@ function count_all($table = '') } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index 65397ed8..b39bd936 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -367,6 +367,7 @@ function count_all($table = '') } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 28c75a5e..87250456 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -385,6 +385,7 @@ function count_all($table = '') } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index b1796c9d..ddcaff32 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -386,6 +386,7 @@ function count_all($table = '') } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index b4da3e96..930177e6 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -470,6 +470,7 @@ public function count_all($table = '') } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 6e4ba896..bcd7937d 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -339,6 +339,7 @@ function count_all($table = '') } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 14039688..5367f975 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -385,6 +385,7 @@ function count_all($table = '') } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index eb4e585b..0cc898b3 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -354,6 +354,7 @@ function count_all($table = '') } $row = $query->row(); + $this->_reset_select(); return (int) $row->numrows; } diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php index 1d32792c..400fd31c 100644 --- a/system/database/drivers/sqlsrv/sqlsrv_driver.php +++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php @@ -344,6 +344,7 @@ function count_all($table = '') return '0'; $row = $query->row(); + $this->_reset_select(); return $row->numrows; } From 57514b96b89431d37b3eeea283a3ae0f36ac7ef4 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 13:20:55 +0100 Subject: [PATCH 044/106] Updated changelog. --- user_guide/changelog.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 2552ed64..312e7e7c 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -110,7 +110,6 @@

    Bug fixes for 2.1.0

  • Fixed a bug (Reactor #89) where MySQL export would fail if the table had hyphens or other non alphanumeric/underscore characters.
  • Fixed a bug (#200) where MySQL queries would be malformed after calling count_all() then db->get()
  • Fixed bug #105 that stopped query errors from being logged unless database debugging was enabled
  • -
  • Fixed a bug (#181) where a mis-spelling was in the form validation language file.
  • Fixed a bug (#160) - Removed unneeded array copy in the file cache driver.
  • Fixed a bug (#150) - field_data() now correctly returns column length.
  • Fixed a bug (#8) - load_class() now looks for core classes in APPPATH first, allowing them to be replaced.
  • @@ -126,7 +125,6 @@

    Bug fixes for 2.1.0

  • Fixed a bug (#60) - Added _file_mime_type() method to the File Uploading Library in order to fix a possible MIME-type injection (also fixes bug #394).
  • Fixed a bug (#537) - Support for all wav type in browser.
  • Fixed a bug (#576) - Using ini_get() function to detect if apc is enabled or not.
  • -
  • Fixed a bug (#160) - Removed unneeded array copy in the file cache driver.
  • Version 2.0.3

    From ad4681f7889beb66f44995882c3977239eb1b3df Mon Sep 17 00:00:00 2001 From: danmontgomery Date: Sun, 21 Aug 2011 15:31:22 -0400 Subject: [PATCH 045/106] Fixed issue #150 (for mysql and mysqli), now returns the actual column length. --- .../database/drivers/mysql/mysql_driver.php | 2 +- .../database/drivers/mysql/mysql_result.php | 17 +++++++++++------ .../database/drivers/mysqli/mysqli_driver.php | 2 +- .../database/drivers/mysqli/mysqli_result.php | 19 ++++++++++++------- user_guide/changelog.html | 2 +- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 87250456..f87cfea4 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -441,7 +441,7 @@ function _list_columns($table = '') */ function _field_data($table) { - return "SELECT * FROM ".$table." LIMIT 1"; + return "DESCRIBE ".$table; } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php index 50738960..2d2905c9 100644 --- a/system/database/drivers/mysql/mysql_result.php +++ b/system/database/drivers/mysql/mysql_result.php @@ -84,14 +84,19 @@ function list_fields() function field_data() { $retval = array(); - while ($field = mysql_fetch_field($this->result_id)) + while ($field = mysql_fetch_object($this->result_id)) { + preg_match('/([a-zA-Z]+)\((\d+)\)/', $field->Type, $matches); + + $type = $matches[1]; + $length = (int)$matches[2]; + $F = new stdClass(); - $F->name = $field->name; - $F->type = $field->type; - $F->default = $field->def; - $F->max_length = $field->max_length; - $F->primary_key = $field->primary_key; + $F->name = $field->Field; + $F->type = $type; + $F->default = $field->Default; + $F->max_length = $length; + $F->primary_key = ( $field->Key == 'PRI' ? 1 : 0 ); $retval[] = $F; } diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index ddcaff32..ccd110f7 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -442,7 +442,7 @@ function _list_columns($table = '') */ function _field_data($table) { - return "SELECT * FROM ".$table." LIMIT 1"; + return "DESCRIBE ".$table; } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php index c4d8f5d5..ac863056 100644 --- a/system/database/drivers/mysqli/mysqli_result.php +++ b/system/database/drivers/mysqli/mysqli_result.php @@ -84,21 +84,26 @@ function list_fields() function field_data() { $retval = array(); - while ($field = mysqli_fetch_field($this->result_id)) + while ($field = mysqli_fetch_object($this->result_id)) { + preg_match('/([a-zA-Z]+)\((\d+)\)/', $field->Type, $matches); + + $type = $matches[1]; + $length = (int)$matches[2]; + $F = new stdClass(); - $F->name = $field->name; - $F->type = $field->type; - $F->default = $field->def; - $F->max_length = $field->max_length; - $F->primary_key = ($field->flags & MYSQLI_PRI_KEY_FLAG) ? 1 : 0; + $F->name = $field->Field; + $F->type = $type; + $F->default = $field->Default; + $F->max_length = $length; + $F->primary_key = ( $field->Key == 'PRI' ? 1 : 0 ); $retval[] = $F; } return $retval; } - + // -------------------------------------------------------------------- /** diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 312e7e7c..f2e05fae 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -111,7 +111,7 @@

    Bug fixes for 2.1.0

  • Fixed a bug (#200) where MySQL queries would be malformed after calling count_all() then db->get()
  • Fixed bug #105 that stopped query errors from being logged unless database debugging was enabled
  • Fixed a bug (#160) - Removed unneeded array copy in the file cache driver.
  • -
  • Fixed a bug (#150) - field_data() now correctly returns column length.
  • +
  • Fixed a bug (#150) - field_data() now correctly returns column length.
  • Fixed a bug (#8) - load_class() now looks for core classes in APPPATH first, allowing them to be replaced.
  • Fixed a bug (#24) - ODBC database driver called incorrect parent in __construct().
  • Fixed a bug (#85) - OCI8 (Oracle) database escape_str() function did not escape correct.
  • From 659baa9668d8650ccaa05ad3bcdc2183c9ff5397 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 13:24:53 +0100 Subject: [PATCH 046/106] Fixed issue #150 correctly. --- system/database/drivers/mysql/mysql_result.php | 6 +++--- system/database/drivers/mysqli/mysqli_result.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php index 2d2905c9..e1a6e93c 100644 --- a/system/database/drivers/mysql/mysql_result.php +++ b/system/database/drivers/mysql/mysql_result.php @@ -86,10 +86,10 @@ function field_data() $retval = array(); while ($field = mysql_fetch_object($this->result_id)) { - preg_match('/([a-zA-Z]+)\((\d+)\)/', $field->Type, $matches); + preg_match('/([a-zA-Z]+)(\(\d+\))?/', $field->Type, $matches); - $type = $matches[1]; - $length = (int)$matches[2]; + $type = (array_key_exists(1, $matches)) ? $matches[1] : NULL; + $length = (array_key_exists(2, $matches)) ? preg_replace('/[^\d]/', '', $matches[2]) : NULL; $F = new stdClass(); $F->name = $field->Field; diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php index ac863056..124d4e59 100644 --- a/system/database/drivers/mysqli/mysqli_result.php +++ b/system/database/drivers/mysqli/mysqli_result.php @@ -86,10 +86,10 @@ function field_data() $retval = array(); while ($field = mysqli_fetch_object($this->result_id)) { - preg_match('/([a-zA-Z]+)\((\d+)\)/', $field->Type, $matches); + preg_match('/([a-zA-Z]+)(\(\d+\))?/', $field->Type, $matches); - $type = $matches[1]; - $length = (int)$matches[2]; + $type = (array_key_exists(1, $matches)) ? $matches[1] : NULL; + $length = (array_key_exists(2, $matches)) ? preg_replace('/[^\d]/', '', $matches[2]) : NULL; $F = new stdClass(); $F->name = $field->Field; From 49a27745e1ba505ca72dc84f56301f7ae76d70d4 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 13:34:35 +0100 Subject: [PATCH 047/106] Changelog updated. --- user_guide/changelog.html | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/user_guide/changelog.html b/user_guide/changelog.html index f2e05fae..19e659f4 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -57,8 +57,6 @@

    Change Log

    -

    The Reactor Marker indicates items that were contributed to CodeIgniter via CodeIgniter Reactor.

    -

    Version 2.1.0

    Release Date: November 01, 2011

    @@ -91,13 +89,12 @@

    Version 2.1.0

  • Added support to set an optional parameter in your callback rules of validation using the Form Validation Library.
  • Added a Migration Library to assist with applying incremental updates to your database schema.
  • Driver children can be located in any package path.
  • -
  • Core
      -
    • Changed private functions in CI_URI to protected so MY_URI can override them.
    • -
    • Removed CI_CORE boolean constant from CodeIgniter.php (there are no longer Reactor and Core versions).
    • +
    • Changed private functions in URI Library to protected so MY_URI can override them.
    • +
    • Removed CI_CORE boolean constant from CodeIgniter.php (there are no longer different Reactor and Core versions).
  • @@ -108,23 +105,23 @@

    Bug fixes for 2.1.0

  • If a config class was loaded first then a library with the same name is loaded, the config would be ignored.
  • Fixed a bug (Reactor #19) where 1) the 404_override route was being ignored in some cases, and 2) auto-loaded libraries were not available to the 404_override controller when a controller existed but the requested method did not.
  • Fixed a bug (Reactor #89) where MySQL export would fail if the table had hyphens or other non alphanumeric/underscore characters.
  • -
  • Fixed a bug (#200) where MySQL queries would be malformed after calling count_all() then db->get()
  • +
  • Fixed a bug (#200) where MySQL queries would be malformed after calling $this->db->count_all() then $this->db->get()
  • Fixed bug #105 that stopped query errors from being logged unless database debugging was enabled
  • Fixed a bug (#160) - Removed unneeded array copy in the file cache driver.
  • Fixed a bug (#150) - field_data() now correctly returns column length.
  • Fixed a bug (#8) - load_class() now looks for core classes in APPPATH first, allowing them to be replaced.
  • Fixed a bug (#24) - ODBC database driver called incorrect parent in __construct().
  • -
  • Fixed a bug (#85) - OCI8 (Oracle) database escape_str() function did not escape correct.
  • +
  • Fixed a bug (#85) - OCI8 (Oracle) database escape_str() function did not escape correct.
  • Fixed a bug (#344) - Using schema found in Saving Session Data to a Database, system would throw error "user_data does not have a default value" when deleting then creating a session.
  • Fixed a bug (#112) - OCI8 (Oracle) driver didn't pass the configured database character set when connecting.
  • Fixed a bug (#182) - OCI8 (Oracle) driver used to re-execute the statement whenever num_rows() is called.
  • -
  • Fixed a bug (#82) - WHERE clause field names in the DB update_string() method were not escaped, resulting in failed queries in some cases.
  • -
  • Fixed a bug (#89) - Fix a variable type mismatch in DB display_error() where an array is expected, but a string could be set instead.
  • -
  • Fixed a bug (#467) - Suppress warnings generated from get_magic_quotes_gpc() (deprecated in PHP 5.4)
  • -
  • Fixed a bug (#484) - First time _csrf_set_hash() is called, hash is never set to the cookie (in Security.php).
  • -
  • Fixed a bug (#60) - Added _file_mime_type() method to the File Uploading Library in order to fix a possible MIME-type injection (also fixes bug #394).
  • +
  • Fixed a bug (#82) - WHERE clause field names in the DB update_string() method were not escaped, resulting in failed queries in some cases.
  • +
  • Fixed a bug (#89) - Fix a variable type mismatch in DB display_error() where an array is expected, but a string could be set instead.
  • +
  • Fixed a bug (#467) - Suppress warnings generated from get_magic_quotes_gpc() (deprecated in PHP 5.4)
  • +
  • Fixed a bug (#484) - First time _csrf_set_hash() is called, hash is never set to the cookie (in Security.php).
  • +
  • Fixed a bug (#60) - Added _file_mime_type() method to the File Uploading Library in order to fix a possible MIME-type injection (also fixes bug #394).
  • Fixed a bug (#537) - Support for all wav type in browser.
  • -
  • Fixed a bug (#576) - Using ini_get() function to detect if apc is enabled or not.
  • +
  • Fixed a bug (#576) - Using ini_get() function to detect if apc is enabled or not.
  • Version 2.0.3

    From 426ff851c2164651228a9a9bc10869301b19dbcc Mon Sep 17 00:00:00 2001 From: Kyle Farris Date: Mon, 29 Aug 2011 23:26:07 -0300 Subject: [PATCH 048/106] Added the 'user_data' key to the userdata property so that sessions using a database can be deleted properly when using the table schema found in the "Saving Session Data to a Database" section of the Session Class in the user guide. --- system/libraries/Session.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/libraries/Session.php b/system/libraries/Session.php index 2c8a8016..8ee08c5b 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -317,7 +317,8 @@ function sess_create() 'session_id' => md5(uniqid($sessid, TRUE)), 'ip_address' => $this->CI->input->ip_address(), 'user_agent' => substr($this->CI->input->user_agent(), 0, 120), - 'last_activity' => $this->now + 'last_activity' => $this->now, + 'user_data' => '' ); From 55027807e4826dfe722598172ab7ffbd9dc0b48c Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 25 Aug 2011 10:51:44 +0900 Subject: [PATCH 049/106] add html_escape() function to escape HTML. --- system/core/Common.php | 24 ++++++++++++++++++++++++ user_guide/changelog.html | 1 + user_guide/general/common_functions.html | 2 ++ 3 files changed, 27 insertions(+) diff --git a/system/core/Common.php b/system/core/Common.php index db9fbeb9..3d6931bc 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -536,5 +536,29 @@ function remove_invisible_characters($str, $url_encoded = TRUE) } } +// ------------------------------------------------------------------------ + +/** +* Returns HTML escaped variable +* +* @access public +* @param mixed +* @return mixed +*/ +if ( ! function_exists('html_escape')) +{ + function html_escape($var) + { + if (is_array($var)) + { + return array_map('html_escape', $var); + } + else + { + return htmlspecialchars($var, ENT_QUOTES, config_item('charset')); + } + } +} + /* End of file Common.php */ /* Location: ./system/core/Common.php */ \ No newline at end of file diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 19e659f4..11a15370 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -64,6 +64,7 @@

    Version 2.1.0

  • General Changes
  • Helpers diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html index 2751133b..f290521a 100644 --- a/user_guide/general/common_functions.html +++ b/user_guide/general/common_functions.html @@ -104,6 +104,8 @@

    remove_invisible_characters($str)

    This function prevents inserting null characters between ascii characters, like Java\0script.

    +

    html_escape($mixed)

    +

    This function provides short cut for htmlspecialchars() function. It accepts string and array. To prevent Cross Site Scripting (XSS), it is very useful.

  • From 7e81a351f3a2be38a897feac4a1f300b8a9c0032 Mon Sep 17 00:00:00 2001 From: Yoko TAMADA Date: Mon, 31 Oct 2011 01:22:09 +0900 Subject: [PATCH 050/106] update user_guide_ja\changelog.html --- user_guide_ja/changelog.html | 170 ++++++++++++++++++++++------------- 1 file changed, 109 insertions(+), 61 deletions(-) diff --git a/user_guide_ja/changelog.html b/user_guide_ja/changelog.html index adb1a440..d0372625 100644 --- a/user_guide_ja/changelog.html +++ b/user_guide_ja/changelog.html @@ -28,7 +28,7 @@
    - +

    CodeIgniter ユーザガイド 日本語版 Version 2.0.3

    CodeIgniter ユーザガイド 日本語版 Version 2.1.0

    @@ -59,6 +59,50 @@

    変更履歴

    Reactor Marker 印は CodeIgniter Reactor から提供されたものです。

    +

    Version 2.1.0

    +

    Release Date: November 01, 2011

    + +
    + +

    Bug fixes for 2.1.0

    +
      +
    • Fixed #378 Robots identified as regular browsers by the User Agent class.
    • +
    • If a config class was loaded first then a library with the same name is loaded, the config would be ignored.
    • +
    • Fixed a bug (Reactor #19) where 1) the 404_override route was being ignored in some cases, and 2) auto-loaded libraries were not available to the 404_override controller when a controller existed but the requested method did not.
    • +
    • Fixed a bug (Reactor #89) where MySQL export would fail if the table had hyphens or other non alphanumeric/underscore characters.
    • +
    • Fixed a bug (#60) - Added _file_mime_type() method to the File Uploading Library in order to fix a possible MIME-type injection (also fixes bug #394).
    • +
    • Fixed a bug (#537) - Support for all wav type in browser.
    • +
    • Fixed a bug (#576) - Using ini_get() function to detect if apc is enabled or not.
    • +
    +

    Version 2.0.3

    リリース日付: 2011年8月20日

    @@ -67,6 +111,7 @@

    Version 2.0.3

    • データベースクライアント接続において、マルチバイトの文字セットを使用したサイトで、潜在的な SQL インジェクションの経路が開かれたままになるのを防ぐよう MySQL と MySQLi ドライバの改善を行いました。

      mysql_set_charset() と非互換な PHP 5.2.3未満と MySQL 5.0.7未満の組み合わせでは、マルチバイトの文字セットを使用した環境では、SQL インジェクションの攻撃経路を無防備な状態にさらすことになりかねません。Latin-1、UTF-8、その他の "low ASCII" 文字セットの場合は、すべての環境において影響を受けません。

      もし、マルチバイトの文字セットでのデータベース接続を実行し、または、実行しようと考えているのなら、脆弱性の影響を受けないよう、サーバ環境に細心の注意を払ってください。

    +
  • 全体的な変更
    • index.php ファイルのコードのコメント内にあるスペルミスを修正しました。
    • @@ -74,21 +119,24 @@

      Version 2.0.3

    • EXT 定数の内部的使用を削除しました。
    • welcome_message ビューファイルと、デフォルトのエラーテンプレートの見た目を更新しました。danijelb さんの pull リクエストに感謝します。
    • PostgreSQL データベースのドライバに insert_batch() 関数を追加しました。epallerols さんのパッチに感謝します。
    • -
    • mimes.php に "application/x-csv" を追加しました。
    • +
    • mimes.php に "application/x-csv" を追加しました。
    • Email ライブラリにおいて、"." が名前に含まれる添付ファイルが無効な MIME タイプを使用してしまうバグを修正しました。
  • ヘルパー
    • レンダリングされた見出しタグに HTML 属性を追加できるように、heading() に第3引数(オプション)を追加しました。
    • +
    • form_open() now only adds a hidden (Cross-site Reference Forgery) protection field when the form's action is internal and is set to the post method. (Reactor #165)
    • +
    • Re-worked plural() and singular() functions in the Inflector helper to support considerably more words.
  • ライブラリ
    • セッションで、ユーザエージェント文字列の照合で照合する文字数を増やしました。データベースセッションを使用している場合は、アップグレードの注意事項 [ 訳注: 2.0.2から2.0.3へのアップグレード ] を確認してください。
    • -
    • データベースドライバ$this->db->set_dbprefix() を追加しました。
    • -
    • カートライブラリ$this->cart->insert() を、1つのアイテムの追加が成功した場合、行 ID を返すように変更しました。
    • -
    • ローダライブラリに、$this->load->view()$this->load->vars() でセットされるグローバル変数を取得するための $this->load->get_var() を追加しました。
    • +
    • Added is_unique to the Form Validation library.
    • +
    • Added $this->db->set_dbprefix() to the Database Driver.
    • +
    • Changed $this->cart->insert() in the Cart Library to return the Row ID if a single item was inserted successfully.
    • +
    • Added $this->load->get_var() to the Loader library to retrieve global vars set with $this->load->view() and $this->load->vars().
    • $this->db->having() で、クォートの挿入に escape() ではなく escape_str() を使うように変更しました。
  • @@ -96,17 +144,17 @@

    Version 2.0.3

    2.0.3の不具合修正

      -
    • ENVIRONMENT を予約済み定数に追加しました。(Reactor #196)
    • -
    • SCRIPT_NAME が確実に定義されているか、サーバでチェックするよう変更しました。(Reactor #57)
    • -
    • パッケージが存在しない場合、または開発者が他のパッケージをデフォルトで読み込まない場合に、不必要なファイル統計を取得しないように、パッケージオートローダから APPPATH.'third_party' を削除しました。
    • +
    • ENVIRONMENT を予約済み定数に追加しました。(Reactor #196)
    • +
    • SCRIPT_NAME が確実に定義されているか、サーバでチェックするよう変更しました。(Reactor #57)
    • +
    • パッケージが存在しない場合、または開発者が他のパッケージをデフォルトで読み込まない場合に、不必要なファイル統計を取得しないように、パッケージオートローダから APPPATH.'third_party' を削除しました。
    • セッションライブラリのデータベーステーブルの SQL の例で、last_activity にインデックスが含まれていない不具合(Reactor #231)を修正しました。アップグレードの注意事項を確認してください。
    • セッションライブラリのドキュメント内の SQL に不正な SQL が含まれている不具合(Reactor #229)を修正しました。
    • $this->db->select() に第2引数を渡す際に、続くクエリの中でカラム名が正しくエスケープされない不具合(Core #340)を修正しました。
    • -
    • issue #199 の修正 - 文字列として渡される属性が、それと開始タグとの間にスペースを含まない。
    • -
    • カートライブラリ$this->cart->total_items() メソッドが、アイテムの数ではなく、すべてのアイテムの数量の合計を返すようにバグを修正しました。
    • -
    • db_forge でフィールドを追加する際に、mysql と mysqli ドライバがドキュメントで示している NOT NULL ではなく、NULL をデフォルトにしてしまうバグを修正しました。
    • -
    • $this->db->select_max()、$this->db->select_min() などが Notice エラーを発生させる可能性があったバグを修正しました。w43l さんからのパッチのおかげです。
    • -
    • STDIN でのチェックを、全体的に見るとより安全な php_sapi_name() == 'cli' に置き換えました。crontab からの動作でうまくパラメータを取得できるでしょう。
    • +
    • issue #199 の修正 - 文字列として渡される属性が、それと開始タグとの間にスペースを含まない。
    • +
    • カートライブラリ$this->cart->total_items() メソッドが、アイテムの数ではなく、すべてのアイテムの数量の合計を返すようにバグを修正しました。
    • +
    • db_forge でフィールドを追加する際に、mysql と mysqli ドライバがドキュメントで示している NOT NULL ではなく、NULL をデフォルトにしてしまうバグを修正しました。
    • +
    • $this->db->select_max()、$this->db->select_min() などが Notice エラーを発生させる可能性があったバグを修正しました。w43l さんからのパッチのおかげです。
    • +
    • STDIN でのチェックを、全体的に見るとより安全な php_sapi_name() == 'cli' に置き換えました。crontab からの動作でうまくパラメータを取得できるでしょう。

    Version 2.0.2

    @@ -118,36 +166,36 @@

    Version 2.0.2

    • セキュリティクラス は core ディレクトリに移動し自動的に呼び出されるようになりました。手動で呼び出している場合にはそれを削除してください。
    • CI_SHA クラスは非推奨になりました。PHP のすべてのバージョンで sha1() 関数が提供されています。
    • -
    • constants.php は、環境設定毎のフォルダにファイルが存在すれば呼び出されるようになりました。
    • -
    • 言語ファイルの key エラーをログに記録するようになりました。
    • -
    • 複数環境サポートはオプションになりました。使用しない場合、環境設定をコメントアウトまたは削除してください。
    • -
    • フックが複数環境サポートに対応しました。
    • -
    • キャッシングドライバ に CI_ プリフィックスが追加されました。
    • -
    • CLIの使い方 がドキュメントに追加されました。
    • +
    • constants.php は、環境設定毎のフォルダにファイルが存在すれば呼び出されるようになりました。
    • +
    • 言語ファイルの key エラーをログに記録するようになりました。
    • +
    • 複数環境サポートはオプションになりました。使用しない場合、環境設定をコメントアウトまたは削除してください。
    • +
    • フックが複数環境サポートに対応しました。
    • +
    • キャッシングドライバ に CI_ プリフィックスが追加されました。
    • +
    • CLIの使い方 がドキュメントに追加されました。
  • ヘルパー
    • 以前から非推奨となっていた dohash()セキュリティヘルパー から削除されました。代わりに do_hash() を使用してください。
    • -
    • 渡した文字列のキャピタライゼーションを損なわないように plural 関数が変更されました。すべて大文字の場合も考慮されています。
    • +
    • 渡した文字列のキャピタライゼーションを損なわないように plural 関数が変更されました。すべて大文字の場合も考慮されています。
  • データベース
      -
    • $this->db->count_all_results() が文字列の代わりに数値を返すようになりました。
    • +
    • $this->db->count_all_results() が文字列の代わりに数値を返すようになりました。
  • 2.0.2の不具合修正

      -
    • 出力クラスの parse_exec_vars が protected に修正されました。(Reactor #145)
    • -
    • Windows またはセーフモードが有効な状態で、 is_really_writable が空ファイルを作る不具合 (Reactor #80) が修正されました。
    • -
    • ユーザガイドのさまざまな不具合が修正されました。
    • -
    • is_cli_request() メソッドが 入力クラス のドキュメントに追加されました。
    • -
    • form_validation クラスのルールに decimalless_thangreater_than が追加されました。
    • -
    • issue #153 MSSQL ドライバの文字列エスケープの不具合が修正されました。
    • -
    • issue #172 Google Chrome 11で URL にアクションを指定しない場合、誤ったアクションに移動する不具合が修正されました。
    • +
    • 出力クラスの parse_exec_vars が protected に修正されました。(Reactor #145)
    • +
    • Windows またはセーフモードが有効な状態で、 is_really_writable が空ファイルを作る不具合 (Reactor #80) が修正されました。
    • +
    • ユーザガイドのさまざまな不具合が修正されました。
    • +
    • is_cli_request() メソッドが 入力クラス のドキュメントに追加されました。
    • +
    • form_validation クラスのルールに decimalless_thangreater_than が追加されました。
    • +
    • issue #153 MSSQL ドライバの文字列エスケープの不具合が修正されました。
    • +
    • issue #172 Google Chrome 11で URL にアクションを指定しない場合、誤ったアクションに移動する不具合が修正されました。
    @@ -159,34 +207,34 @@

    Version 2.0.1

  • 全体的な変更
    • セキュア (HTTPS) クッキーをセットするたの $config['cookie_secure'] が設定ファイルに追加されました。
    • -
    • Core と Reactor を区別するための定数 CI_CORE が追加されました。Core: TRUE、Reactor: FALSE。
    • -
    • index.php に定数 ENVIRONMENT が追加され、PHP のエラー報告や、 +
    • Core と Reactor を区別するための定数 CI_CORE が追加されました。Core: TRUE、Reactor: FALSE。
    • +
    • index.php に定数 ENVIRONMENT が追加され、PHP のエラー報告や、 オプションでロードされる設定ファイルに影響します(以下を参照)。環境の取扱いのページをご覧ください。
    • -
    • 環境固有の設定ファイルのサポートが追加されました。
    • +
    • 環境固有の設定ファイルのサポートが追加されました。
  • ライブラリ
      -
    • decimal, less_than and greater_than ルールがフォームバリデーション(検証)クラスに追加されました。
    • -
    • 入力クラスpost()get() メソッドは第1引数が指定されない場合、配列全体を返すようになりました。
    • -
    • セキュアクッキーが set_cookie() ヘルパーと入力クラスのメソッドで指定出きるようになりました。
    • -
    • 出力クラスset_content_type() が追加され、Content-Type HTTP ヘッダを MIME タイプまたは config/mimes.php の配列のキーに基づき出力します。
    • -
    • 出力クラスがメソッドチェーンをサポートするようになりました。
    • +
    • decimal, less_than and greater_than ルールがフォームバリデーション(検証)クラスに追加されました。
    • +
    • 入力クラスpost()get() メソッドは第1引数が指定されない場合、配列全体を返すようになりました。
    • +
    • セキュアクッキーが set_cookie() ヘルパーと入力クラスのメソッドで指定出きるようになりました。
    • +
    • 出力クラスset_content_type() が追加され、Content-Type HTTP ヘッダを MIME タイプまたは config/mimes.php の配列のキーに基づき出力します。
    • +
    • 出力クラスがメソッドチェーンをサポートするようになりました。
  • ヘルパー
      -
    • フォームヘルパーform_open() はロジックが変更され、値が渡されない場合、現在の URL に投稿するようになりました。
    • +
    • フォームヘルパーform_open() はロジックが変更され、値が渡されない場合、現在の URL に投稿するようになりました。
  • 2.0.1の不具合修正

      -
    • CLI リクエストは、index.php のあるフォルダに移動した後でなく、どのフォルダからでも実行できるようになりました。
    • -
    • issue #41 の修正: mp3 の MIME タイプとして audio/mp3 が追加されました。
    • -
    • ファイルキャッシングドライバが誤ったキャッシュディレクトリを参照していた不具合 (Core #329) を修正しました。
    • -
    • SHA1 ライブラリの名前が誤っていた不具合 (Reactor #69) を修正しました。
    • +
    • CLI リクエストは、index.php のあるフォルダに移動した後でなく、どのフォルダからでも実行できるようになりました。
    • +
    • issue #41 の修正: mp3 の MIME タイプとして audio/mp3 が追加されました。
    • +
    • ファイルキャッシングドライバが誤ったキャッシュディレクトリを参照していた不具合 (Core #329) を修正しました。
    • +
    • SHA1 ライブラリの名前が誤っていた不具合 (Reactor #69) を修正しました。

    Version 2.0.0

    @@ -200,7 +248,7 @@

    Version 2.0.0

  • 以前から非推奨であった Scaffolding 機能は削除されました。
  • プラグイン機能は削除されました。代わりにヘルパーを使用してください。CAPTCHA プラグインはヘルパーに変更されました(ドキュメント)。JavaScript カレンダープラグインは、jQuery 等に有用なものがあるため、削除されました。
  • ドライバ機能が追加されました。
  • -
  • 完全な QUERY STRING に対応しました。詳細は設定ファイルを参照してください。
  • +
  • 完全な QUERY STRING に対応しました。詳細は設定ファイルを参照してください。
  • application フォルダを system の外に移動しました。
  • system/cache ディレクトリと system/logs ディレクトリを application ディレクトリの中に移動しました。
  • index.php 内でルーティングをオーバーライドできるようになりました。 "index" ファイル毎にルーティングの上書きが可能です。
  • @@ -210,15 +258,15 @@

    Version 2.0.0

  • 開発中のコードは現在 BitBucket でホスティングされています。
  • 非推奨となっていた Validation クラスは削除されました [ 訳注: 代わりに Form_validation クラスを使用してください ]。
  • すべてのコアクラスに CI_ というプレフィックスを追加しました。
  • -
  • パッケージのパスは application/config/autoload.php で設定できます。
  • -
  • アップロードクラスで拡張子なしのファイル名を指定できるようになりました。拡張子は、ファイル名の代わりにアップロードされたファイルから与えられます。
  • -
  • データベースフォージクラスにおいて、テーブル名を変更していない場合は名前を省略できるようになりました。
  • -
  • $config['base_url'] はデフォルトで空になり、自動的に推測されるようになりました。
  • -
  • config['uri_protocol'] = 'CLI' とすることで、コマンドラインインターフェイス互換が利用できるようになりました。
  • +
  • パッケージのパスは application/config/autoload.php で設定できます。
  • +
  • アップロードクラスで拡張子なしのファイル名を指定できるようになりました。拡張子は、ファイル名の代わりにアップロードされたファイルから与えられます。
  • +
  • データベースフォージクラスにおいて、テーブル名を変更していない場合は名前を省略できるようになりました。
  • +
  • $config['base_url'] はデフォルトで空になり、自動的に推測されるようになりました。
  • +
  • config['uri_protocol'] = 'CLI' とすることで、コマンドラインインターフェイス互換が利用できるようになりました。
  • ライブラリ
      -
    • キャッシュドライバを追加しました。APC、memcached およびファイルベースをサポートします。
    • +
    • キャッシュドライバを追加しました。APC、memcached およびファイルベースをサポートします。
    • ページネーションクラス$prefix$suffix および $first_url を指定できるようになりました。
    • ページネーションクラスで first、previous、next、last および各ページへのリンクを FALSE とすることで、それぞれ非表示にできるようになりました。
    • セキュリティクラスを追加しました。現在のところ、xss_clean メソッド、filename_security メソッド他のセキュリティに関する機能が使用できます。
    • @@ -249,8 +297,8 @@

      Version 2.0.0

    • Form_Validation クラスの set_rules(), set_message() および set_error_delimiters() メソッドにおいて、"メソッドの連結" ができるようになりました。
    • Email クラスで "メソッドの連結" ができるようになりました。
    • 入力クラスに request_headers(), get_request_header() および is_ajax_request() メソッドを追加しました。
    • -
    • ユーザエージェントクラスis_browser(), is_mobile() および is_robot() メソッドで、特定のブラウザおよび携帯デバイスをチェックできるようになりました。
    • -
    • 入力クラスpost()get() が、引数を与えなかった場合にPOSTとGETそれぞれの値をすべて返すようになりました。
    • +
    • ユーザエージェントクラスis_browser(), is_mobile() および is_robot() メソッドで、特定のブラウザおよび携帯デバイスをチェックできるようになりました。
    • +
    • 入力クラスpost()get() が、引数を与えなかった場合にPOSTとGETそれぞれの値をすべて返すようになりました。
  • データベース @@ -284,7 +332,7 @@

    Version 2.0.0

  • smiley_js() 関数で、script タグを含まない JavaScript を返すオプションの第3引数を追加しました。
  • HTML ヘルパーimg() メソッドは、alt 属性が指定されない場合、空の alt 属性を出力するようになりました。
  • アプリケーションの設定ファイルで CSRF が有効になっている場合、form_open() は自動的に hidden フィールドを挿入します。
  • -
  • セキュリティヘルパーsanitize_filename() 関数を追加しました。
  • +
  • セキュリティヘルパーsanitize_filename() 関数を追加しました。
  • テキストヘルパーellipsize() メソッドを追加しました。
  • 配列ヘルパーelements() メソッドを追加しました。
  • @@ -312,7 +360,7 @@

    Version 2.0.0

    2.0.0の不具合修正

      -
    • メール送信時に User-Agent を変更できない不具合を修正しました。
    • +
    • メール送信時に User-Agent を変更できない不具合を修正しました。
    • 出力クラスにおいて、_output() メソッドでコントローラに誤ったキャッシュを送る不具合を修正しました。
    • プロファイラにおいて、失敗したクエリがクエリ実行時間を持たない不具合を修正しました。
    • 複数の同じヘルパーやプラグインがロードされたときにログが記録される不具合を修正しました。
    • @@ -355,7 +403,7 @@

      Version 1.7.2

    • ファイルアップロードクラスに $config['file_name'] を渡し、アップロードしたファイルをリネームできるようにしました。
    • リストアップされたユーザエージェントの順序を変更しました。Safari でアクセスした際に、より正確にユーザエージェント報告するようになります。(#6844)
    - +
  • データベース
    • 将来の PHP バージョンが出力を変えるかもしれないので、escape() 内で、gettype() を使用するのをやめ、 is_* メソッドを使用するようにしました。
    • @@ -371,7 +419,7 @@

      Version 1.7.2

    • フォームヘルパーform_multiselect() を追加しました。
    • フォームヘルパーform_hidden() を多次元配列を受け入れるように修正しました。
    • フォームヘルパーform_prep() を処理済みのフィールドを追跡するように修正しました。 - これは、フォームバリデーション(検証)や Form フィールドを出力するためにフォームヘルパー関数を使った際に起こりうる、連続した form_prep() の呼び出しによる多重の処理や変換を避けるためです。
    • + これは、フォームバリデーション(検証)や Form フィールドを出力するためにフォームヘルパー関数を使った際に起こりうる、連続した form_prep() の呼び出しによる多重の処理や変換を避けるためです。
    • ディレクトリヘルパーdirectory_map() を、隠しファイルを含められるようにし、ディレクトリの読み取りに失敗した際に FALSE を返すように修正しました。
    • スマイリーヘルパーを複数のフィールドで動作するようにし、最後のカーソルの場所に、スマイリーを挿入するようにしました。
    @@ -449,7 +497,7 @@

    Version 1.7.1

  • Internet Explorer を対象とした攻撃を回避するのに利用できるよう、xss_clean() のセキュリティを改善しました。
  • .xls ファイル用に config/mimes.php に 'application/msexcel' を追加しました。
  • 訪問者のIPアドレスを決定するために、 - HTTP_X_FORWARDED_FOR ヘッダを信頼して良いリバースプロキシサーバのホワイトリストを設定できる 'proxy_ips' 設定項目を追加しました。
  • + HTTP_X_FORWARDED_FOR ヘッダを信頼して良いリバースプロキシサーバのホワイトリストを設定できる 'proxy_ips' 設定項目を追加しました。
  • Upload::is_allowed_filetype() で、画像を対象に正確性を改善しました。 (#6715)
  • @@ -829,7 +877,7 @@

    Version 1.6.0

  • where() 句に渡された値が何もない時、"IS NULL"が自動でセットされるよう、振る舞いを変更しました。
  • - +
  • その他のデータベース関連
    • MySQL ドライバの動作条件が、MySQL 4.1以上になりました。
    • @@ -845,7 +893,7 @@

      Version 1.6.0

      この設定項目の使われ方が本質的にはグローバルであるというところに、より適合する形になりました。(#1834)
  • - +
  • コアの変更
    • 複数のビューをロードできるようになりました。ビューの内容は、ロードした順に出力に追加されます。
    • @@ -857,7 +905,7 @@

      Version 1.6.0

    • クラスプラットフォームで、信頼性がある ファイル/フォルダの書き込みテスト手段を提供するため、Common.php に、is_really_writable() を追加しました。
  • - +
  • ライブラリ
    • 拡張が可能なように、モデルのロード手順を変更しました。
    • @@ -877,7 +925,7 @@

      Version 1.6.0

    • XML-RPC サーバライブラリで、いまのところまだ利用できない 'system.multicall' 以外の、'system' メソッドを利用可能にしました。
  • - +
  • ヘルパーとプラグイン
    • HTML ヘルパーに link_tag() を追加しました。
    • @@ -893,8 +941,8 @@

      Version 1.6.0

    • Javascript カレンダープラグインで、ハードコードされた値を使う代わりに、月と日をカレンダー言語ファイルのものを使うようにし、国際対応にしました。
  • - - + +
  • ドキュメントの変更
    • コミュニティで独自のドキュメントを書くのに使用できるよう、ドキュメントを書くのセクションを追加しました。
    • From f5f00fef17fc17df3063dabd40dd7694aaf2b37c Mon Sep 17 00:00:00 2001 From: Yoko TAMADA Date: Mon, 31 Oct 2011 02:15:49 +0900 Subject: [PATCH 051/106] update user_guide_ja/CREDITS.txt --- user_guide_ja/CREDITS.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user_guide_ja/CREDITS.txt b/user_guide_ja/CREDITS.txt index eb86d72f..b37db8f6 100644 --- a/user_guide_ja/CREDITS.txt +++ b/user_guide_ja/CREDITS.txt @@ -4,6 +4,7 @@ CodeIgniter Users Group in Japan, Japanese Translation Team Version 2.1.0 * Kenji Suzuki + * Yoko Tamada Version 2.0.3 * Kenji Suzuki @@ -15,7 +16,7 @@ Version 2.0.2 * Kenji Suzuki * Yuya Terajima * Kenta Fujiwara - * Yoko Tamada + * Yoko Tamada Version 2.0.1 * Kenji Suzuki From ad5baa400e7871d257f5bd01e00cca63456fafd5 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 31 Oct 2011 21:40:57 +0900 Subject: [PATCH 052/106] replace version number 2.0.3 with 2.1.0 --- user_guide_ja/database/active_record.html | 2 +- user_guide_ja/database/caching.html | 2 +- user_guide_ja/database/call_function.html | 2 +- user_guide_ja/database/configuration.html | 2 +- user_guide_ja/database/connecting.html | 2 +- user_guide_ja/database/examples.html | 2 +- user_guide_ja/database/fields.html | 2 +- user_guide_ja/database/forge.html | 2 +- user_guide_ja/database/helpers.html | 2 +- user_guide_ja/database/index.html | 2 +- user_guide_ja/database/queries.html | 2 +- user_guide_ja/database/results.html | 2 +- user_guide_ja/database/table_data.html | 2 +- user_guide_ja/database/transactions.html | 2 +- user_guide_ja/database/utilities.html | 2 +- user_guide_ja/doc_style/index.html | 2 +- user_guide_ja/general/alternative_php.html | 2 +- user_guide_ja/general/ancillary_classes.html | 2 +- user_guide_ja/general/autoloader.html | 2 +- user_guide_ja/general/caching.html | 2 +- user_guide_ja/general/cli.html | 2 +- user_guide_ja/general/common_functions.html | 2 +- user_guide_ja/general/controllers.html | 2 +- user_guide_ja/general/core_classes.html | 2 +- user_guide_ja/general/creating_drivers.html | 2 +- user_guide_ja/general/creating_libraries.html | 2 +- user_guide_ja/general/credits.html | 2 +- user_guide_ja/general/drivers.html | 2 +- user_guide_ja/general/environments.html | 2 +- user_guide_ja/general/errors.html | 2 +- user_guide_ja/general/helpers.html | 2 +- user_guide_ja/general/hooks.html | 2 +- user_guide_ja/general/libraries.html | 2 +- user_guide_ja/general/managing_apps.html | 2 +- user_guide_ja/general/models.html | 2 +- user_guide_ja/general/profiling.html | 2 +- user_guide_ja/general/quick_reference.html | 2 +- user_guide_ja/general/requirements.html | 2 +- user_guide_ja/general/reserved_names.html | 2 +- user_guide_ja/general/routing.html | 2 +- user_guide_ja/general/security.html | 2 +- user_guide_ja/general/styleguide.html | 2 +- user_guide_ja/general/urls.html | 2 +- user_guide_ja/general/views.html | 2 +- user_guide_ja/helpers/array_helper.html | 2 +- user_guide_ja/helpers/captcha_helper.html | 2 +- user_guide_ja/helpers/cookie_helper.html | 2 +- user_guide_ja/helpers/date_helper.html | 2 +- user_guide_ja/helpers/directory_helper.html | 2 +- user_guide_ja/helpers/download_helper.html | 2 +- user_guide_ja/helpers/email_helper.html | 2 +- user_guide_ja/helpers/file_helper.html | 2 +- user_guide_ja/helpers/form_helper.html | 2 +- user_guide_ja/helpers/html_helper.html | 2 +- user_guide_ja/helpers/inflector_helper.html | 2 +- user_guide_ja/helpers/language_helper.html | 2 +- user_guide_ja/helpers/path_helper.html | 2 +- user_guide_ja/helpers/security_helper.html | 2 +- user_guide_ja/helpers/smiley_helper.html | 2 +- user_guide_ja/helpers/string_helper.html | 2 +- user_guide_ja/helpers/text_helper.html | 2 +- user_guide_ja/helpers/typography_helper.html | 2 +- user_guide_ja/helpers/url_helper.html | 2 +- user_guide_ja/helpers/xml_helper.html | 2 +- user_guide_ja/index.html | 2 +- user_guide_ja/installation/downloads.html | 2 +- user_guide_ja/installation/index.html | 2 +- user_guide_ja/installation/troubleshooting.html | 2 +- user_guide_ja/installation/upgrade_120.html | 2 +- user_guide_ja/installation/upgrade_130.html | 2 +- user_guide_ja/installation/upgrade_131.html | 2 +- user_guide_ja/installation/upgrade_132.html | 2 +- user_guide_ja/installation/upgrade_133.html | 2 +- user_guide_ja/installation/upgrade_140.html | 2 +- user_guide_ja/installation/upgrade_141.html | 2 +- user_guide_ja/installation/upgrade_150.html | 2 +- user_guide_ja/installation/upgrade_152.html | 2 +- user_guide_ja/installation/upgrade_153.html | 2 +- user_guide_ja/installation/upgrade_154.html | 2 +- user_guide_ja/installation/upgrade_160.html | 2 +- user_guide_ja/installation/upgrade_161.html | 2 +- user_guide_ja/installation/upgrade_162.html | 2 +- user_guide_ja/installation/upgrade_163.html | 2 +- user_guide_ja/installation/upgrade_170.html | 2 +- user_guide_ja/installation/upgrade_171.html | 2 +- user_guide_ja/installation/upgrade_172.html | 2 +- user_guide_ja/installation/upgrade_200.html | 2 +- user_guide_ja/installation/upgrade_201.html | 2 +- user_guide_ja/installation/upgrade_202.html | 2 +- user_guide_ja/installation/upgrade_203.html | 2 +- user_guide_ja/installation/upgrade_b11.html | 2 +- user_guide_ja/installation/upgrading.html | 2 +- user_guide_ja/libraries/benchmark.html | 2 +- user_guide_ja/libraries/caching.html | 2 +- user_guide_ja/libraries/calendar.html | 2 +- user_guide_ja/libraries/cart.html | 2 +- user_guide_ja/libraries/config.html | 2 +- user_guide_ja/libraries/email.html | 2 +- user_guide_ja/libraries/encryption.html | 2 +- user_guide_ja/libraries/file_uploading.html | 2 +- user_guide_ja/libraries/form_validation.html | 2 +- user_guide_ja/libraries/ftp.html | 2 +- user_guide_ja/libraries/image_lib.html | 2 +- user_guide_ja/libraries/input.html | 2 +- user_guide_ja/libraries/javascript.html | 2 +- user_guide_ja/libraries/language.html | 2 +- user_guide_ja/libraries/loader.html | 2 +- user_guide_ja/libraries/output.html | 2 +- user_guide_ja/libraries/pagination.html | 2 +- user_guide_ja/libraries/parser.html | 2 +- user_guide_ja/libraries/security.html | 2 +- user_guide_ja/libraries/sessions.html | 2 +- user_guide_ja/libraries/table.html | 2 +- user_guide_ja/libraries/trackback.html | 2 +- user_guide_ja/libraries/typography.html | 2 +- user_guide_ja/libraries/unit_testing.html | 2 +- user_guide_ja/libraries/uri.html | 2 +- user_guide_ja/libraries/user_agent.html | 2 +- user_guide_ja/libraries/xmlrpc.html | 2 +- user_guide_ja/libraries/zip.html | 2 +- user_guide_ja/license.html | 2 +- user_guide_ja/overview/appflow.html | 2 +- user_guide_ja/overview/at_a_glance.html | 2 +- user_guide_ja/overview/cheatsheets.html | 2 +- user_guide_ja/overview/features.html | 2 +- user_guide_ja/overview/getting_started.html | 2 +- user_guide_ja/overview/goals.html | 2 +- user_guide_ja/overview/index.html | 2 +- user_guide_ja/overview/mvc.html | 2 +- user_guide_ja/toc.html | 2 +- 130 files changed, 130 insertions(+), 130 deletions(-) diff --git a/user_guide_ja/database/active_record.html b/user_guide_ja/database/active_record.html index dc715a48..6434fc4e 100644 --- a/user_guide_ja/database/active_record.html +++ b/user_guide_ja/database/active_record.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/caching.html b/user_guide_ja/database/caching.html index 97dd812e..95598a65 100644 --- a/user_guide_ja/database/caching.html +++ b/user_guide_ja/database/caching.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/call_function.html b/user_guide_ja/database/call_function.html index aa53a3ef..bc2f41af 100644 --- a/user_guide_ja/database/call_function.html +++ b/user_guide_ja/database/call_function.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/configuration.html b/user_guide_ja/database/configuration.html index af4427bd..3ab0b3df 100644 --- a/user_guide_ja/database/configuration.html +++ b/user_guide_ja/database/configuration.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/connecting.html b/user_guide_ja/database/connecting.html index 1532b53a..115330d4 100644 --- a/user_guide_ja/database/connecting.html +++ b/user_guide_ja/database/connecting.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/examples.html b/user_guide_ja/database/examples.html index 6c505832..03b75ce8 100644 --- a/user_guide_ja/database/examples.html +++ b/user_guide_ja/database/examples.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/fields.html b/user_guide_ja/database/fields.html index 9dece086..5ff53923 100644 --- a/user_guide_ja/database/fields.html +++ b/user_guide_ja/database/fields.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/forge.html b/user_guide_ja/database/forge.html index 0b0592e9..c8225928 100644 --- a/user_guide_ja/database/forge.html +++ b/user_guide_ja/database/forge.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/helpers.html b/user_guide_ja/database/helpers.html index a5d0264c..eb969ce3 100644 --- a/user_guide_ja/database/helpers.html +++ b/user_guide_ja/database/helpers.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/index.html b/user_guide_ja/database/index.html index aa90c99a..549ef7b6 100644 --- a/user_guide_ja/database/index.html +++ b/user_guide_ja/database/index.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/queries.html b/user_guide_ja/database/queries.html index 42b59d99..4b1bc774 100644 --- a/user_guide_ja/database/queries.html +++ b/user_guide_ja/database/queries.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/results.html b/user_guide_ja/database/results.html index 46e51a35..82051316 100644 --- a/user_guide_ja/database/results.html +++ b/user_guide_ja/database/results.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/table_data.html b/user_guide_ja/database/table_data.html index 782999bb..6126f709 100644 --- a/user_guide_ja/database/table_data.html +++ b/user_guide_ja/database/table_data.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/transactions.html b/user_guide_ja/database/transactions.html index a8989974..ec6e05db 100644 --- a/user_guide_ja/database/transactions.html +++ b/user_guide_ja/database/transactions.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/database/utilities.html b/user_guide_ja/database/utilities.html index bc32f0b9..16a3272a 100644 --- a/user_guide_ja/database/utilities.html +++ b/user_guide_ja/database/utilities.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/doc_style/index.html b/user_guide_ja/doc_style/index.html index 251859d0..d88860c4 100644 --- a/user_guide_ja/doc_style/index.html +++ b/user_guide_ja/doc_style/index.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/alternative_php.html b/user_guide_ja/general/alternative_php.html index 70de930d..2024f0f6 100644 --- a/user_guide_ja/general/alternative_php.html +++ b/user_guide_ja/general/alternative_php.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/ancillary_classes.html b/user_guide_ja/general/ancillary_classes.html index 2f62c077..d9968317 100644 --- a/user_guide_ja/general/ancillary_classes.html +++ b/user_guide_ja/general/ancillary_classes.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/autoloader.html b/user_guide_ja/general/autoloader.html index 66673145..71f019cb 100644 --- a/user_guide_ja/general/autoloader.html +++ b/user_guide_ja/general/autoloader.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/caching.html b/user_guide_ja/general/caching.html index 9e4215ff..4e45c66a 100644 --- a/user_guide_ja/general/caching.html +++ b/user_guide_ja/general/caching.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/cli.html b/user_guide_ja/general/cli.html index 367395d4..765f6388 100644 --- a/user_guide_ja/general/cli.html +++ b/user_guide_ja/general/cli.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/common_functions.html b/user_guide_ja/general/common_functions.html index 8d1dd516..b563c7d5 100644 --- a/user_guide_ja/general/common_functions.html +++ b/user_guide_ja/general/common_functions.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/controllers.html b/user_guide_ja/general/controllers.html index f38372d2..fc91402c 100644 --- a/user_guide_ja/general/controllers.html +++ b/user_guide_ja/general/controllers.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/core_classes.html b/user_guide_ja/general/core_classes.html index 7bb37c35..3dea0ecb 100644 --- a/user_guide_ja/general/core_classes.html +++ b/user_guide_ja/general/core_classes.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/creating_drivers.html b/user_guide_ja/general/creating_drivers.html index 6efca0b2..107fdba5 100644 --- a/user_guide_ja/general/creating_drivers.html +++ b/user_guide_ja/general/creating_drivers.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/creating_libraries.html b/user_guide_ja/general/creating_libraries.html index a82ef783..f87c610b 100644 --- a/user_guide_ja/general/creating_libraries.html +++ b/user_guide_ja/general/creating_libraries.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/credits.html b/user_guide_ja/general/credits.html index 9ccd3f55..624f7b41 100644 --- a/user_guide_ja/general/credits.html +++ b/user_guide_ja/general/credits.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/drivers.html b/user_guide_ja/general/drivers.html index 376f2698..f586a2b9 100644 --- a/user_guide_ja/general/drivers.html +++ b/user_guide_ja/general/drivers.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/environments.html b/user_guide_ja/general/environments.html index a52c489c..caf334dc 100644 --- a/user_guide_ja/general/environments.html +++ b/user_guide_ja/general/environments.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/errors.html b/user_guide_ja/general/errors.html index f05c8217..a046b57e 100644 --- a/user_guide_ja/general/errors.html +++ b/user_guide_ja/general/errors.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/helpers.html b/user_guide_ja/general/helpers.html index 9c539254..c5c1c172 100644 --- a/user_guide_ja/general/helpers.html +++ b/user_guide_ja/general/helpers.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/hooks.html b/user_guide_ja/general/hooks.html index 05e754ca..8f546d7f 100644 --- a/user_guide_ja/general/hooks.html +++ b/user_guide_ja/general/hooks.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/libraries.html b/user_guide_ja/general/libraries.html index b890f57d..c52cefae 100644 --- a/user_guide_ja/general/libraries.html +++ b/user_guide_ja/general/libraries.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/managing_apps.html b/user_guide_ja/general/managing_apps.html index f0d30f93..727e3feb 100644 --- a/user_guide_ja/general/managing_apps.html +++ b/user_guide_ja/general/managing_apps.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/models.html b/user_guide_ja/general/models.html index 68f516e2..3e705eab 100644 --- a/user_guide_ja/general/models.html +++ b/user_guide_ja/general/models.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/profiling.html b/user_guide_ja/general/profiling.html index b1ce8437..4376fa12 100644 --- a/user_guide_ja/general/profiling.html +++ b/user_guide_ja/general/profiling.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/quick_reference.html b/user_guide_ja/general/quick_reference.html index b5e1f18f..319b3b43 100644 --- a/user_guide_ja/general/quick_reference.html +++ b/user_guide_ja/general/quick_reference.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/requirements.html b/user_guide_ja/general/requirements.html index b5954aed..bb569c88 100644 --- a/user_guide_ja/general/requirements.html +++ b/user_guide_ja/general/requirements.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/reserved_names.html b/user_guide_ja/general/reserved_names.html index 8e9fb84e..718419db 100644 --- a/user_guide_ja/general/reserved_names.html +++ b/user_guide_ja/general/reserved_names.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/routing.html b/user_guide_ja/general/routing.html index 7659a6c8..71291e6e 100644 --- a/user_guide_ja/general/routing.html +++ b/user_guide_ja/general/routing.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/security.html b/user_guide_ja/general/security.html index 488d8743..e334c00a 100644 --- a/user_guide_ja/general/security.html +++ b/user_guide_ja/general/security.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/styleguide.html b/user_guide_ja/general/styleguide.html index b2e74906..b60c16fc 100644 --- a/user_guide_ja/general/styleguide.html +++ b/user_guide_ja/general/styleguide.html @@ -34,7 +34,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/urls.html b/user_guide_ja/general/urls.html index d39cb889..57131857 100644 --- a/user_guide_ja/general/urls.html +++ b/user_guide_ja/general/urls.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/general/views.html b/user_guide_ja/general/views.html index ac4b2942..4ebf5f60 100644 --- a/user_guide_ja/general/views.html +++ b/user_guide_ja/general/views.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/array_helper.html b/user_guide_ja/helpers/array_helper.html index 7a26618d..7b5b384b6 100644 --- a/user_guide_ja/helpers/array_helper.html +++ b/user_guide_ja/helpers/array_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/captcha_helper.html b/user_guide_ja/helpers/captcha_helper.html index 7d4f472a..6cf6ce77 100644 --- a/user_guide_ja/helpers/captcha_helper.html +++ b/user_guide_ja/helpers/captcha_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/cookie_helper.html b/user_guide_ja/helpers/cookie_helper.html index dfd43b3d..eff6e23f 100644 --- a/user_guide_ja/helpers/cookie_helper.html +++ b/user_guide_ja/helpers/cookie_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/date_helper.html b/user_guide_ja/helpers/date_helper.html index 1b9d736a..26290eec 100644 --- a/user_guide_ja/helpers/date_helper.html +++ b/user_guide_ja/helpers/date_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/directory_helper.html b/user_guide_ja/helpers/directory_helper.html index 5003343c..d2d90c6d 100644 --- a/user_guide_ja/helpers/directory_helper.html +++ b/user_guide_ja/helpers/directory_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/download_helper.html b/user_guide_ja/helpers/download_helper.html index 6f441bf0..0ed8617d 100644 --- a/user_guide_ja/helpers/download_helper.html +++ b/user_guide_ja/helpers/download_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/email_helper.html b/user_guide_ja/helpers/email_helper.html index 9e4ff7aa..33f075a5 100644 --- a/user_guide_ja/helpers/email_helper.html +++ b/user_guide_ja/helpers/email_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/file_helper.html b/user_guide_ja/helpers/file_helper.html index 1b435bc7..04ac2ef7 100644 --- a/user_guide_ja/helpers/file_helper.html +++ b/user_guide_ja/helpers/file_helper.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/form_helper.html b/user_guide_ja/helpers/form_helper.html index a8bb5611..ee489af0 100644 --- a/user_guide_ja/helpers/form_helper.html +++ b/user_guide_ja/helpers/form_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/html_helper.html b/user_guide_ja/helpers/html_helper.html index f998415c..43ec1e07 100644 --- a/user_guide_ja/helpers/html_helper.html +++ b/user_guide_ja/helpers/html_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/inflector_helper.html b/user_guide_ja/helpers/inflector_helper.html index e972f353..6c950577 100644 --- a/user_guide_ja/helpers/inflector_helper.html +++ b/user_guide_ja/helpers/inflector_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/language_helper.html b/user_guide_ja/helpers/language_helper.html index 9b39822e..383b48dc 100644 --- a/user_guide_ja/helpers/language_helper.html +++ b/user_guide_ja/helpers/language_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/path_helper.html b/user_guide_ja/helpers/path_helper.html index b1c84c33..ddfc2b01 100644 --- a/user_guide_ja/helpers/path_helper.html +++ b/user_guide_ja/helpers/path_helper.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/security_helper.html b/user_guide_ja/helpers/security_helper.html index 880c3685..68e4dc18 100644 --- a/user_guide_ja/helpers/security_helper.html +++ b/user_guide_ja/helpers/security_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/smiley_helper.html b/user_guide_ja/helpers/smiley_helper.html index 9ec35a5a..fdc30ef2 100644 --- a/user_guide_ja/helpers/smiley_helper.html +++ b/user_guide_ja/helpers/smiley_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/string_helper.html b/user_guide_ja/helpers/string_helper.html index 98478818..ccb10393 100644 --- a/user_guide_ja/helpers/string_helper.html +++ b/user_guide_ja/helpers/string_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/text_helper.html b/user_guide_ja/helpers/text_helper.html index 87e565e3..c0d9409d 100644 --- a/user_guide_ja/helpers/text_helper.html +++ b/user_guide_ja/helpers/text_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/typography_helper.html b/user_guide_ja/helpers/typography_helper.html index 42049eeb..9c79362f 100644 --- a/user_guide_ja/helpers/typography_helper.html +++ b/user_guide_ja/helpers/typography_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/url_helper.html b/user_guide_ja/helpers/url_helper.html index a7de11d8..b4a3251b 100644 --- a/user_guide_ja/helpers/url_helper.html +++ b/user_guide_ja/helpers/url_helper.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/helpers/xml_helper.html b/user_guide_ja/helpers/xml_helper.html index 2f66d7a1..6c50a16c 100644 --- a/user_guide_ja/helpers/xml_helper.html +++ b/user_guide_ja/helpers/xml_helper.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/index.html b/user_guide_ja/index.html index 3901996a..15e2911d 100644 --- a/user_guide_ja/index.html +++ b/user_guide_ja/index.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/downloads.html b/user_guide_ja/installation/downloads.html index d87eee8e..202e24d1 100644 --- a/user_guide_ja/installation/downloads.html +++ b/user_guide_ja/installation/downloads.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/index.html b/user_guide_ja/installation/index.html index 345a8e07..8bb28757 100644 --- a/user_guide_ja/installation/index.html +++ b/user_guide_ja/installation/index.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/troubleshooting.html b/user_guide_ja/installation/troubleshooting.html index efeac36d..d260436b 100644 --- a/user_guide_ja/installation/troubleshooting.html +++ b/user_guide_ja/installation/troubleshooting.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_120.html b/user_guide_ja/installation/upgrade_120.html index 22132290..c4565aca 100644 --- a/user_guide_ja/installation/upgrade_120.html +++ b/user_guide_ja/installation/upgrade_120.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_130.html b/user_guide_ja/installation/upgrade_130.html index e2809009..dc233eb3 100644 --- a/user_guide_ja/installation/upgrade_130.html +++ b/user_guide_ja/installation/upgrade_130.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_131.html b/user_guide_ja/installation/upgrade_131.html index 6cb9796d..2f0b8caa 100644 --- a/user_guide_ja/installation/upgrade_131.html +++ b/user_guide_ja/installation/upgrade_131.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_132.html b/user_guide_ja/installation/upgrade_132.html index a3b10c04..528862b9 100644 --- a/user_guide_ja/installation/upgrade_132.html +++ b/user_guide_ja/installation/upgrade_132.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_133.html b/user_guide_ja/installation/upgrade_133.html index f0cfcf63..7ef56696 100644 --- a/user_guide_ja/installation/upgrade_133.html +++ b/user_guide_ja/installation/upgrade_133.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_140.html b/user_guide_ja/installation/upgrade_140.html index 1737d0b4..16950068 100644 --- a/user_guide_ja/installation/upgrade_140.html +++ b/user_guide_ja/installation/upgrade_140.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_141.html b/user_guide_ja/installation/upgrade_141.html index c0bf31a2..e0395f84 100644 --- a/user_guide_ja/installation/upgrade_141.html +++ b/user_guide_ja/installation/upgrade_141.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_150.html b/user_guide_ja/installation/upgrade_150.html index 649be939..3c4f40e9 100644 --- a/user_guide_ja/installation/upgrade_150.html +++ b/user_guide_ja/installation/upgrade_150.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_152.html b/user_guide_ja/installation/upgrade_152.html index 8166327c..062ca723 100644 --- a/user_guide_ja/installation/upgrade_152.html +++ b/user_guide_ja/installation/upgrade_152.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_153.html b/user_guide_ja/installation/upgrade_153.html index cc4eb9e4..296b3f1c 100644 --- a/user_guide_ja/installation/upgrade_153.html +++ b/user_guide_ja/installation/upgrade_153.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_154.html b/user_guide_ja/installation/upgrade_154.html index 4745e198..298eabbb 100644 --- a/user_guide_ja/installation/upgrade_154.html +++ b/user_guide_ja/installation/upgrade_154.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_160.html b/user_guide_ja/installation/upgrade_160.html index 1f26207c..fd51a27a 100644 --- a/user_guide_ja/installation/upgrade_160.html +++ b/user_guide_ja/installation/upgrade_160.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_161.html b/user_guide_ja/installation/upgrade_161.html index 72768b23..fceabdfe 100644 --- a/user_guide_ja/installation/upgrade_161.html +++ b/user_guide_ja/installation/upgrade_161.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_162.html b/user_guide_ja/installation/upgrade_162.html index 663be19a..af111f41 100644 --- a/user_guide_ja/installation/upgrade_162.html +++ b/user_guide_ja/installation/upgrade_162.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_163.html b/user_guide_ja/installation/upgrade_163.html index eca16921..60e4f677 100644 --- a/user_guide_ja/installation/upgrade_163.html +++ b/user_guide_ja/installation/upgrade_163.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_170.html b/user_guide_ja/installation/upgrade_170.html index d909c4d1..046a827d 100644 --- a/user_guide_ja/installation/upgrade_170.html +++ b/user_guide_ja/installation/upgrade_170.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_171.html b/user_guide_ja/installation/upgrade_171.html index b105b2ab..efe011e2 100644 --- a/user_guide_ja/installation/upgrade_171.html +++ b/user_guide_ja/installation/upgrade_171.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_172.html b/user_guide_ja/installation/upgrade_172.html index 43a9ae65..d1c8a276 100644 --- a/user_guide_ja/installation/upgrade_172.html +++ b/user_guide_ja/installation/upgrade_172.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_200.html b/user_guide_ja/installation/upgrade_200.html index 14b8dd02..e3f57bab 100644 --- a/user_guide_ja/installation/upgrade_200.html +++ b/user_guide_ja/installation/upgrade_200.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_201.html b/user_guide_ja/installation/upgrade_201.html index 97c7fbe9..8b178962 100644 --- a/user_guide_ja/installation/upgrade_201.html +++ b/user_guide_ja/installation/upgrade_201.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_202.html b/user_guide_ja/installation/upgrade_202.html index 5040c619..a0cc78e1 100644 --- a/user_guide_ja/installation/upgrade_202.html +++ b/user_guide_ja/installation/upgrade_202.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_203.html b/user_guide_ja/installation/upgrade_203.html index 02f401f6..2ad75a5e 100644 --- a/user_guide_ja/installation/upgrade_203.html +++ b/user_guide_ja/installation/upgrade_203.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrade_b11.html b/user_guide_ja/installation/upgrade_b11.html index 227437ff..f098dd81 100644 --- a/user_guide_ja/installation/upgrade_b11.html +++ b/user_guide_ja/installation/upgrade_b11.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/installation/upgrading.html b/user_guide_ja/installation/upgrading.html index 1137be1f..633bd5a4 100644 --- a/user_guide_ja/installation/upgrading.html +++ b/user_guide_ja/installation/upgrading.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/benchmark.html b/user_guide_ja/libraries/benchmark.html index 5019d4c5..529e91ee 100644 --- a/user_guide_ja/libraries/benchmark.html +++ b/user_guide_ja/libraries/benchmark.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/caching.html b/user_guide_ja/libraries/caching.html index 915d84cb..9db16731 100755 --- a/user_guide_ja/libraries/caching.html +++ b/user_guide_ja/libraries/caching.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/calendar.html b/user_guide_ja/libraries/calendar.html index 4c6b3b42..64708048 100644 --- a/user_guide_ja/libraries/calendar.html +++ b/user_guide_ja/libraries/calendar.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/cart.html b/user_guide_ja/libraries/cart.html index bbf3ccf7..a48c9120 100644 --- a/user_guide_ja/libraries/cart.html +++ b/user_guide_ja/libraries/cart.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/config.html b/user_guide_ja/libraries/config.html index 16f176b5..21681e67 100644 --- a/user_guide_ja/libraries/config.html +++ b/user_guide_ja/libraries/config.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/email.html b/user_guide_ja/libraries/email.html index b1197391..6a2cbba8 100644 --- a/user_guide_ja/libraries/email.html +++ b/user_guide_ja/libraries/email.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/encryption.html b/user_guide_ja/libraries/encryption.html index b6d19787..c2212d4f 100644 --- a/user_guide_ja/libraries/encryption.html +++ b/user_guide_ja/libraries/encryption.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/file_uploading.html b/user_guide_ja/libraries/file_uploading.html index c9ebfc6f..03351bd5 100644 --- a/user_guide_ja/libraries/file_uploading.html +++ b/user_guide_ja/libraries/file_uploading.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/form_validation.html b/user_guide_ja/libraries/form_validation.html index 36346dd4..82daf8d8 100644 --- a/user_guide_ja/libraries/form_validation.html +++ b/user_guide_ja/libraries/form_validation.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/ftp.html b/user_guide_ja/libraries/ftp.html index efa04712..07c180ca 100644 --- a/user_guide_ja/libraries/ftp.html +++ b/user_guide_ja/libraries/ftp.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/image_lib.html b/user_guide_ja/libraries/image_lib.html index 2a6918a7..e2c7f63b 100644 --- a/user_guide_ja/libraries/image_lib.html +++ b/user_guide_ja/libraries/image_lib.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/input.html b/user_guide_ja/libraries/input.html index c76e3c4a..f35ca1fe 100644 --- a/user_guide_ja/libraries/input.html +++ b/user_guide_ja/libraries/input.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/javascript.html b/user_guide_ja/libraries/javascript.html index ec211dcb..b340accb 100644 --- a/user_guide_ja/libraries/javascript.html +++ b/user_guide_ja/libraries/javascript.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/language.html b/user_guide_ja/libraries/language.html index d2223b59..fa0702b2 100644 --- a/user_guide_ja/libraries/language.html +++ b/user_guide_ja/libraries/language.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/loader.html b/user_guide_ja/libraries/loader.html index 0e01dd8f..db5f7d7f 100644 --- a/user_guide_ja/libraries/loader.html +++ b/user_guide_ja/libraries/loader.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/output.html b/user_guide_ja/libraries/output.html index 85a78fe2..1c7494e9 100644 --- a/user_guide_ja/libraries/output.html +++ b/user_guide_ja/libraries/output.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/pagination.html b/user_guide_ja/libraries/pagination.html index 530d9a70..97e26b74 100644 --- a/user_guide_ja/libraries/pagination.html +++ b/user_guide_ja/libraries/pagination.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/parser.html b/user_guide_ja/libraries/parser.html index f657c318..185c73f0 100644 --- a/user_guide_ja/libraries/parser.html +++ b/user_guide_ja/libraries/parser.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/security.html b/user_guide_ja/libraries/security.html index 9dcf710e..62f882d9 100644 --- a/user_guide_ja/libraries/security.html +++ b/user_guide_ja/libraries/security.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/sessions.html b/user_guide_ja/libraries/sessions.html index fa7a477a..b52805a5 100644 --- a/user_guide_ja/libraries/sessions.html +++ b/user_guide_ja/libraries/sessions.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/table.html b/user_guide_ja/libraries/table.html index 94a64ac6..2aa55832 100644 --- a/user_guide_ja/libraries/table.html +++ b/user_guide_ja/libraries/table.html @@ -27,7 +27,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/trackback.html b/user_guide_ja/libraries/trackback.html index 6bc4a479..2d23e366 100644 --- a/user_guide_ja/libraries/trackback.html +++ b/user_guide_ja/libraries/trackback.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/typography.html b/user_guide_ja/libraries/typography.html index c9b8edb2..fd461492 100644 --- a/user_guide_ja/libraries/typography.html +++ b/user_guide_ja/libraries/typography.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/unit_testing.html b/user_guide_ja/libraries/unit_testing.html index c602df93..6088502f 100644 --- a/user_guide_ja/libraries/unit_testing.html +++ b/user_guide_ja/libraries/unit_testing.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/uri.html b/user_guide_ja/libraries/uri.html index 7a7383ef..0e35ab76 100644 --- a/user_guide_ja/libraries/uri.html +++ b/user_guide_ja/libraries/uri.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/user_agent.html b/user_guide_ja/libraries/user_agent.html index 91b3597c..be0b7154 100644 --- a/user_guide_ja/libraries/user_agent.html +++ b/user_guide_ja/libraries/user_agent.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/xmlrpc.html b/user_guide_ja/libraries/xmlrpc.html index 3ebd8c46..08a06511 100644 --- a/user_guide_ja/libraries/xmlrpc.html +++ b/user_guide_ja/libraries/xmlrpc.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/libraries/zip.html b/user_guide_ja/libraries/zip.html index 23d6667a..fcb55402 100644 --- a/user_guide_ja/libraries/zip.html +++ b/user_guide_ja/libraries/zip.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/license.html b/user_guide_ja/license.html index 42b6eea8..fc8005d7 100644 --- a/user_guide_ja/license.html +++ b/user_guide_ja/license.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/overview/appflow.html b/user_guide_ja/overview/appflow.html index fe96c054..c2fe84ee 100644 --- a/user_guide_ja/overview/appflow.html +++ b/user_guide_ja/overview/appflow.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/overview/at_a_glance.html b/user_guide_ja/overview/at_a_glance.html index 9cfe7812..ed7a0f7f 100644 --- a/user_guide_ja/overview/at_a_glance.html +++ b/user_guide_ja/overview/at_a_glance.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/overview/cheatsheets.html b/user_guide_ja/overview/cheatsheets.html index 45b18536..c4ccb7b3 100644 --- a/user_guide_ja/overview/cheatsheets.html +++ b/user_guide_ja/overview/cheatsheets.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/overview/features.html b/user_guide_ja/overview/features.html index c80e2354..20f0ee86 100644 --- a/user_guide_ja/overview/features.html +++ b/user_guide_ja/overview/features.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/overview/getting_started.html b/user_guide_ja/overview/getting_started.html index ff6dd1ef..cd5f754b 100644 --- a/user_guide_ja/overview/getting_started.html +++ b/user_guide_ja/overview/getting_started.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/overview/goals.html b/user_guide_ja/overview/goals.html index 8f46d773..ced04fd9 100644 --- a/user_guide_ja/overview/goals.html +++ b/user_guide_ja/overview/goals.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/overview/index.html b/user_guide_ja/overview/index.html index 3f808229..64d5ee0d 100644 --- a/user_guide_ja/overview/index.html +++ b/user_guide_ja/overview/index.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/overview/mvc.html b/user_guide_ja/overview/mvc.html index d54d09d5..20c54703 100644 --- a/user_guide_ja/overview/mvc.html +++ b/user_guide_ja/overview/mvc.html @@ -28,7 +28,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      diff --git a/user_guide_ja/toc.html b/user_guide_ja/toc.html index 7d29a77a..b6baca06 100644 --- a/user_guide_ja/toc.html +++ b/user_guide_ja/toc.html @@ -29,7 +29,7 @@
      - +

      CodeIgniter ユーザガイド 日本語版 Version 2.0.3

      CodeIgniter ユーザガイド 日本語版 Version 2.1.0

      From ec0c23e0fd225ff5430460e6b2dbdd3670119840 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 31 Oct 2011 22:05:27 +0900 Subject: [PATCH 053/106] add tutorial --- user_guide_ja/tutorial/conclusion.html | 91 +++++++ user_guide_ja/tutorial/create_news_items.html | 179 ++++++++++++++ user_guide_ja/tutorial/hard_coded_pages.html | 158 ++++++++++++ user_guide_ja/tutorial/index.html | 101 ++++++++ user_guide_ja/tutorial/news_section.html | 230 ++++++++++++++++++ user_guide_ja/tutorial/static_pages.html | 206 ++++++++++++++++ 6 files changed, 965 insertions(+) create mode 100644 user_guide_ja/tutorial/conclusion.html create mode 100644 user_guide_ja/tutorial/create_news_items.html create mode 100644 user_guide_ja/tutorial/hard_coded_pages.html create mode 100644 user_guide_ja/tutorial/index.html create mode 100644 user_guide_ja/tutorial/news_section.html create mode 100644 user_guide_ja/tutorial/static_pages.html diff --git a/user_guide_ja/tutorial/conclusion.html b/user_guide_ja/tutorial/conclusion.html new file mode 100644 index 00000000..9cf14674 --- /dev/null +++ b/user_guide_ja/tutorial/conclusion.html @@ -0,0 +1,91 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
      + + + + + +

      CodeIgniter User Guide Version 2.1.0

      +
      + + + + + + + + + +
      + + +
      + + + +
      + + +

      Tutorial - Conclusion

      + +

      This tutorial did not cover all of the things you might expect of a full-fledged content management system, but it introduced you to the more important topics of routing, writing controllers, and models. We hope this tutorial gave you an insight into some of CodeIgniter's basic design patterns, which you can expand upon.

      + +

      Now that you've completed this tutorial, we recommend you check out the rest of the documentation. CodeIgniter is often praised because of its comprehensive documentation. Use this to your advantage and read the "Introduction" and "General Topics" sections thoroughly. You should read the class and helper references when needed.

      + +

      Every intermediate PHP programmer should be able to get the hang of CodeIgniter within a few days.

      + +

      If you still have questions about the framework or your own CodeIgniter code, you can:

      + + +
      + + + + + + + \ No newline at end of file diff --git a/user_guide_ja/tutorial/create_news_items.html b/user_guide_ja/tutorial/create_news_items.html new file mode 100644 index 00000000..26b1ed10 --- /dev/null +++ b/user_guide_ja/tutorial/create_news_items.html @@ -0,0 +1,179 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
      + + + + + +

      CodeIgniter User Guide Version 2.1.0

      +
      + + + + + + + + + +
      + + +
      + + + +
      + + +

      Tutorial - Create news items

      + +

      You now know how you can read data from a database using CodeIgnite, but you haven't written any information to the database yet. In this section you'll expand your news controller and model created earlier to include this functionality.

      + +

      Create a form

      + +

      To input data into the database you need to create a form where you can input the information to be stored. This means you'll be needing a form with two fields, one for the title and one for the text. You'll derive the slug from our title in the model. Create the new view at application/views/news/create.php.

      + + + +

      There are only two things here that probably look unfamiliar to you: the form_open() function and the validation_errors() function.

      + +

      The first function is provided by the form helper and renders the form element and adds extra functionality, like adding a hidden CSFR prevention field. The latter is used to report errors related to form validation.

      + +

      Go back to your news controller. You're going to do two things here, check whether the form was submitted and whether the submitted data passed the validation rules. You'll use the form validation library to do this.

      + +
      +public function create()
      +{
      +	$this->load->helper('form');
      +	$this->load->library('form_validation');
      +	
      +	$data['title'] = 'Create a news item';
      +	
      +	$this->form_validation->set_rules('title', 'Title', 'required');
      +	$this->form_validation->set_rules('text', 'text', 'required');
      +	
      +	if ($this->form_validation->run() === FALSE)
      +	{
      +		$this->load->view('templates/header', $data);	
      +		$this->load->view('news/create');
      +		$this->load->view('templates/footer');
      +		
      +	}
      +	else
      +	{
      +		$this->news_model->set_news();
      +		$this->load->view('news/success');
      +	}
      +}
      +
      + +

      The code above adds a lot of functionality. The first few lines load the form helper and the form validation library. After that, rules for the form validation are set. The set_rules() method takes three arguments; the name of the input field, the name to be used in error messages, and the rule. In this case the title and text fields are required.

      + +

      CodeIgniter has a powerful form validation library as demonstrated above. You can read more about this library here.

      + +

      Continuing down, you can see a condition that checks whether the form validation ran successfully. If it did not, the form is displayed, if it was submitted and passed all the rules, the model is called. After this, a view is loaded to display a success message. Create a view at application/view/news/success.php and write a success message.

      + +

      Model

      + +

      The only thing that remains is writing a method that writes the data to the database. You'll use the Active Record class to insert the information and use the input library to get the posted data. Open up the model created earlier and add the following:

      + +
      +public function set_news()
      +{
      +	$this->load->helper('url');
      +	
      +	$slug = url_title($this->input->post('title'), 'dash', TRUE);
      +	
      +	$data = array(
      +		'title' => $this->input->post('title'),
      +		'slug' => $slug,
      +		'text' => $this->input->post('text')
      +	);
      +	
      +	return $this->db->insert('news', $data);
      +}
      +
      + +

      This new method takes care of inserting the news item into the database. The third line contains a new function, url_title(). This function - provided by the URL helper - strips down the string you pass it, replacing all spaces by dashes (-) and makes sure everything is in lowercase characters. This leaves you with a nice slug, perfect for creating URIs.

      + +

      Let's continue with preparing the record that is going to be inserted later, inside the $data array. Each element corresponds with a column in the database table created earlier. You might notice a new method here, namely the post() method from the input library. This method makes sure the data is sanitized, protecting you from nasty attacks from others. The input library is loaded by default. At last, you insert our $data array into our database.

      + +

      Routing

      + +

      Before you can start adding news items into your CodeIgniter application you have to add an extra rule to config/routes.php file. Make sure your file contains the following. This makes sure CodeIgniter sees 'create' as a method instead of a news item's slug.

      + +
      +$route['news/create'] = 'news/create';
      +$route['news/(:any)'] = 'news/view/$1';
      +$route['news'] = 'news';
      +$route['(:any)'] = 'pages/view/$1';
      +$route['default_controller'] = 'pages/view';
      +
      + +

      Now point your browser to your local development environment where you installed CodeIgniter and add index.php/news/create to the URL. Congratulations, you just created your first CodeIgniter application! Add some news and check out the different pages you made.

      + +
      + + + + + + + \ No newline at end of file diff --git a/user_guide_ja/tutorial/hard_coded_pages.html b/user_guide_ja/tutorial/hard_coded_pages.html new file mode 100644 index 00000000..b34e9f1b --- /dev/null +++ b/user_guide_ja/tutorial/hard_coded_pages.html @@ -0,0 +1,158 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
      + + + + + +

      CodeIgniter User Guide Version 2.1.0

      +
      + + + + + + + + + +
      + + +
      + + + +
      + + +

      Tutorial - Hard coded pages

      + +

      The first thing we're going to do is setting up a controller to handle our hard coded pages. A controller is a class with a collection of methods that represent the different actions you can perform on a certain object. In our case, we want to be able to view a page.

      + +

      Note: This tutorial assumes you've downloaded CodeIgniter and installed the framework in your development environment.

      + +

      Create a file at application/controllers/pages.php with the following code.

      + + + +

      If you're familiar with PHP classes you see that we create a Pages class with a view method that accepts one parameter, $page. Another interesting observation is that the Pages class is extending the CI_Controller class. This means that the new Pages class can access the methods and variables defined in the CI_Controller class. When you look at this class in system/core/controller.php you can see this class is doing something really important; assigning an instance from the CodeIgniter super object to the $this object. In most of your code, $this is the object you will use to interact with the framework.

      + +

      Now we've created our first method, it is time to do some basic templating. For this tutorial, we will be creating two views to acts as our footer and header. Let's create our header at application/views/templates/header.php and ad the following code.

      + + + +

      Our header doesn't do anything exciting. It contains the basic HTML code that we will want to display before loading the main view. You can also see that we echo the $title variable, which we didn't define. We will set this variable in the Pages controller a bit later. Let's go ahead and create a footer at application/views/templates/footer.php that includes the following code.

      + + + +

      Adding logic to the controller

      + +

      Now we've set up the basics so we can finally do some real programming. Earlier we set up our controller with a view method. Because we don't want to write a separate method for every page, we made the view method accept one parameter, the name of the page. These hard coded pages will be located in application/views/pages/. Create two files in this directory named home.php and about.php and put in some HTML content.

      + +

      In order to load these pages we'll have to check whether these page actually exists. When the page does exist, we load the view for that pages, including the header and footer and display it to the user. If it doesn't, we show a "404 Page not found" error.

      + + + +

      The first thing we do is checking whether the page we're looking for does actually exist. We use PHP's native file_exists() to do this check and pass the path where the file is supposed to be. Next is the function show_404(), a CodeIgniter function that renders the default error page and sets the appropriate HTTP headers.

      + +

      In the header template you saw we were using the $title variable to customize our page title. This is where we define the title, but instead of assigning the value to a variable, we assign it to the title element in the $data array. The last thing we need to do is loading the views in the order we want them to be displayed. We also pass the $data array to the header view to make its elements available in the header view file.

      + +

      Routing

      + +

      Actually, our controller is already functioning. Point your browser to index.php/pages/view to see your homepage. When you visit index.php/pages/view/about you will see the about page, again including your header and footer. Now we're going to get rid of the pages/view part in our URI. As you may have seen, CodeIgniter does its routing by the class, method and parameter, separated by slashes.

      + +

      Open the routing file located at application/config/routes.php and add the following two lines. Remove all other code that sets any element in the $route array.

      + + + +

      CodeIgniter reads its routing rules from top to bottom and routes the request to the first matching rule. These routes are stored in the $route array where the keys represent the incoming request and the value the path to the method, as described above.

      + +

      The first rule in our $routes array matches every request - using the wildcard operator (:any) - and passes the value to the view method of the pages class we created earlier. The default controller route makes sure every request to the root goes to the view method as well, which has the first parameter set to 'home' by default.

      + +
      + + + + + + + \ No newline at end of file diff --git a/user_guide_ja/tutorial/index.html b/user_guide_ja/tutorial/index.html new file mode 100644 index 00000000..65075fb2 --- /dev/null +++ b/user_guide_ja/tutorial/index.html @@ -0,0 +1,101 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
      + + + + + +

      CodeIgniter User Guide Version 2.1.0

      +
      + + + + + + + + + +
      + + +
      + + + +
      + + +

      Tutorial − Introduction

      + +

      This tutorial is intended to introduce you to the CodeIgniter framework and the basic principles of MVC architecture. It will show you how a basic CodeIgniter application is constructed in step-by-step fashion.

      + +

      In this tutorial, you will be creating a basic news application. You will begin by writing the code that can load static pages. Next, you will create a news section that reads news items from a database. Finally, you'll add a form to create news items in the database.

      + +

      This tutorial will primarily focus on:

      +
        +
      • Model-View-Controller basics
      • +
      • Routing basics
      • +
      • Form validation
      • +
      • Performing basic database queries using "Active Record"
      • +
      + +

      The entire tutorial is split up over several pages, each explaining a small part of the functionality of the CodeIgniter framework. You'll go through the following pages:

      +
        +
      • Introduction, this page, which gives you an overview of what to expect.
      • +
      • Static pages, which will teach you the basics of controllers, views and routing.
      • +
      • News section, where you'll start using models and will be doing some basic database operations.
      • +
      • Create news items, which will introduce more advanced database operations and form validation.
      • +
      • Conclusion, which will give you some pointers on further reading and other resources.
      • +
      + +

      Enjoy your exploration of the CodeIgniter framework.

      + +
      + + + + + + + \ No newline at end of file diff --git a/user_guide_ja/tutorial/news_section.html b/user_guide_ja/tutorial/news_section.html new file mode 100644 index 00000000..cf3377ff --- /dev/null +++ b/user_guide_ja/tutorial/news_section.html @@ -0,0 +1,230 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
      + + + + + +

      CodeIgniter User Guide Version 2.1.0

      +
      + + + + + + + + + +
      + + +
      + + + +
      + + +

      Tutorial − News section

      + +

      In the last section, we went over some basic concepts of the framework by writing a class that includes static pages. We cleaned up the URI by adding custom routing rules. Now it's time to introduce dynamic content and start using a database.

      + +

      Setting up your model

      + +

      Instead of writing database operations right in the controller, queries should be placed in a model, so they can easily be reused later. Models are the place where you retrieve, insert, and update information in your database or other data stores. They represent your data.

      + +

      Open up the application/models directory and create a new file called news_model.php and add the following code. Make sure you've configured your database properly as described here.

      + +
      +<?php
      +class News_model extends CI_Model {
      +
      +	public function __construct()
      +	{
      +		$this->load->database();
      +	}
      +}
      +
      + +

      This code looks similar to the controller code that was used earlier. It creates a new model by extending CI_Model and loads the database library. This will make the database class available through the $this->db object.

      + +

      Before querying the database, a database schema has to be created. Connect to your database and run the SQL command below. Also add some seed records.

      + +
      +CREATE TABLE news (
      +	id int(11) NOT NULL AUTO_INCREMENT,
      +	title varchar(128) NOT NULL,
      +	slug varchar(128) NOT NULL,
      +	text text NOT NULL,
      +	PRIMARY KEY (id),
      +	KEY slug (slug)
      +);
      +
      + +

      Now that the database and a model have been set up, you'll need a method to get all of our posts from our database. To do this, the database abstraction layer that is included with CodeIgniter — Active Record — is used. This makes it possible to write your 'queries' once and make them work on all supported database systems. Add the following code to your model.

      + +
      +public function get_news($slug = FALSE)
      +{
      +	if ($slug === FALSE)
      +	{
      +		$query = $this->db->get('news');
      +		return $query->result_array();
      +	}
      +	
      +	$query = $this->db->get_where('news', array('slug' => $slug));
      +	return $query->row_array();
      +}
      +
      + +

      With this code you can perform two different queries. You can get all news records, or get a news item by its slug. You might have noticed that the $slug variable wasn't sanitized before running the query; Active Record does this for you.

      + +

      Display the news

      + +

      Now that the queries are written, the model should be tied to the views that are going to display the news items to the user. This could be done in our pages controller created earlier, but for the sake of clarity, a new "news" controller is defined. Create the new controller at application/controllers/news.php.

      + +
      +<?php
      +class News extends CI_Controller {
      +
      +	public function __construct()
      +	{
      +		parent::__construct();
      +		$this->load->model('news_model');
      +	}
      +
      +	public function index()
      +	{
      +		$data['news'] = $this->news_model->get_news();
      +	}
      +
      +	public function view($slug)
      +	{
      +		$data['news'] = $this->news_model->get_news($slug);
      +	}
      +}
      +
      + +

      Looking at the code, you may see some similarity with the files we created earlier. First, the "__construct" method: it calls the constructor of its parent class (CI_Controller) and loads the model, so it can be used in all other methods in this controller.

      + +

      Next, there are two methods to view all news items and one for a specific news item. You can see that the $slug variable is passed to the model's method in the second method. The model is using this slug to identify the news item to be returned.

      + +

      Now the data is retrieved by the controller through our model, but nothing is displayed yet. The next thing to do is passing this data to the views.

      + +
      +public function index()
      +{
      +	$data['news'] = $this->news_model->get_news();
      +	$data['title'] = 'News archive';
      +
      +	$this->load->view('templates/header', $data);
      +	$this->load->view('news/index', $data);
      +	$this->load->view('templates/footer');
      +}
      +
      + +

      The code above gets all news records from the model and assigns it to a variable. The value for the title is also assigned to the $data['title'] element and all data is passed to the views. You now need to create a view to render the news items. Create application/views/news/index.php and add the next piece of code.

      + +
      +<?php foreach ($news as $news_item): ?>
      +
      +    <h2><?php echo $news_item['title'] ?></h2>
      +    <div id="main">
      +        <?php echo $news_item['text'] ?>
      +    </div>
      +    <p><a href="news/<?php echo $news_item['slug'] ?>">View article</a></p>
      +
      +<?php endforeach ?>
      +
      + +

      Here, each news item is looped and displayed to the user. You can see we wrote our template in PHP mixed with HTML. If you prefer to use a template language, you can use CodeIgniter's Template Parser class or a third party parser.

      + +

      The news overview page is now done, but a page to display individual news items is still absent. The model created earlier is made in such way that it can easily be used for this functionality. You only need to add some code to the controller and create a new view. Go back to the news controller and add the following lines to the file.

      + +
      +public function view($slug)
      +{
      +	$data['news_item'] = $this->news_model->get_news($slug);
      +
      +	if (empty($data['news_item']))
      +	{
      +		show_404();
      +	}
      +
      +	$data['title'] = $data['news_item']['title'];
      +
      +	$this->load->view('templates/header', $data);
      +	$this->load->view('news/view', $data);
      +	$this->load->view('templates/footer');
      +}
      +
      + +

      Instead of calling the get_news() method without a parameter, the $slug variable is passed, so it will return the specific news item. The only things left to do is create the corresponding view at application/views/news/view.php. Put the following code in this file.

      + +
      +<?php
      +echo '<h2>'.$news_item['title'].'</h2>';
      +echo $news_item['text'];
      +
      + +

      Routing

      +

      Because of the wildcard routing rule created earlier, you need need an extra route to view the controller that you just made. Modify your routing file (application/config/routes.php) so it looks as follows. This makes sure the requests reaches the news controller instead of going directly to the pages controller. The first line routes URI's with a slug to the view method in the news controller.

      + +
      +$route['news/(:any)'] = 'news/view/$1';
      +$route['news'] = 'news';
      +$route['(:any)'] = 'pages/view/$1';
      +$route['default_controller'] = 'pages/view';
      +
      + +

      Point your browser to your document root, followed by index.php/news and watch your news page.

      + +
      + + + + + + + \ No newline at end of file diff --git a/user_guide_ja/tutorial/static_pages.html b/user_guide_ja/tutorial/static_pages.html new file mode 100644 index 00000000..da2c58cd --- /dev/null +++ b/user_guide_ja/tutorial/static_pages.html @@ -0,0 +1,206 @@ + + + + + +CodeIgniter Features : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
      + + + + + +

      CodeIgniter User Guide Version 2.1.0

      +
      + + + + + + + + + +
      + + +
      + + + +
      + + +

      Tutorial − Static pages

      + +

      Note: This tutorial assumes you've downloaded CodeIgniter and installed the framework in your development environment.

      + +

      The first thing you're going to do is set up a controller to handle static pages. +A controller is simply a class that helps delegate work. It is the glue of your +web application.

      + +

      For example, when a call is made to: http://example.com/news/latest/10 We might imagine +that there is a controller named "news". The method being called on news +would be "latest". The news method's job could be to grab 10 +news items, and render them on the page. Very often in MVC, you'll see URL +patterns that match: http://example.com/[controller-class]/[controller-method]/[arguments] +As URL schemes become more complex, this may change. But for now, this is all we will need to know.

      + +

      Create a file at application/controllers/pages.php with the following code.

      + + + +

      You have created a class named "pages", with a view method that accepts one argument named $page. +The pages class is extending the CI_Controller class. +This means that the new pages class can access the methods and variables defined in the CI_Controller class +(system/core/Controller.php).

      + +

      The controller is what will become the center of every request to your web application. +In very technical CodeIgniter discussions, it may be referred to as the super object. +Like any php class, you refer to it within your controllers as $this. +Referring to $this is how you will load libraries, views, and generally +command the framework.

      + +

      Now you've created your first method, it's time to make some basic page templates. +We will be creating two "views" (page templates) that act as our page footer and header.

      + +

      Create the header at application/views/templates/header.php and add the following code.

      + + + +

      The header contains the basic HTML code that you'll want to display before loading the main view, together with a heading. +It will also output the $title variable, which we'll define later in the controller. +Now create a footer at application/views/templates/footer.php that includes the following code:

      + + + +

      Adding logic to the controller

      + +

      Earlier you set up a controller with a view() method. The method accepts one parameter, which is the name of the page to be loaded. +The static page templates will be located in the application/views/pages/ directory.

      + +

      In that directory, create two files named home.php and about.php. +Within those files, type some text − anything you'd like − and save them. +If you like to be particularly un-original, try "Hello World!".

      + +

      In order to load those pages, you'll have to check whether the requested page actually exists:

      + +
      +public function view($page = 'home')
      +{
      +			
      +	if ( ! file_exists('application/views/pages/'.$page.'.php'))
      +	{
      +		// Whoops, we don't have a page for that!
      +		show_404();
      +	}
      +	
      +	$data['title'] = ucfirst($page); // Capitalize the first letter
      +	
      +	$this->load->view('templates/header', $data);
      +	$this->load->view('pages/'.$page, $data);
      +	$this->load->view('templates/footer', $data);
      +
      +}
      +
      + +

      Now, when the page does exist, it is loaded, including the header and footer, and displayed to the user. If the page doesn't exist, a "404 Page not found" error is shown.

      + +

      The first line in this method checks whether the page actually exists. PHP's native file_exists() function is used to check whether the file is where it's expected to be. show_404() is a built-in CodeIgniter function that renders the default error page.

      + +

      In the header template, the $title variable was used to customize the page title. The value of title is defined in this method, but instead of assigning the value to a variable, it is assigned to the title element in the $data array.

      + +

      The last thing that has to be done is loading the views in the order they should be displayed. +The second parameter in the view() method is used to pass values to the view. Each value in the $data array is assigned to a variable with the name of its key. So the value of $data['title'] in the controller is equivalent to $title in the view.

      + +

      Routing

      + +

      The controller is now functioning! Point your browser to [your-site-url]index.php/pages/view to see your page. When you visit index.php/pages/view/about you'll see the about page, again including the header and footer.

      + +

      Using custom routing rules, you have the power to map any URI to any controller and method, and break free from the normal convention: +http://example.com/[controller-class]/[controller-method]/[arguments]

      + +

      Let's do that. Open the routing file located at application/config/routes.php and add the following two lines. Remove all other code that sets any element in the $route array.

      + +
      +$route['default_controller'] = 'pages/view';
      +$route['(:any)'] = 'pages/view/$1';
      +
      + +

      CodeIgniter reads its routing rules from top to bottom and routes the request to the first matching rule. Each rule is a regular expression +(left-side) mapped to a controller and method name separated by slashes (right-side). +When a request comes in, CodeIgniter looks for the first match, and calls the appropriate controller and method, possibly with arguments.

      + +

      More information about routing can be found in the URI Routing documentation.

      + +

      Here, the second rule in the $routes array matches any request using the wildcard string (:any). +and passes the parameter to the view() method of the pages class.

      + +

      Now visit index.php/about. Did it get routed correctly to the view() method +in the pages controller? Awesome!

      + +
      + + + + + + + \ No newline at end of file From 0ddf98ce03e95a7281cb9677343edbfaac3862b6 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 31 Oct 2011 22:14:55 +0900 Subject: [PATCH 054/106] add translation copyright, change google search --- user_guide_ja/tutorial/conclusion.html | 4 ++-- user_guide_ja/tutorial/create_news_items.html | 4 ++-- user_guide_ja/tutorial/hard_coded_pages.html | 4 ++-- user_guide_ja/tutorial/index.html | 4 ++-- user_guide_ja/tutorial/news_section.html | 4 ++-- user_guide_ja/tutorial/static_pages.html | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/user_guide_ja/tutorial/conclusion.html b/user_guide_ja/tutorial/conclusion.html index 9cf14674..16a517c6 100644 --- a/user_guide_ja/tutorial/conclusion.html +++ b/user_guide_ja/tutorial/conclusion.html @@ -45,7 +45,7 @@ Tutorial  ›  Conclusion -
      Search User Guide   
      +
      Search User Guide   
      @@ -84,7 +84,7 @@

      Tutorial - Conclusion

      User Guide Home   ·   Next Topic:  CodeIgniter URLs

      -

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

      +

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.
      Japanese Translation: CodeIgniter Users Group in Japan

      diff --git a/user_guide_ja/tutorial/create_news_items.html b/user_guide_ja/tutorial/create_news_items.html index 26b1ed10..7dc98bec 100644 --- a/user_guide_ja/tutorial/create_news_items.html +++ b/user_guide_ja/tutorial/create_news_items.html @@ -45,7 +45,7 @@ Tutorial  ›  Create news items -
      Search User Guide   
      +
      Search User Guide   
      @@ -172,7 +172,7 @@

      Routing

      User Guide Home   ·   Next Topic:  Conclusion

      -

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

      +

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.
      Japanese Translation: CodeIgniter Users Group in Japan

      diff --git a/user_guide_ja/tutorial/hard_coded_pages.html b/user_guide_ja/tutorial/hard_coded_pages.html index b34e9f1b..afd44b70 100644 --- a/user_guide_ja/tutorial/hard_coded_pages.html +++ b/user_guide_ja/tutorial/hard_coded_pages.html @@ -44,7 +44,7 @@ User Guide Home  ›  Features -
      Search User Guide   
      +
      Search User Guide   
      @@ -151,7 +151,7 @@

      Routing

      User Guide Home   ·   Next Topic:  Application Flow Chart

      -

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

      +

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.
      Japanese Translation: CodeIgniter Users Group in Japan

      diff --git a/user_guide_ja/tutorial/index.html b/user_guide_ja/tutorial/index.html index 65075fb2..a635dca1 100644 --- a/user_guide_ja/tutorial/index.html +++ b/user_guide_ja/tutorial/index.html @@ -45,7 +45,7 @@ Tutorial  ›  Introduction -
      Search User Guide   
      +
      Search User Guide   
      @@ -94,7 +94,7 @@

      Tutorial − Introduction

      User Guide Home   ·   Next Topic:  Static pages

      -

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

      +

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.
      Japanese Translation: CodeIgniter Users Group in Japan

      diff --git a/user_guide_ja/tutorial/news_section.html b/user_guide_ja/tutorial/news_section.html index cf3377ff..ca0dc125 100644 --- a/user_guide_ja/tutorial/news_section.html +++ b/user_guide_ja/tutorial/news_section.html @@ -45,7 +45,7 @@ Tutorial  ›  News section -
      Search User Guide   
      +
      Search User Guide   
      @@ -223,7 +223,7 @@

      Routing

      User Guide Home   ·   Next Topic:  Create news items

      -

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

      +

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.
      Japanese Translation: CodeIgniter Users Group in Japan

      diff --git a/user_guide_ja/tutorial/static_pages.html b/user_guide_ja/tutorial/static_pages.html index da2c58cd..e4397df3 100644 --- a/user_guide_ja/tutorial/static_pages.html +++ b/user_guide_ja/tutorial/static_pages.html @@ -45,7 +45,7 @@ Tutorial  ›  Static pages -
      Search User Guide   
      +
      Search User Guide   
      @@ -199,7 +199,7 @@

      Routing

      User Guide Home   ·   Next Topic:  News section

      -

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

      +

      CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.
      Japanese Translation: CodeIgniter Users Group in Japan

      From 3062706913a5d35e0101934eba08690f4759880c Mon Sep 17 00:00:00 2001 From: Yoko TAMADA Date: Tue, 1 Nov 2011 00:06:47 +0900 Subject: [PATCH 055/106] update and translate user_guide_ja/database/configuration.html --- user_guide_ja/database/configuration.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_ja/database/configuration.html b/user_guide_ja/database/configuration.html index 3ab0b3df..0ebadab1 100644 --- a/user_guide_ja/database/configuration.html +++ b/user_guide_ja/database/configuration.html @@ -132,7 +132,7 @@

      設定データの説明:

    • cache_on - TRUE/FALSE (boolean) - データベースクエリのキャッシュを有効にするかどうか。データベースキャッシュクラスを参照してください。
    • cachedir - データベースクエリのキャッシュディレクトリへの絶対サーバパス。
    • char_set - データベースとの通信に使用される文字セット。
    • -
    • dbcollat - データベースとの通信に使用される照合順序。

      Note: MySQL および MySQLi データベースでは、サーバの PHP のバージョンが 5.2.3 未満または MySQL のバージョンが 5.0.7 未満の場合 [ 訳注: すなわち mysql_set_charset() が使用できない環境 ] のみ、この設定が代替的に使用されます。もしこれらのバージョン未満の環境でマルチバイトの文字セットを使用している場合、PHP の mysql_real_escape_string() 関数はあなたのサイトを SQL インジェクション攻撃に対して脆弱にしかねないという不都合があります。データベースの文字セットと照合順序に Latin-1 または UTF-8 を使用しているサイトは影響を受けません。

    • +
    • dbcollat - データベースとの通信に使用される照合順序。

      Note: MySQL および MySQLi データベースでは、サーバの PHP のバージョンが 5.2.3 未満または MySQL のバージョンが 5.0.7 未満の場合 [ 訳注: すなわち mysql_set_charset() が使用できない環境 ] (および、データベースフォージクラスを用いて作成されたテーブルで) のみ、この設定が代替的に使用されます。もしこれらのバージョン未満の環境でマルチバイトの文字セットを使用している場合、PHP の mysql_real_escape_string() 関数はあなたのサイトを SQL インジェクション攻撃に対して脆弱にしかねないという不都合があります。データベースの文字セットと照合順序に Latin-1 または UTF-8 を使用しているサイトは影響を受けません。

    • swap_pre - デフォルトのテーブル接頭辞が dbprefix と置き換えられます。これは、配布されたアプリケーションに手動で記述された [ 訳注: 接頭辞を含む ] クエリが含まれる場合でも、接頭辞をエンドユーザにカスタマイズ可能にする必要がある場合に役に立ちます。
    • autoinit - ライブラリがロードされたときに、データベースに自動的に接続するかどうか。もし FALSE に設定された場合、最初のクエリの実行の前に接続されます。
    • stricton - TRUE/FALSE (boolean) - "Strict Mode" での接続を強制するかどうか、アプリケーションの開発中に SQL の厳密性を確保するのに良い方法です。
    • From 530becb7e80cb3a2647d31d2cc8ce88328189358 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Tue, 25 Oct 2011 10:37:31 -0400 Subject: [PATCH 056/106] Changed mysql charset to PDO option --- system/database/drivers/pdo/pdo_driver.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index 4c911aa6..e536cc4b 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -46,7 +46,8 @@ class CI_DB_pdo_driver extends CI_DB { */ var $_count_string = "SELECT COUNT(*) AS "; var $_random_keyword; - + + var $options = array(); function __construct($params) { @@ -57,6 +58,9 @@ function __construct($params) { $this->_like_escape_str = ''; $this->_like_escape_chr = ''; + + //Set the charset with the connection options + $this->options['PDO::MYSQL_ATTR_INIT_COMMAND'] = "SET NAMES {$this->char_set}"; } else if (strpos($this->hostname, 'odbc') !== FALSE) { @@ -83,9 +87,8 @@ function __construct($params) */ function db_connect() { - return new PDO($this->hostname,$this->username,$this->password, array( - PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT - )); + $this->options['PDO::ATTR_ERRMODE'] = PDO::ERRMODE_SILENT; + return new PDO($this->hostname,$this->username,$this->password, $this->options); } // -------------------------------------------------------------------- From d019fd673a730bf87f1410a752818f16b6ced713 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 26 Oct 2011 11:26:17 -0400 Subject: [PATCH 057/106] Set charset in DSN if PHP >= 5.3.6 --- system/database/drivers/pdo/pdo_driver.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index e536cc4b..b4c3102e 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -59,6 +59,12 @@ function __construct($params) $this->_like_escape_str = ''; $this->_like_escape_chr = ''; + //Prior to this version, the charset can't be set in the dsn + if(is_php('5.3.6')) + { + $this->hostname .= ";charset={$this->char_set}"; + } + //Set the charset with the connection options $this->options['PDO::MYSQL_ATTR_INIT_COMMAND'] = "SET NAMES {$this->char_set}"; } @@ -236,7 +242,7 @@ function trans_begin($test_mode = FALSE) // Reset the transaction failure flag. // If the $test_mode flag is set to TRUE transactions will be rolled back // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; + $this->_trans_failure = (bool) ($test_mode === TRUE); return $this->conn_id->beginTransaction(); } From 70eeb93361c4e6a08584fd600d173842e15a4f13 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 26 Oct 2011 11:31:49 -0400 Subject: [PATCH 058/106] Misc formatting fixes --- system/database/drivers/pdo/pdo_driver.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index b4c3102e..f6989327 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -78,8 +78,8 @@ function __construct($params) $this->_like_escape_str = " ESCAPE '%s' "; $this->_like_escape_chr = '!'; } - - $this->hostname = $this->hostname . ";dbname=".$this->database; + + $this->hostname .= ";dbname=".$this->database; $this->trans_enabled = FALSE; $this->_random_keyword = ' RND('.time().')'; // database specific random keyword @@ -94,7 +94,8 @@ function __construct($params) function db_connect() { $this->options['PDO::ATTR_ERRMODE'] = PDO::ERRMODE_SILENT; - return new PDO($this->hostname,$this->username,$this->password, $this->options); + + return new PDO($this->hostname, $this->username, $this->password, $this->options); } // -------------------------------------------------------------------- @@ -107,10 +108,10 @@ function db_connect() */ function db_pconnect() { - return new PDO($this->hostname,$this->username,$this->password, array( - PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT, - PDO::ATTR_PERSISTENT => true - )); + $this->options['PDO::ATTR_ERRMODE'] = PDO::ERRMODE_SILENT; + $this->options['PDO::ATTR_PERSISTENT'] = TRUE; + + return new PDO($this->hostname, $this->username, $this->password, $this->options); } // -------------------------------------------------------------------- From ed3c77648e25b83c63e60baedb3f5fa87129fbd4 Mon Sep 17 00:00:00 2001 From: Yoshiyuki Date: Tue, 1 Nov 2011 10:43:29 +0900 Subject: [PATCH 059/106] Update user_guide_ja/libraries/form_validation.html --- user_guide_ja/libraries/form_validation.html | 28 ++++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/user_guide_ja/libraries/form_validation.html b/user_guide_ja/libraries/form_validation.html index 82daf8d8..d2f57262 100644 --- a/user_guide_ja/libraries/form_validation.html +++ b/user_guide_ja/libraries/form_validation.html @@ -390,10 +390,10 @@

      ルールの連結(カスケード)

      CodeIgniter では、複数のルールを互いにパイプすることができます。ではやってみましょう。ルール設定メソッドの第3引数を次のように変更してみてください。:

      -$this->form_validation->set_rules('username', 'ユーザ名', 'required|min_length[5]|max_length[12]');
      +$this->form_validation->set_rules('username', 'ユーザ名', 'required|min_length[5]|max_length[12]|is_unique[users.username]');
      $this->form_validation->set_rules('password', 'パスワード', 'required|matches[passconf]');
      $this->form_validation->set_rules('passconf', 'パスワードの確認', 'required');
      -$this->form_validation->set_rules('email', 'メールアドレス', 'required|valid_email');
      +$this->form_validation->set_rules('email', 'メールアドレス', 'required|valid_email|is_unique[users.email]');

      上のコードでは次のことが要求されます:

      @@ -512,11 +512,11 @@

      コールバック: ユーザ定義の検証メソッド

      次に username_check という名前の新しいメソッドをコントローラに追加します。 コントローラは以下のようになっているはずです:

      -