From 2d536f848dae5b1781bdfbdaf914fed1010e72bf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Jul 2013 10:49:59 +0300 Subject: [ci skip] Small upgrade notes fixes --- user_guide_src/source/installation/upgrade_300.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index b396d9acb..6c5f5692d 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -40,7 +40,7 @@ The Log Class is considered as a "core" class and is now located in the or extensions to work, you need to move them to **application/core/**:: application/libraries/Log.php -> application/core/Log.php - application/libraries/MY_Log.php -> application/core/MY_log.php + application/libraries/MY_Log.php -> application/core/MY_Log.php ********************************************************* Step 5: Convert your Session usage from library to driver @@ -78,9 +78,9 @@ need to rename the `$active_record` variable to `$query_builder` // $active_record = TRUE; $query_builder = TRUE; -******************************* -Step 7: Move your errors folder -******************************* +******************************************* +Step 7: Move your error templates directory +******************************************* In version 3.0.0, the errors folder has been moved from _application/errors* to _application/views/errors*. @@ -122,7 +122,7 @@ The same goes for driver libraries and extensions and/or overrides of CodeIgnite own libraries and core classes. application/libraries/MY_email.php - application/core/MY_log.php + application/core/MY_Log.php The above files should respectively be renamed to the following: -- cgit v1.2.3-24-g4f1b From 20292311636837e120d205e470e41826820feb46 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Jul 2013 14:29:10 +0300 Subject: Change class filenames to Ucfirst --- user_guide_src/source/installation/upgrade_300.rst | 80 +++++++++++++--------- 1 file changed, 48 insertions(+), 32 deletions(-) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 6c5f5692d..3e8307cfc 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -17,22 +17,63 @@ 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 your classes file names +************************************** + +Starting with CodeIgniter 3.0, all class filenames (libraries, drivers, controllers +and models) must be named in a Ucfirst-like manner or in other words - they must +start with a capital letter. + +For example, if you have the following library file: + + application/libraries/mylibrary.php + +... then you'll have to rename it to: + + application/libraries/Mylibrary.php + +The same goes for driver libraries and extensions and/or overrides of CodeIgniter's +own libraries and core classes. + + application/libraries/MY_email.php + application/core/MY_log.php + +The above files should respectively be renamed to the following: + + application/libraries/MY_Email.php + application/core/MY_Log.php + +Controllers: + + application/controllers/welcome.php -> application/controllers/Welcome.php + +Models: + + application/models/misc_model.php -> application/models/Misc_model.php + +Please note that this DOES NOT affect directories, configuration files, views, +helpers, hooks and anything else - it is only applied to classes. + +You must now follow just one simple rule - class names in Ucfirst and everything else +in lowercase. + ******************************** -Step 2: Replace config/mimes.php +Step 3: Replace config/mimes.php ******************************** This config file has been updated to contain more user mime-types, please copy it to _application/config/mimes.php*. ************************************************************** -Step 3: Remove $autoload['core'] from your config/autoload.php +Step 4: Remove $autoload['core'] from your config/autoload.php ************************************************************** Use of the ``$autoload['core']`` config array has been deprecated as of CodeIgniter 1.4.1 and is now removed. Move any entries that you might have listed there to ``$autoload['libraries']`` instead. *************************************************** -Step 4: Move your Log class overrides or extensions +Step 5: Move your Log class overrides or extensions *************************************************** The Log Class is considered as a "core" class and is now located in the @@ -43,7 +84,7 @@ or extensions to work, you need to move them to **application/core/**:: application/libraries/MY_Log.php -> application/core/MY_Log.php ********************************************************* -Step 5: Convert your Session usage from library to driver +Step 6: Convert your Session usage from library to driver ********************************************************* When you load (or autoload) the Session library, you must now load it as a driver instead of a library. This means @@ -67,7 +108,7 @@ standard for Drivers. Also beware that some functions which are not part of the the drivers, so your extension may have to be broken down into separate library and driver class extensions. *************************************** -Step 6: Update your config/database.php +Step 7: Update your config/database.php *************************************** Due to 3.0.0's renaming of Active Record to Query Builder, inside your `config/database.php`, you will @@ -79,13 +120,13 @@ need to rename the `$active_record` variable to `$query_builder` $query_builder = TRUE; ******************************************* -Step 7: Move your error templates directory +Step 8: Move your error templates directory ******************************************* In version 3.0.0, the errors folder has been moved from _application/errors* to _application/views/errors*. ******************************************************* -Step 8: Update your config/routes.php containing (:any) +Step 9: Update your config/routes.php containing (:any) ******************************************************* Historically, CodeIgniter has always provided the **:any** wildcard in routing, @@ -104,31 +145,6 @@ regular expression:: (.+) // matches ANYTHING (:any) // matches any character, except for '/' -***************************************** -Step 9: Update your libraries' file names -***************************************** - -CodeIgniter 3.0 only allows library file names to be named in a *ucfirst* manner -(meaning that the first letter of the class name must be a capital). For example, -if you have the following library file: - - application/libraries/mylibrary.php - -... then you'll have to rename it to: - - application/libraries/Mylibrary.php - -The same goes for driver libraries and extensions and/or overrides of CodeIgniter's -own libraries and core classes. - - application/libraries/MY_email.php - application/core/MY_Log.php - -The above files should respectively be renamed to the following: - - application/libraries/MY_Email.php - application/core/MY_Log.php - ***************************************************************************** Step 10: Check the calls to Array Helper's element() and elements() functions ***************************************************************************** -- cgit v1.2.3-24-g4f1b From 184cf1b5a719f4559767a221520d5ba96d1e4d8b Mon Sep 17 00:00:00 2001 From: vlakoff Date: Wed, 24 Jul 2013 03:43:39 +0200 Subject: config->item() now returns NULL instead of FALSE when the required item doesn't exist. Uniformization with other functions. This also brings the ability to properly use booleans in configuration. --- user_guide_src/source/installation/upgrade_300.rst | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 3e8307cfc..0eafaf9cd 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -145,22 +145,29 @@ regular expression:: (.+) // matches ANYTHING (:any) // matches any character, except for '/' +************************************************* +Step 10: Check the calls to config->item() method +************************************************* + +This method now returns NULL instead of FALSE when the required config +item doesn't exist. + ***************************************************************************** -Step 10: Check the calls to Array Helper's element() and elements() functions +Step 11: Check the calls to Array Helper's element() and elements() functions ***************************************************************************** The default return value of these functions, when the required elements don't exist, has been changed from FALSE to NULL. *********************************************************************** -Step 11: Check the calls to Directory Helper's directory_map() function +Step 12: Check the calls to Directory Helper's directory_map() function *********************************************************************** In the resulting array, directories now end with a trailing directory separator (i.e. a slash, usually). ************************************************************* -Step 12: Update usage of Database Forge's drop_table() method +Step 13: Update usage of Database Forge's drop_table() method ************************************************************* Up until now, ``drop_table()`` added an IF EXISTS clause by default or it didn't work @@ -182,7 +189,7 @@ If your application relies on IF EXISTS, you'll have to change its usage. all drivers with the exception of ODBC. *********************************************************** -Step 13: Change usage of Email library with multiple emails +Step 14: Change usage of Email library with multiple emails *********************************************************** The :doc:`Email Library <../libraries/email>` will automatically clear the @@ -197,7 +204,7 @@ pass FALSE as the first parameter in the ``send()`` method: } *************************************************** -Step 14: Update your Form_validation language lines +Step 15: Update your Form_validation language lines *************************************************** Two improvements have been made to the :doc:`Form Validation Library @@ -228,7 +235,7 @@ files and error messages format: later. **************************************************************** -Step 15: Remove usage of (previously) deprecated functionalities +Step 16: Remove usage of (previously) deprecated functionalities **************************************************************** In addition to the ``$autoload['core']`` configuration setting, there's a -- cgit v1.2.3-24-g4f1b From 69d2cf5dd3dfa20be849bc5c2ccafa1042817850 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Sat, 27 Jul 2013 18:09:28 +0200 Subject: Complete 3.0 upgrade notes about NULL returned on missing items --- user_guide_src/source/installation/upgrade_300.rst | 52 +++++++++++++++------- 1 file changed, 37 insertions(+), 15 deletions(-) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 0eafaf9cd..2e73ad1ce 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -145,29 +145,51 @@ regular expression:: (.+) // matches ANYTHING (:any) // matches any character, except for '/' -************************************************* -Step 10: Check the calls to config->item() method -************************************************* +************************************************************************* +Step 10: Many functions now return NULL instead of FALSE on missing items +************************************************************************* -This method now returns NULL instead of FALSE when the required config -item doesn't exist. +Many methods and functions now return NULL instead of FALSE when the required items don't exist: -***************************************************************************** -Step 11: Check the calls to Array Helper's element() and elements() functions -***************************************************************************** + - :doc:`Config Class <../libraries/config>` -The default return value of these functions, when the required elements -don't exist, has been changed from FALSE to NULL. + - config->item() + - config->slash_item() + + - :doc:`Input Class <../libraries/input>` + + - input->get() + - input->post() + - input->get_post() + - input->cookie() + - input->server() + - input->input_stream() + - input->get_request_header() + + - :doc:`Session Class <../libraries/sessions>` + + - session->userdata() + - session->flashdata() + + - :doc:`URI Class <../libraries/uri>` + + - uri->segment() + - uri->rsegment() + + - :doc:`Array Helper <../helpers/array_helper>` + + - element() + - elements() *********************************************************************** -Step 12: Check the calls to Directory Helper's directory_map() function +Step 11: Check the calls to Directory Helper's directory_map() function *********************************************************************** In the resulting array, directories now end with a trailing directory separator (i.e. a slash, usually). ************************************************************* -Step 13: Update usage of Database Forge's drop_table() method +Step 12: Update usage of Database Forge's drop_table() method ************************************************************* Up until now, ``drop_table()`` added an IF EXISTS clause by default or it didn't work @@ -189,7 +211,7 @@ If your application relies on IF EXISTS, you'll have to change its usage. all drivers with the exception of ODBC. *********************************************************** -Step 14: Change usage of Email library with multiple emails +Step 13: Change usage of Email library with multiple emails *********************************************************** The :doc:`Email Library <../libraries/email>` will automatically clear the @@ -204,7 +226,7 @@ pass FALSE as the first parameter in the ``send()`` method: } *************************************************** -Step 15: Update your Form_validation language lines +Step 14: Update your Form_validation language lines *************************************************** Two improvements have been made to the :doc:`Form Validation Library @@ -235,7 +257,7 @@ files and error messages format: later. **************************************************************** -Step 16: Remove usage of (previously) deprecated functionalities +Step 15: Remove usage of (previously) deprecated functionalities **************************************************************** In addition to the ``$autoload['core']`` configuration setting, there's a -- cgit v1.2.3-24-g4f1b From c941d855dc32ec44107cb863596fa385c7aed015 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Tue, 6 Aug 2013 14:44:40 +0200 Subject: Various typos and tabs adjustments --- user_guide_src/source/installation/upgrade_300.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 2e73ad1ce..89835585c 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -207,7 +207,7 @@ If your application relies on IF EXISTS, you'll have to change its usage. // Produces DROP TABLE IF EXISTS `table_name` $this->dbforge->drop_table('table_name', TRUE); -.. note:: The given example users MySQL-specific syntax, but it should work across +.. note:: The given example uses MySQL-specific syntax, but it should work across all drivers with the exception of ODBC. *********************************************************** -- cgit v1.2.3-24-g4f1b From e23ba1373b347ecca61c371c96f0e33da443e915 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 8 Aug 2013 13:27:48 +0300 Subject: [ci skip] Add MD5 checksums to download page (rel: #991) --- user_guide_src/source/installation/downloads.rst | 60 ++++++++++++------------ 1 file changed, 31 insertions(+), 29 deletions(-) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 8d47ba3a5..93c5cc21b 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -3,35 +3,37 @@ Downloading CodeIgniter ####################### - `CodeIgniter v3.0.0 (Current version) `_ -- `CodeIgniter v2.1.4 `_ -- `CodeIgniter v2.1.3 `_ -- `CodeIgniter v2.1.2 `_ -- `CodeIgniter v2.1.1 `_ -- `CodeIgniter v2.1.0 `_ -- `CodeIgniter v2.0.3 `_ -- `CodeIgniter v2.0.2 `_ -- `CodeIgniter v2.0.1 `_ -- `CodeIgniter v2.0.0 `_ -- `CodeIgniter v1.7.3 `_ -- `CodeIgniter v1.7.2 `_ -- `CodeIgniter v1.7.1 `_ -- `CodeIgniter v1.7.0 `_ -- `CodeIgniter v1.6.3 `_ -- `CodeIgniter v1.6.2 `_ -- `CodeIgniter v1.6.1 `_ -- `CodeIgniter v1.6.0 `_ -- `CodeIgniter v1.5.4 `_ -- `CodeIgniter v1.5.3 `_ -- `CodeIgniter v1.5.2 `_ -- `CodeIgniter v1.5.1 `_ -- `CodeIgniter v1.4.1 `_ -- `CodeIgniter v1.3.3 `_ -- `CodeIgniter v1.3.2 `_ -- `CodeIgniter v1.3.1 `_ -- `CodeIgniter v1.3 `_ -- `CodeIgniter v1.2 `_ -- `CodeIgniter v1.1 `_ -- `CodeIgniter v1.0 `_ +- `CodeIgniter v2.1.4 `_ (MD5 Checksum: e74a296c1d412a855c025b9cd468a513) +- `CodeIgniter v2.1.3 `_ (MD5 Checksum: 781d06be06eaa36f10759ef82c8594d5) +- `CodeIgniter v2.1.2 `_ (MD5 Checksum: c7a2980dff2774c97bd38bfbf450d8d5) +- `CodeIgniter v2.1.1 `_ (MD5 Checksum: c4aa5f188f4ff16f919607b46a16c76c) +- `CodeIgniter v2.1.0 `_ (MD5 Checksum: 8cb676b0f831114935d7dd1ae2e0d490) +- `CodeIgniter v2.0.3 `_ (MD5 Checksum: 910475d50daf088bdd949c3d35b444d9) +- `CodeIgniter v2.0.2 `_ (MD5 Checksum: e75bab8cf27d2fb2483c5bb61b85a524) +- `CodeIgniter v2.0.1 `_ (MD5 Checksum: 675aa95896bfb16467436c0484f15f1f) +- `CodeIgniter v2.0.0 `_ (MD5 Checksum: bd657863de45dbb397f3b3dbc4f13abb) +- `CodeIgniter v1.7.3 `_ (MD5 Checksum: 16f50e7df4f44c1defe18355131049e9) +- `CodeIgniter v1.7.2 `_ (MD5 Checksum: ff2f4d1b3ab921f91e006f38b3ae6540) +- `CodeIgniter v1.7.1 `_ (MD5 Checksum: deca9709cf21b26dc0e4ec040b37e866) +- `CodeIgniter v1.7.0 `_ (MD5 Checksum: 28037f2071f940d8756864460d949045) +- `CodeIgniter v1.6.3 `_ (MD5 Checksum: 5ffab52b39b235ed6bd08ee5dd64d2f6) +- `CodeIgniter v1.6.2 `_ (MD5 Checksum: 0922830f96dfd40874b39ad018a49206) +- `CodeIgniter v1.6.1 `_ (MD5 Checksum: cc3f0b566e3654d351fa067aeee9bced) +- `CodeIgniter v1.6.0 `_ (MD5 Checksum: 89efabb8c1d57bb51071e6a20bb5590d) +- `CodeIgniter v1.5.4 `_ (MD5 Checksum: 0d6cc66b01d5ddecde483b3d5f51e4f8) +- `CodeIgniter v1.5.3 `_ (MD5 Checksum: f44dd21d34a2842bd052879ca5de6630) +- `CodeIgniter v1.5.2 `_ (MD5 Checksum: 78e7106b271f75af48e626f6e923c1aa) +- `CodeIgniter v1.5.1 `_ (MD5 Checksum: 9dfd0dbed4f283a42a817e1e88f97481) +- `CodeIgniter v1.5.0 `_ (MD5 Checksum: 116b805eae4b7e78ddd43a8aee733632) +- `CodeIgniter v1.4.1 `_ (MD5 Checksum: 470005a83772e9d2e99dec2b4058e584) +- `CodeIgniter v1.4.0 `_ (MD5 Checksum: 43ca6ff3447d6b5681f98a328b386338) +- `CodeIgniter v1.3.3 `_ (MD5 Checksum: 55692ba4b55b53b58e4514e310288981) +- `CodeIgniter v1.3.2 `_ (MD5 Checksum: 7dace6e1d6245b569943e8df952c7637) +- `CodeIgniter v1.3.1 `_ (MD5 Checksum: f6c6f00830c60d7f98b948269ee81069) +- `CodeIgniter v1.3 `_ (MD5 Checksum: 03b2f796df6af808ecff3a18b6000477) +- `CodeIgniter v1.2 `_ (MD5 Checksum: f9289814fabe102bc35beb791d0c0f62) +- `CodeIgniter v1.1 `_ (MD5 Checksum: bf4cabb6a3ea3122a974270b8044befb) +- `CodeIgniter v1.0 `_ (MD5 Checksum: 427ca4255e2bdaacee976de1aa143ea0) ****** -- cgit v1.2.3-24-g4f1b From 441fd264267ac526730d06183bd3cfebfd26df01 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Sun, 11 Aug 2013 20:36:41 +0200 Subject: Input class: change behavior of get_post() method, add post_get() method followup to PR #2522 --- user_guide_src/source/installation/upgrade_300.rst | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 89835585c..21bdd188f 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -181,15 +181,26 @@ Many methods and functions now return NULL instead of FALSE when the required it - element() - elements() +******************************************************** +Step 11: Update usage of Input Class's get_post() method +******************************************************** + +Previously, the :doc:`Input Class <../libraries/input>` method ``get_post()`` +was checking first in POST data, then in GET data. This method has been modified +so that it checks in GET then in POST, as its name suggests. + +A method has been added, ``post_get()``, which checks in POST then in GET, as +``get_post()`` was doing before. + *********************************************************************** -Step 11: Check the calls to Directory Helper's directory_map() function +Step 12: Update usage of Directory Helper's directory_map() function *********************************************************************** In the resulting array, directories now end with a trailing directory separator (i.e. a slash, usually). ************************************************************* -Step 12: Update usage of Database Forge's drop_table() method +Step 13: Update usage of Database Forge's drop_table() method ************************************************************* Up until now, ``drop_table()`` added an IF EXISTS clause by default or it didn't work @@ -211,7 +222,7 @@ If your application relies on IF EXISTS, you'll have to change its usage. all drivers with the exception of ODBC. *********************************************************** -Step 13: Change usage of Email library with multiple emails +Step 14: Change usage of Email library with multiple emails *********************************************************** The :doc:`Email Library <../libraries/email>` will automatically clear the @@ -226,7 +237,7 @@ pass FALSE as the first parameter in the ``send()`` method: } *************************************************** -Step 14: Update your Form_validation language lines +Step 15: Update your Form_validation language lines *************************************************** Two improvements have been made to the :doc:`Form Validation Library @@ -257,7 +268,7 @@ files and error messages format: later. **************************************************************** -Step 15: Remove usage of (previously) deprecated functionalities +Step 16: Remove usage of (previously) deprecated functionalities **************************************************************** In addition to the ``$autoload['core']`` configuration setting, there's a -- cgit v1.2.3-24-g4f1b From e8e56d7be01177b3f6c2be5a3c43d21e4a472558 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Mon, 12 Aug 2013 01:36:39 +0200 Subject: Improve changelog entry --- user_guide_src/source/installation/upgrade_300.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 21bdd188f..e8fdd0b15 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -186,10 +186,10 @@ Step 11: Update usage of Input Class's get_post() method ******************************************************** Previously, the :doc:`Input Class <../libraries/input>` method ``get_post()`` -was checking first in POST data, then in GET data. This method has been modified -so that it checks in GET then in POST, as its name suggests. +was searching first in POST data, then in GET data. This method has been +modified so that it searches in GET then in POST, as its name suggests. -A method has been added, ``post_get()``, which checks in POST then in GET, as +A method has been added, ``post_get()``, which searches in POST then in GET, as ``get_post()`` was doing before. *********************************************************************** -- cgit v1.2.3-24-g4f1b From f964b16f3db95d655420dfae2012ee9fbb98a1a8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Nov 2013 17:04:55 +0200 Subject: Deprecate CI_Input::is_cli_request() and add common function is_cli() to replace it Calls to this function are often needed before the Input library is available --- user_guide_src/source/installation/upgrade_300.rst | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index e8fdd0b15..8f9cc1bdc 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -457,4 +457,28 @@ then you can now just access the properties instead:: $this->router->method; .. note:: Those methods are still available, but you're strongly encouraged to remove their usage + sooner rather than later. + +Input library method is_cli_request() +===================================== + +Calls to the ``CI_Input::is_cli_request()`` method are necessary at many places +in the CodeIgniter internals and this is often before the :doc:`Input Library +<../libraries/input>` is loaded. Because of that, it is being replaced by a common +function named :php:func:`is_cli()` and this method is now just an alias. + +The new function is both available at all times for you to use and shorter to type. + +:: + + // Old + $this->input->is_cli_request(); + + // New + is_cli(); + +``CI_Input::is_cli_request()`` is now now deprecated and scheduled for removal in +CodeIgniter 3.1+. + +.. note:: This method is still available, but you're strongly encouraged to remove its usage sooner rather than later. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From fb2ac41b6c914fd55b539337e381860bfcc2cf7b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Nov 2013 18:45:23 +0200 Subject: Update the upgrade instructions for error templates --- user_guide_src/source/installation/upgrade_300.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 8f9cc1bdc..ec80e8041 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -119,11 +119,18 @@ need to rename the `$active_record` variable to `$query_builder` // $active_record = TRUE; $query_builder = TRUE; -******************************************* -Step 8: Move your error templates directory -******************************************* +************************************ +Step 8: Replace your error templates +************************************ -In version 3.0.0, the errors folder has been moved from _application/errors* to _application/views/errors*. +In CodeIgniter 3.0, the error templates are now considered as views and have been moved to the +_application/views/errors* directory. + +Furthermore, we've added support for CLI error templates in plain-text format that unlike HTML, +is suitable for the command line. This of course requires another level of separation. + +It is safe to move your old templates from _application/errors* to _application/views/errors/html*, +but you'll have to copy the new _application/views/errors/cli* directory from the CodeIgniter archive. ******************************************************* Step 9: Update your config/routes.php containing (:any) -- cgit v1.2.3-24-g4f1b From ac023e10e7d9e4ad11783ff7e1154d2701a1ec18 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 7 Jan 2014 16:13:03 +0200 Subject: Change Text helper default tag from to Supersedes PR #1497 --- user_guide_src/source/installation/upgrade_300.rst | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index ec80e8041..41153df16 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -488,4 +488,22 @@ The new function is both available at all times for you to use and shorter to ty CodeIgniter 3.1+. .. note:: This method is still available, but you're strongly encouraged to remove its usage - sooner rather than later. \ No newline at end of file + sooner rather than later. + +*********************************************************** +Step 17: Check your usage of Text helper highlight_phrase() +*********************************************************** + +The default HTML tag used by :doc:`Text Helper <../helpers/text_helper>` function +:func:`highlight_phrase()` has been changed from ```` to the new HTML5 +tag ````. + +Unless you've used your own highlighting tags, this might cause trouble +for your visitors who use older web browsers such as Internet Explorer 8. +We therefore suggest that you add the following code to your CSS files +in order to avoid backwards compatibility with old browsers:: + + mark { + background: #ff0; + color: #000; + }; \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 80a16b1cd0d4716b5ea41497685a8fac02e34333 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 8 Jan 2014 17:19:03 +0200 Subject: Fix #346 When ['global_xss_filtering'] was turned on, the , , & superglobals were automatically overwritten. This resulted in one of the following problems: - xss_clean() being called twice - Inability to retrieve the original (not filtered) value XSS filtering is now only applied on demand by the Input class, and the default value for the parameter in CI_Input methods is changed to NULL. Unless a boolean value is passed to them, whether XSS filtering is applied depends on the ['global_xss_filtering'] value. --- user_guide_src/source/installation/upgrade_300.rst | 45 ++++++++++++++++++---- 1 file changed, 38 insertions(+), 7 deletions(-) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 41153df16..f0759a15e 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -188,8 +188,39 @@ Many methods and functions now return NULL instead of FALSE when the required it - element() - elements() +******************************* +Step 11: Usage of XSS filtering +******************************* + +Many functions in CodeIgniter allow you to use its XSS filtering feature +on demand by passing a boolean parameter. The default value of that +parameter used to be boolean FALSE, but it is now changed to NULL and it +will be dynamically determined by your ``$config['global_xss_filtering']`` +value. + +If you used to manually pass a boolean value for the ``$xss_filter`` +parameter or if you've always had ``$config['global_xss_filtering']`` set +to FALSE, then this change doesn't concern you. + +Otherwise however, please review your usage of the following functions: + + - :doc:`Input Library <../libraries/input>` + + - input->get() + - input->post() + - input->get_post() + - input->cookie() + - input->server() + - input->input_stream() + + - :doc:`Cookie Helper <../helpers/cookie_helper>` :func:`get_cookie()` + +.. important:: Another related change is that the ``$_GET``, ``$_POST``, + ``$_COOKIE`` and ``$_SERVER`` superglobals are no longer + automatically overwritten when global XSS filtering is turned on. + ******************************************************** -Step 11: Update usage of Input Class's get_post() method +Step 12: Update usage of Input Class's get_post() method ******************************************************** Previously, the :doc:`Input Class <../libraries/input>` method ``get_post()`` @@ -200,14 +231,14 @@ A method has been added, ``post_get()``, which searches in POST then in GET, as ``get_post()`` was doing before. *********************************************************************** -Step 12: Update usage of Directory Helper's directory_map() function +Step 13: Update usage of Directory Helper's directory_map() function *********************************************************************** In the resulting array, directories now end with a trailing directory separator (i.e. a slash, usually). ************************************************************* -Step 13: Update usage of Database Forge's drop_table() method +Step 14: Update usage of Database Forge's drop_table() method ************************************************************* Up until now, ``drop_table()`` added an IF EXISTS clause by default or it didn't work @@ -229,7 +260,7 @@ If your application relies on IF EXISTS, you'll have to change its usage. all drivers with the exception of ODBC. *********************************************************** -Step 14: Change usage of Email library with multiple emails +Step 15: Change usage of Email library with multiple emails *********************************************************** The :doc:`Email Library <../libraries/email>` will automatically clear the @@ -244,7 +275,7 @@ pass FALSE as the first parameter in the ``send()`` method: } *************************************************** -Step 15: Update your Form_validation language lines +Step 16: Update your Form_validation language lines *************************************************** Two improvements have been made to the :doc:`Form Validation Library @@ -275,7 +306,7 @@ files and error messages format: later. **************************************************************** -Step 16: Remove usage of (previously) deprecated functionalities +Step 17: Remove usage of (previously) deprecated functionalities **************************************************************** In addition to the ``$autoload['core']`` configuration setting, there's a @@ -491,7 +522,7 @@ CodeIgniter 3.1+. sooner rather than later. *********************************************************** -Step 17: Check your usage of Text helper highlight_phrase() +Step 18: Check your usage of Text helper highlight_phrase() *********************************************************** The default HTML tag used by :doc:`Text Helper <../helpers/text_helper>` function -- cgit v1.2.3-24-g4f1b From 50a9d863dd56a3667d8dfb4b8c66d8035bb26956 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 8 Jan 2014 18:53:58 +0200 Subject: Deprecate the 'mysql', 'sqlite', 'mssql' and 'pdo/dblib' drivers The 'mysql' PHP extension is notorious for it's problems and is deprecated as of PHP 5.5. The other ones are dropped from PHP 5.3. --- user_guide_src/source/installation/upgrade_300.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index f0759a15e..ca7569b57 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -333,6 +333,26 @@ Smiley helper js_insert_smiley() :doc:`Smiley Helper <../helpers/smiley_helper>` function ``js_insert_smiley()`` has been deprecated since CodeIgniter 1.7.2 and is now removed. You'll need to switch to ``smiley_js()`` instead. +Database drivers 'mysql', 'sqlite', 'mssql', 'pdo/dblib' +======================================================== + +The **mysql** driver utilizes the old 'mysql' PHP extension, known for its aging code base and +many low-level problems. The extension is deprecated as of PHP 5.5 and CodeIgniter deprecates +it in version 3.0, switching the default configured MySQL driver to **mysqli**. + +Please use either the 'mysqli' or 'pdo/mysql' drivers for MySQL. The old 'mysql' driver will be +removed at some point in the future. + +The **sqlite**, **mssql** and **pdo/dblib** (also known as pdo/mssql or pdo/sybase) drivers +all depend on PHP extensions that for different reasons no longer exist since PHP 5.3. + +Therefore we are now deprecating these drivers as we will have to remove them in one of the next +CodeIgniter versions. You should use the more advanced, **sqlite3**, **sqlsrv** or **pdo/sqlsrv** +drivers respectively. + +.. note:: These drivers are still available, but you're strongly encouraged to switch to other ones + sooner rather than later. + Security helper do_hash() ========================= -- cgit v1.2.3-24-g4f1b