From 7c4d10660a0a47446474bf97e3cb65f80693f1ee Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Nov 2012 15:14:34 +0200 Subject: Fix issue #1953 (form values being escaped twice) Re-instaing an improved form_prep() function, reverting most of the changes from 74ffd17ab06327ca62ddfe28a186cae7ba6bd459. --- user_guide_src/source/installation/upgrade_300.rst | 10 ---------- 1 file changed, 10 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 6d99f4655..fd5eea478 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -163,16 +163,6 @@ String helper repeater() PHP's native ``str_repeat()`` function. It is deprecated and scheduled for removal in CodeIgniter 3.1+. -.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner - rather than later. - -Form helper form_prep() -======================= - -:doc:`Form Helper <../helpers/form_helper>` function ``form_prep()`` is now just an alias for -:doc:`common function <../general/common_functions>` ``html_escape()`` and it's second argument -is ignored. It is deprecated and scheduled for removal in CodeIgniter 3.1+. - .. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner rather than later. -- cgit v1.2.3-24-g4f1b From a287a34c215903d3452023d74149eb5880125715 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 5 Nov 2012 23:19:59 +0200 Subject: Refactored DB Forge - PDO subdrivers are isolated from each other now. - Added compatibility for pretty much all of the features, for every DB platform. - Unified the way that stuff works in general. - Fixes issue #1005. --- user_guide_src/source/installation/upgrade_300.rst | 30 +++++++++++++++++++--- 1 file changed, 26 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 fd5eea478..4e0b952d5 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -93,9 +93,31 @@ Step 8: 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 9: Change usage of Email library with multiple emails -********************************************************** +************************************************************ +Step 9: 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 +at all with some drivers. In CodeIgniter 3.0, the IF EXISTS condition is no longer added +by deafault and has an optional second parameter that allows that instead and is set to +FALSE by default. + +If your application relies on IF EXISTS, you'll have to change its usage. + +:: + + // Now produces just DROP TABLE `table_name` + $this->dbforge->drop_table('table_name'); + + // 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 + all drivers with the exception of ODBC. + +*********************************************************** +Step 10: Change usage of Email library with multiple emails +*********************************************************** The :doc:`Email library <../libraries/email>` will automatically clear the set parameters after successfully sending emails. To override this behaviour, @@ -110,7 +132,7 @@ pass FALSE as the first parameter in the ``send()`` method: **************************************************************** -Step 10: Remove usage of (previously) deprecated functionalities +Step 11: Remove usage of (previously) deprecated functionalities **************************************************************** In addition to the ``$autoload['core']`` configuration setting, there's a number of other functionalities -- cgit v1.2.3-24-g4f1b From eaa60c71082c1e49f8a48d633347c98b68a387c0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 6 Nov 2012 01:11:22 +0200 Subject: Added possibility to pass custom database objects to DB Forge and DB Utilities Also, their property is no longer public and the utility class no longer extends CI_DB_forge. --- 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 4e0b952d5..c06dab793 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -99,7 +99,7 @@ Step 9: 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 at all with some drivers. In CodeIgniter 3.0, the IF EXISTS condition is no longer added -by deafault and has an optional second parameter that allows that instead and is set to +by default and has an optional second parameter that allows that instead and is set to FALSE by default. If your application relies on IF EXISTS, you'll have to change its usage. -- cgit v1.2.3-24-g4f1b From 17e11cdf1c6ff23f00c3deb2a39a40ffeb446f5c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 7 Nov 2012 12:56:03 +0200 Subject: [ci skip] Update the upgrade instructions --- user_guide_src/source/installation/upgrade_211.rst | 4 +--- user_guide_src/source/installation/upgrade_212.rst | 4 +--- user_guide_src/source/installation/upgrade_213.rst | 20 ++++++++++++++++++++ user_guide_src/source/installation/upgrading.rst | 3 ++- 4 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_213.rst (limited to 'user_guide_src/source/installation') diff --git a/user_guide_src/source/installation/upgrade_211.rst b/user_guide_src/source/installation/upgrade_211.rst index 59faca8e6..f0e70f6dc 100644 --- a/user_guide_src/source/installation/upgrade_211.rst +++ b/user_guide_src/source/installation/upgrade_211.rst @@ -8,9 +8,7 @@ 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. +Replace all files and directories in your "system" folder. .. note:: If you have any custom developed files in these folders please make copies of them first. diff --git a/user_guide_src/source/installation/upgrade_212.rst b/user_guide_src/source/installation/upgrade_212.rst index 205ad8622..4b76482e3 100644 --- a/user_guide_src/source/installation/upgrade_212.rst +++ b/user_guide_src/source/installation/upgrade_212.rst @@ -8,9 +8,7 @@ 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. +Replace all files and directories in your "system" folder. .. note:: If you have any custom developed files in these folders please make copies of them first. diff --git a/user_guide_src/source/installation/upgrade_213.rst b/user_guide_src/source/installation/upgrade_213.rst new file mode 100644 index 000000000..3a3497ccb --- /dev/null +++ b/user_guide_src/source/installation/upgrade_213.rst @@ -0,0 +1,20 @@ +############################# +Upgrading from 2.1.2 to 2.1.3 +############################# + +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. + +.. note:: If you have any custom developed files in these folders please + make copies of them first. + +Step 2: Update your user guide +============================== + +Please also replace your local copy of the user guide with the new +version. \ No newline at end of file diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 545f344ee..4f276207c 100644 --- a/user_guide_src/source/installation/upgrading.rst +++ b/user_guide_src/source/installation/upgrading.rst @@ -5,7 +5,8 @@ Upgrading From a Previous Version Please read the upgrade notes corresponding to the version you are upgrading from. -- :doc:`Upgrading from 2.1.2 to 3.0.0 ` +- :doc:`Upgrading from 2.1.3 to 3.0.0 ` +- :doc:`Upgrading from 2.1.2 to 2.1.3 ` - :doc:`Upgrading from 2.1.1 to 2.1.2 ` - :doc:`Upgrading from 2.1.0 to 2.1.1 ` - :doc:`Upgrading from 2.0.3 to 2.1.0 ` -- cgit v1.2.3-24-g4f1b From 0898e2395df056f5df90a1dd2d5550f0eae4cd7c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 8 Nov 2012 15:13:52 +0200 Subject: Deprecate the Email helper --- user_guide_src/source/installation/upgrade_300.rst | 15 +++++++++++++++ 1 file changed, 15 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 c06dab793..291d2a370 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -188,6 +188,21 @@ CodeIgniter 3.1+. .. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner rather than later. +Email helper functions +====================== + +:doc:`Email Helper <../helpers/email_helper>` only has two functions + + - :php:func:`valid_email()` + - :php:func:`send_email()` + +Both of them are now aliases for PHP's native ``filter_var()`` and ``mail()`` functions, respectively. +Therefore the :doc:`Email Helper <../helpers/email_helper>` altogether is being deprecated and +is scheduled for removal in CodeIgniter 3.1+. + +.. note:: These functions are still available, but you're strongly encouraged to remove their usage + sooner rather than later. + Date helper standard_date() =========================== -- cgit v1.2.3-24-g4f1b From f7c39d6a123a73d90e4e9ebca2c66ed75731ab32 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 8 Nov 2012 22:01:33 +0200 Subject: Deprecate String helper trim_slashes() trim(, '/') is even shorter ... --- user_guide_src/source/installation/upgrade_300.rst | 15 ++++++++++++--- 1 file changed, 12 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 291d2a370..64f603a16 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -181,9 +181,18 @@ CodeIgniter 3.1+. String helper repeater() ======================== -:doc:`String Helper <../helpers/string_helper>` function ``repeater()`` is now just an alias for -PHP's native ``str_repeat()`` function. It is deprecated and scheduled for removal in -CodeIgniter 3.1+. +:doc:`String Helper <../helpers/string_helper>` function :php:func:`repeater()` is now just an alias for +PHP's native ``str_repeat()`` function. It is deprecated and scheduled for removal in CodeIgniter 3.1+. + +.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner + rather than later. + +String helper trim_slashes() +============================ + +:doc:`String Helper <../helpers/string_helper>` function :php:func:`trim_slashes()` is now just an alias +for PHP's native ``trim()`` function (with a slash passed as its second argument). It is deprecated and +scheduled for removal in CodeIgniter 3.1+. .. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner rather than later. -- cgit v1.2.3-24-g4f1b From 08f0f8b751c0e956e12fade9f6eea2bd581042ac Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 Nov 2012 10:27:43 +0200 Subject: Polish docs for URL and XML helpers and deprecate obsolete options for String helper random_string() and URL helper url_title() --- user_guide_src/source/installation/upgrade_300.rst | 27 +++++++++++++++++++++- 1 file changed, 26 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 64f603a16..914b2ed53 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -248,4 +248,29 @@ As a result of that, the 'anchor_class' setting is now deprecated and scheduled CodeIgniter 3.1+. .. note:: This setting is still available, but you're strongly encouraged to remove its' usage sooner - rather than later. \ No newline at end of file + rather than later. + +String helper random_string() types 'unique' and 'encrypt' +========================================================== + +When using the :doc:`String Helper ` function :php:func:`random_string()`, +you should no longer pass the **unique** and **encrypt** randomization types. They are only +aliases for **md5** and **sha1** respectively and are now deprecated and scheduled for removal +in CodeIgniter 3.1+. + +.. note:: These options are still available, but you're strongly encouraged to remove their usage + sooner rather than later. + +URL helper url_title() separators 'dash' and 'underscore' +========================================================= + +When using the :doc:`URL Helper ` function :php:func:`url_title()`, you +should no longer pass **dash** or **underscore** as the word separator. This function will +now accept any character and you should just pass the chosen character directly, so you +should write '-' instead of 'dash' and '_' instead of 'underscore'. + +**dash** and **underscore** now act as aliases and are deprecated and scheduled for removal +in CodeIgniter 3.1+. + +.. note:: These options are still available, but you're strongly encouraged to remove their usage + sooner rather than later. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 0aeee85b5164e31e2a76c05caa97bd898c1a776d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 Nov 2012 17:43:11 +0200 Subject: Move the Log class to system/core/ It is a core class after all, I guess somebody forgot it when the rest of them were moved. --- user_guide_src/source/installation/upgrade_300.rst | 31 +++++++++++++++------- 1 file changed, 21 insertions(+), 10 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 914b2ed53..2bfb1bdbf 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -31,8 +31,19 @@ Step 3: 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 +*************************************************** + +The Log Class is considered as a "core" class and is now located in the +**system/core/** directory. Therefore, in order for your Log class overrides +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 + ************************************************************** -Step 4: Add new session driver items to your config/config.php +Step 5: Add new session driver items to your config/config.php ************************************************************** With the change from a single Session Library to the new Session Driver, two new config items have been added: @@ -48,7 +59,7 @@ available as valid drivers, neither of these configuration items are required. H add them for clarity and ease of configuration in the future. *************************************** -Step 5: Update your config/database.php +Step 6: 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 @@ -60,13 +71,13 @@ need to rename the `$active_record` variable to `$query_builder` $query_builder = TRUE; ******************************* -Step 6: Move your errors folder +Step 7: Move your errors folder ******************************* In version 3.0.0, the errors folder has been moved from _application/errors* to _application/views/errors*. ******************************************************* -Step 7: Update your config/routes.php containing (:any) +Step 8: Update your config/routes.php containing (:any) ******************************************************* Historically, CodeIgniter has always provided the **:any** wildcard in routing, @@ -87,15 +98,15 @@ regular expression:: **************************************************************************** -Step 8: Check the calls to Array Helper's element() and elements() functions +Step 9: 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 9: Update usage of Database Forge's drop_table() method -************************************************************ +************************************************************* +Step 10: 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 at all with some drivers. In CodeIgniter 3.0, the IF EXISTS condition is no longer added @@ -116,7 +127,7 @@ If your application relies on IF EXISTS, you'll have to change its usage. all drivers with the exception of ODBC. *********************************************************** -Step 10: Change usage of Email library with multiple emails +Step 11: Change usage of Email library with multiple emails *********************************************************** The :doc:`Email library <../libraries/email>` will automatically clear the @@ -132,7 +143,7 @@ pass FALSE as the first parameter in the ``send()`` method: **************************************************************** -Step 11: Remove usage of (previously) deprecated functionalities +Step 12: Remove usage of (previously) deprecated functionalities **************************************************************** In addition to the ``$autoload['core']`` configuration setting, there's a number of other functionalities -- cgit v1.2.3-24-g4f1b From b67277b8063b0e6aab051ce269194255ef83e808 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Nov 2012 12:51:14 +0200 Subject: Bring back the AFTER clause for DB Forge add_column() (it was temporarily removed due to multiple inconsistencies with other drivers) This commit also fixes issue #1988. Also added support for the FIRST clause (again, MySQL and CUBRID only). --- user_guide_src/source/installation/upgrade_300.rst | 32 +++++++++++++++++++++- 1 file changed, 31 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 2bfb1bdbf..0af21b11e 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -284,4 +284,34 @@ should write '-' instead of 'dash' and '_' instead of 'underscore'. in CodeIgniter 3.1+. .. note:: These options are still available, but you're strongly encouraged to remove their usage - sooner rather than later. \ No newline at end of file + sooner rather than later. + +Database Forge method add_column() with an AFTER clause +======================================================= + +If you have used the **third parameter** for :doc:`Database Forge ` method +``add_column()`` to add a field for an AFTER clause, then you should change its usage. + +That third parameter has been deprecated and scheduled for removal in CodeIgniter 3.1+. + +You should now put AFTER clause field names in the field definition array instead:: + + // Old usage: + $field = array( + 'new_field' => array('type' => 'TEXT') + ); + + $this->dbforge->add_column('table_name', $field, 'another_field'); + + // New usage: + $field = array( + 'new_field' => array('type' => 'TEXT', 'after' => 'another_field') + ); + + $this->dbforge->add_column('table_name', $field); + +.. note:: The parameter is still available, but you're strongly encouraged to remove its usage + sooner rather than later. + +.. note:: This is for MySQL and CUBRID databases only! Other drivers don't support this + clause and will silently ignore it. -- cgit v1.2.3-24-g4f1b