From fb1917d8afa41aed76f0be091d3ce13c767e9af5 Mon Sep 17 00:00:00 2001 From: Hashem Qolami Date: Sun, 21 Jul 2013 01:26:47 +0430 Subject: Fix User Guide Search button issue Signed-off-by: Hashem Qolami --- .../source/_themes/eldocs/static/asset/css/common.css | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/_themes/eldocs/static/asset/css/common.css b/user_guide_src/source/_themes/eldocs/static/asset/css/common.css index 648e33032..197739a57 100644 --- a/user_guide_src/source/_themes/eldocs/static/asset/css/common.css +++ b/user_guide_src/source/_themes/eldocs/static/asset/css/common.css @@ -133,7 +133,7 @@ a:visited{ color: #1A5B8D; } a:hover, a:active{ color: #742CAC; } -a.headerlink{ visibility: hidden; } +a.headerlink{ visibility: hidden; margin-left: 0.4em } :hover > a.headerlink { visibility: visible; } @@ -261,12 +261,12 @@ fieldset{ border: 0; } #header form{ float: right; overflow: hidden; } #header input{ float: left; } - + #header input[type="text"]{ background-color: #FFFFFF; border: 1px solid; border-color: #033861 #13598F #13598F #033861; - font-size: inherit; + font: inherit; margin-right: 5px; padding: 5px; width: 175px; @@ -279,8 +279,9 @@ fieldset{ border: 0; } border: 1px solid #033861; color: #094776; cursor: pointer; + font: inherit; font-weight: bold; - padding: 5px 10px 4px; + padding: 5px 10px; text-transform: uppercase; } @@ -349,6 +350,4 @@ fieldset{ border: 0; } h3,h4,h5,h6{ font-size: 14px; } } -@media screen and (-webkit-min-device-pixel-ratio:0){ - #header input[type="submit"]{ padding-bottom: 7px; } -} +#header input[type="submit"], x:-moz-any-link{ padding: 4px 10px; } -- cgit v1.2.3-24-g4f1b 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') 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/general/cli.rst | 2 +- user_guide_src/source/general/controllers.rst | 10 +-- .../source/general/creating_libraries.rst | 7 +- user_guide_src/source/general/libraries.rst | 2 +- user_guide_src/source/general/models.rst | 9 ++- user_guide_src/source/general/styleguide.rst | 31 ++++++++- user_guide_src/source/general/views.rst | 2 +- user_guide_src/source/helpers/smiley_helper.rst | 4 +- user_guide_src/source/installation/upgrade_300.rst | 80 +++++++++++++--------- user_guide_src/source/libraries/file_uploading.rst | 2 +- user_guide_src/source/libraries/loader.rst | 2 +- user_guide_src/source/libraries/migration.rst | 2 +- user_guide_src/source/libraries/xmlrpc.rst | 4 +- user_guide_src/source/tutorial/news_section.rst | 4 +- user_guide_src/source/tutorial/static_pages.rst | 2 +- 15 files changed, 105 insertions(+), 58 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/general/cli.rst b/user_guide_src/source/general/cli.rst index 998d2a907..4145d5ccc 100644 --- a/user_guide_src/source/general/cli.rst +++ b/user_guide_src/source/general/cli.rst @@ -33,7 +33,7 @@ Let's try it: Hello World! ========================== Let's create a simple controller so you can see it in action. Using your -text editor, create a file called tools.php, and put the following code +text editor, create a file called Tools.php, and put the following code in it:: 'large', 'color' => 'red'); - $this->load->library('Someclass', $params); + $this->load->library('someclass', $params); If you use this feature you must set up your class constructor to expect data:: diff --git a/user_guide_src/source/general/libraries.rst b/user_guide_src/source/general/libraries.rst index 6e1c8b6dd..9bbda51bb 100644 --- a/user_guide_src/source/general/libraries.rst +++ b/user_guide_src/source/general/libraries.rst @@ -29,4 +29,4 @@ Creating Your Own Libraries =========================== Please read the section of the user guide that discusses how to -:doc:`create your own libraries `. +:doc:`create your own libraries `. \ No newline at end of file diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index a028a9569..c4fd12476 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -84,8 +84,7 @@ Where **Model_name** is the name of your class. Class names **must** have the first letter capitalized with the rest of the name lowercase. Make sure your class extends the base Model class. -The file name will be a lower case version of your class name. For -example, if your class is this:: +The file name must match the class name. For example, if this is your class:: class User_model extends CI_Model { @@ -98,7 +97,7 @@ example, if your class is this:: Your file will be this:: - application/models/user_model.php + application/models/User_model.php Loading a Model =============== @@ -111,7 +110,7 @@ the following method:: If your model is located in a sub-directory, include the relative path from your models directory. For example, if you have a model located at -*application/models/blog/queries.php* you'll load it using:: +*application/models/blog/Queries.php* you'll load it using:: $this->load->model('blog/queries'); @@ -181,4 +180,4 @@ database. The following options for connecting are available to you: $config['pconnect'] = FALSE; $config['db_debug'] = TRUE; - $this->load->model('Model_name', '', $config); \ No newline at end of file + $this->load->model('model_name', '', $config); \ No newline at end of file diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst index 144b362f5..1683b04cd 100644 --- a/user_guide_src/source/general/styleguide.rst +++ b/user_guide_src/source/general/styleguide.rst @@ -71,13 +71,42 @@ identify a file as being complete and not truncated. echo "Here's my code!"; - /* End of file myfile.php */ + /* End of file Myfile.php */ /* Location: ./system/modules/mymodule/myfile.php */ .. note:: There should be no empty line or newline character(s) following the closing comments. If you happen to see one when submitting a pull request, please check your IDE settings and fix it. +File Naming +=========== + +Class files must be named in a Ucfirst-like manner, while any other file name +(configurations, views, generic scripts, etc.) should be in all lowercase. + +**INCORRECT**:: + + somelibrary.php + someLibrary.php + SOMELIBRARY.php + Some_Library.php + + Application_config.php + Application_Config.php + applicationConfig.php + +**CORRECT**:: + + SomeLibrary.php + Some_Library.php + + applicationconfig.php + application_config.php + +Furthermore, class file names should match the name of the class itself. +For example, if you have a class named `Myclass`, then its filename must +be **Myclass.php**. + Class and Method Naming ======================= diff --git a/user_guide_src/source/general/views.rst b/user_guide_src/source/general/views.rst index 4b1ab3c34..2fc0cb2ca 100644 --- a/user_guide_src/source/general/views.rst +++ b/user_guide_src/source/general/views.rst @@ -45,7 +45,7 @@ Where name is the name of your view file. .. note:: The .php file extension does not need to be specified unless you use something other than .php. -Now, open the controller file you made earlier called blog.php, and +Now, open the controller file you made earlier called Blog.php, and replace the echo statement with the view loading method:: `:: } -In your `application/views/` folder, create a file called `smiley_view.php` +In your **application/views/** folder, create a file called **smiley_view.php** and place this code in it:: 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 ***************************************************************************** diff --git a/user_guide_src/source/libraries/file_uploading.rst b/user_guide_src/source/libraries/file_uploading.rst index a92d3af34..a295d7427 100644 --- a/user_guide_src/source/libraries/file_uploading.rst +++ b/user_guide_src/source/libraries/file_uploading.rst @@ -83,7 +83,7 @@ place this code and save it to your **application/views/** directory:: The Controller ============== -Using a text editor, create a controller called upload.php. In it, place +Using a text editor, create a controller called Upload.php. In it, place this code and save it to your **application/controllers/** directory:: load->model('model_name'); If your model is located in a subdirectory, include the relative path from your models directory. For example, if you have a model located at -application/models/blog/queries.php you'll load it using:: +application/models/blog/Queries.php you'll load it using:: $this->load->model('blog/queries'); diff --git a/user_guide_src/source/libraries/migration.rst b/user_guide_src/source/libraries/migration.rst index b734f5c34..9dc3c08da 100644 --- a/user_guide_src/source/libraries/migration.rst +++ b/user_guide_src/source/libraries/migration.rst @@ -86,7 +86,7 @@ Then in **application/config/migration.php** set **$config['migration_version'] Usage Example ************* -In this example some simple code is placed in **application/controllers/migrate.php** +In this example some simple code is placed in **application/controllers/Migrate.php** to update the schema.:: `_. @@ -85,7 +85,7 @@ 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. +application/controllers/News.php. :: diff --git a/user_guide_src/source/tutorial/static_pages.rst b/user_guide_src/source/tutorial/static_pages.rst index 97c74601d..330a50ecf 100644 --- a/user_guide_src/source/tutorial/static_pages.rst +++ b/user_guide_src/source/tutorial/static_pages.rst @@ -20,7 +20,7 @@ match: 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 +Create a file at application/controllers/Pages.php with the following code. :: -- cgit v1.2.3-24-g4f1b From 025e6623f15a00572e63c2056ec6364e42a0eac9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Jul 2013 14:46:17 +0300 Subject: [ci skip] Add a changelog entry for class file naming rule change --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index efbe86069..2bd34c33b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -19,6 +19,7 @@ Release Date: Not Released - General Changes - PHP 5.1.6 is no longer supported. CodeIgniter now requires PHP 5.2.4. + - Changed filenaming convention (class file names now must be Ucfirst and everything else in lowercase). - ``$_SERVER['CI_ENV']`` can now be set to control the ``ENVIRONMENT`` constant. - Added an optional backtrace to php-error template. - Added Android to the list of user agents. -- cgit v1.2.3-24-g4f1b From e3e2c69bb7a58b966ec550c18d1cb845af30d7d9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Jul 2013 16:25:44 +0300 Subject: [ci skip] Fix style guide typos --- user_guide_src/source/general/styleguide.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst index 1683b04cd..5613eabec 100644 --- a/user_guide_src/source/general/styleguide.rst +++ b/user_guide_src/source/general/styleguide.rst @@ -97,8 +97,8 @@ Class files must be named in a Ucfirst-like manner, while any other file name **CORRECT**:: - SomeLibrary.php - Some_Library.php + Somelibrary.php + Some_library.php applicationconfig.php application_config.php -- cgit v1.2.3-24-g4f1b From 519f87a07bd1fe3a9ec037f727628bb6c7c8e251 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 23 Jul 2013 17:16:10 +0300 Subject: Loader changes & optimizations related to issue #2551 --- user_guide_src/source/changelog.rst | 3 +++ user_guide_src/source/libraries/loader.rst | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2bd34c33b..08a8f0b38 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -375,6 +375,8 @@ Release Date: Not Released - ``$config['rewrite_short_tags']`` now has no effect when using PHP 5.4 as ``` changes include: @@ -596,6 +598,7 @@ Bug fixes for 3.0 - Fixed a bug (#2490) - :doc:`Database Class ` method ``query()`` returning boolean instead of a result object for PostgreSQL-specific *INSERT INTO ... RETURNING* statements. - Fixed a bug (#249) - :doc:`Cache Library ` didn't properly handle Memcache(d) configurations with missing options. - Fixed a bug (#180) - :php:func:`config_item()` didn't take into account run-time configuration changes. +- Fixed a bug (#2551) - :doc:`Loader Library ` method ``library()`` didn't properly check if a class that is being loaded already exits. Version 2.1.4 ============= diff --git a/user_guide_src/source/libraries/loader.rst b/user_guide_src/source/libraries/loader.rst index 1597bf1c8..19446a9c8 100644 --- a/user_guide_src/source/libraries/loader.rst +++ b/user_guide_src/source/libraries/loader.rst @@ -261,6 +261,32 @@ $this->load->config('file_name') This method is an alias of the :doc:`config file loading method `: ``$this->config->load()`` +$this->load->is_loaded('library_name') +====================================== + +The ``is_loaded()`` method allows you to check if a class has already +been loaded or not. + +.. note:: The word "class" here refers to libraries and drivers. + +If the requested class has been loaded, the method returns its assigned +name in the CI Super-object and FALSE if it's not:: + + $this->load->library('form_validation'); + $this->load->is_loaded('Form_validation'); // returns 'form_validation' + + $this->load->is_loaded('Nonexistent_library'); // returns FALSE + +.. important:: If you have more than one instance of a class (assigned to + different properties), then the first one will be returned. + +:: + + $this->load->library('form_validation', $config, 'fv'); + $this->load->library('form_validation'); + + $this->load->is_loaded('Form_validation'); // returns 'fv' + Application "Packages" ====================== -- cgit v1.2.3-24-g4f1b From 1eb59c99a4097f9cfdb99434a88a73535a5fbb57 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Wed, 24 Jul 2013 03:39:45 +0200 Subject: Add a changelog entry about changes in Array helper's element() and elements() --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 08a8f0b38..2ecbcb3da 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -130,6 +130,7 @@ Release Date: Not Released - Added *colors* configuration to allow customization for the *background*, *border*, *text* and *grid* colors. - :doc:`Directory Helper ` :php:func:`directory_map()` will now append ``DIRECTORY_SEPARATOR`` to directory names in the returned array. + - :doc:`Array Helper ` :php:func:`element()` and :php:func:`elements()` now return NULL instead of FALSE when the required elements don't exist. - :doc:`Language Helper ` :php:func:`lang()` now accepts an optional list of additional HTML attributes. - Deprecated the :doc:`Email Helper ` as its ``valid_email()``, ``send_email()`` functions are now only aliases for PHP native functions ``filter_var()`` and ``mail()`` respectively. -- 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/changelog.rst | 3 ++- user_guide_src/source/installation/upgrade_300.rst | 19 +++++++++++++------ user_guide_src/source/libraries/config.rst | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2ecbcb3da..71f53059d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -407,7 +407,8 @@ Release Date: Not Released - :doc:`Config Library ` changes include: - Changed ``site_url()`` method to accept an array as well. - - Removed internal method ``_assign_to_config()`` and moved it's implementation in *CodeIgniter.php* instead. + - Removed internal method ``_assign_to_config()`` and moved its implementation to *CodeIgniter.php* instead. + - ``item()`` now returns NULL instead of FALSE when the required config item doesn't exist. - :doc:`Security Library ` changes include: 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 diff --git a/user_guide_src/source/libraries/config.rst b/user_guide_src/source/libraries/config.rst index 08d9c2905..654dc4ded 100644 --- a/user_guide_src/source/libraries/config.rst +++ b/user_guide_src/source/libraries/config.rst @@ -90,7 +90,7 @@ example, to fetch your language choice you'll do this:: $lang = $this->config->item('language'); -The function returns FALSE (boolean) if the item you are trying to fetch +The function returns NULL if the item you are trying to fetch does not exist. If you are using the second parameter of the $this->config->load -- cgit v1.2.3-24-g4f1b From 90f316a8615fbbbc0810d945dd1a237662c6bfbf Mon Sep 17 00:00:00 2001 From: vlakoff Date: Thu, 25 Jul 2013 04:33:56 +0200 Subject: Adjustments to the previous commit --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 71f53059d..77cd39de3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -408,7 +408,7 @@ Release Date: Not Released - Changed ``site_url()`` method to accept an array as well. - Removed internal method ``_assign_to_config()`` and moved its implementation to *CodeIgniter.php* instead. - - ``item()`` now returns NULL instead of FALSE when the required config item doesn't exist. + - ``item()`` now returns NULL instead of FALSE when the required config item doesn't exist. - :doc:`Security Library ` changes include: -- cgit v1.2.3-24-g4f1b From 122ca9bd8b055eaabee2ec54f476749107533565 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 26 Jul 2013 18:16:26 +0300 Subject: Fix #2560 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 08a8f0b38..5eda25e15 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -599,6 +599,7 @@ Bug fixes for 3.0 - Fixed a bug (#249) - :doc:`Cache Library ` didn't properly handle Memcache(d) configurations with missing options. - Fixed a bug (#180) - :php:func:`config_item()` didn't take into account run-time configuration changes. - Fixed a bug (#2551) - :doc:`Loader Library ` method ``library()`` didn't properly check if a class that is being loaded already exits. +- Fixed a bug (#2560) - :doc:`Form Helper ` function :php:func:`form_open()` set the 'method="post"' attribute only if the passed attributes equaled an empty string. Version 2.1.4 ============= -- 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') 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 bb8b08982369dd6a2d321844dced488f92134f20 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Sun, 28 Jul 2013 22:35:04 +0200 Subject: Polishing Form helper --- user_guide_src/source/helpers/form_helper.rst | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index b2a9b6f0f..8f7515788 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -22,7 +22,7 @@ form_open() .. php:function:: form_open($action = '', $attributes = '', $hidden = array()) :param string $action: Form action/target URI string - :param string $attributes: HTML attributes + :param array $attributes: HTML attributes :param array $hidden: An array of hidden fields' definitions :returns: string @@ -41,7 +41,7 @@ Here's a simple example:: The above example would create a form that points to your base URL plus the "email/send" URI segments, like this:: -
+ Adding Attributes ^^^^^^^^^^^^^^^^^ @@ -52,9 +52,13 @@ parameter, like this:: $attributes = array('class' => 'email', 'id' => 'myform'); echo form_open('email/send', $attributes); -The above example would create a form similar to this:: +Alternatively, you can specify the second parameter as a string:: + + echo form_open('email/send', 'class="email" id="myform"'); + +The above examples would create a form similar to this:: - + Adding Hidden Input Fields ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -65,6 +69,8 @@ third parameter, like this:: $hidden = array('username' => 'Joe', 'member_id' => '234'); echo form_open('email/send', '', $hidden); +You can skip the second parameter by passing any falsy value to it. + The above example would create a form similar to this:: @@ -77,7 +83,7 @@ form_open_multipart() .. php:function:: form_open_multipart($action = '', $attributes = array(), $hidden = array()) :param string $action: Form action/target URI string - :param string $attributes: HTML attributes + :param array $attributes: HTML attributes :param array $hidden: An array of hidden fields' definitions :returns: string @@ -407,16 +413,14 @@ The third parameter contains a boolean TRUE/FALSE to determine whether the box should be checked or not. Similar to the other form functions in this helper, you can also pass an -array of attributes to the function - -:: +array of attributes to the function:: $data = array( 'name' => 'newsletter', - 'id'      => 'newsletter', - 'value'   => 'accept', + 'id' => 'newsletter', + 'value' => 'accept', 'checked' => TRUE, - 'style'   => 'margin:10px' + 'style' => 'margin:10px' ); echo form_checkbox($data); -- cgit v1.2.3-24-g4f1b From ed670246fa70d0156b561c56291b8bd58aa9df34 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Mon, 29 Jul 2013 08:31:51 +0200 Subject: Change spaces to tabs --- user_guide_src/source/helpers/form_helper.rst | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index 8f7515788..f49027baa 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -264,10 +264,10 @@ multiple select for you. Example:: $options = array( - 'small' => 'Small Shirt', - 'med' => 'Medium Shirt', - 'large' => 'Large Shirt', - 'xlarge' => 'Extra Large Shirt', + 'small' => 'Small Shirt', + 'med' => 'Medium Shirt', + 'large' => 'Large Shirt', + 'xlarge' => 'Extra Large Shirt', ); $shirts_on_sale = array('small', 'large'); @@ -416,11 +416,11 @@ Similar to the other form functions in this helper, you can also pass an array of attributes to the function:: $data = array( - 'name' => 'newsletter', - 'id' => 'newsletter', - 'value' => 'accept', - 'checked' => TRUE, - 'style' => 'margin:10px' + 'name' => 'newsletter', + 'id' => 'newsletter', + 'value' => 'accept', + 'checked' => TRUE, + 'style' => 'margin:10px' ); echo form_checkbox($data); @@ -527,11 +527,11 @@ Or you can pass an associative array containing any data you wish your form to contain:: $data = array( - 'name' => 'button', - 'id' => 'button', - 'value' => 'true', - 'type' => 'reset', - 'content' => 'Reset' + 'name' => 'button', + 'id' => 'button', + 'value' => 'true', + 'type' => 'reset', + 'content' => 'Reset' ); echo form_button($data); -- cgit v1.2.3-24-g4f1b From 530a3daec00186562e7e081ba77173b5ad065935 Mon Sep 17 00:00:00 2001 From: Tyler Brownell Date: Tue, 30 Jul 2013 10:20:50 -0400 Subject: Updated Changelog Cache Log Level - Updated the changelog to include the log level updates in the cache drivers. --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1e463db8d..4cef0e683 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -311,6 +311,7 @@ Release Date: Not Released - Added Wincache driver. - Added Redis driver. - Added a *key_prefix* option for cache IDs. + - Updated driver ``is_supported()`` methods to log at the "debug" level. - :doc:`Email library ` changes include: -- cgit v1.2.3-24-g4f1b From 4495cc740c1c0e382cc62d3d174abd17c0b4d84f Mon Sep 17 00:00:00 2001 From: Hunter Wu Date: Sun, 4 Aug 2013 12:31:52 +0800 Subject: Rename bad chars property to filename_bad_chars, remove the setter and add changelog entry --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4cef0e683..fd1ce2dc0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -416,6 +416,7 @@ Release Date: Not Released - Added method ``strip_image_tags()``. - Added ``$config['csrf_regeneration']``, which makes token regeneration optional. - Added ``$config['csrf_exclude_uris']``, which allows you list URIs which will not have the CSRF validation methods run. + - Changed ``sanitize_filename()``, makes filename_bad_chars a public property. - :doc:`URI Routing ` changes include: -- cgit v1.2.3-24-g4f1b From e265097c7ffd2ea59e4f972346ea0a87ac75edb2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 6 Aug 2013 12:38:38 +0300 Subject: [ci skip] Alter a changelog line --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index fd1ce2dc0..81d92f755 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -416,7 +416,7 @@ Release Date: Not Released - Added method ``strip_image_tags()``. - Added ``$config['csrf_regeneration']``, which makes token regeneration optional. - Added ``$config['csrf_exclude_uris']``, which allows you list URIs which will not have the CSRF validation methods run. - - Changed ``sanitize_filename()``, makes filename_bad_chars a public property. + - Modified method ``sanitize_filename()`` to read a public ``$filename_bad_chars`` property for getting the invalid characters list. - :doc:`URI Routing ` changes include: -- cgit v1.2.3-24-g4f1b From 5b55c15f24b518aa4775a0c15382c7b4bf72e1bc Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 6 Aug 2013 14:14:32 +0300 Subject: Fix #2585 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 81d92f755..8b5798751 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -604,6 +604,7 @@ Bug fixes for 3.0 - Fixed a bug (#180) - :php:func:`config_item()` didn't take into account run-time configuration changes. - Fixed a bug (#2551) - :doc:`Loader Library ` method ``library()`` didn't properly check if a class that is being loaded already exits. - Fixed a bug (#2560) - :doc:`Form Helper ` function :php:func:`form_open()` set the 'method="post"' attribute only if the passed attributes equaled an empty string. +- Fixed a bug (#2585) - :doc:`Query Builder ` methods ``min()``, ``max()``, ``avg()``, ``sum()`` didn't escape field names. Version 2.1.4 ============= -- 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/changelog.rst | 10 +++++----- user_guide_src/source/helpers/smiley_helper.rst | 6 +++--- user_guide_src/source/installation/upgrade_300.rst | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8b5798751..a987c507d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -75,7 +75,7 @@ Release Date: Not Released - :php:func:`anchor_popup()` will now fill the *href* attribute with the URL and its JS code will return FALSE instead. - Added JS window name support to the :php:func:`anchor_popup()` function. - Added support (auto-detection) for HTTP/1.1 response code 303 in :php:func:`redirect()`. - - Changed :php:func:`redirect()` to only choose the **refresh** method only on IIS servers, instead of all servers on Windows (when **auto** is used). + - Changed :php:func:`redirect()` to choose the **refresh** method only on IIS servers, instead of all servers on Windows (when **auto** is used). - Changed :php:func:`anchor()`, :php:func:`anchor_popup()`, and :php:func:`redirect()` to support protocol-relative URLs (e.g. *//ellislab.com/codeigniter*). - Added an optional second parameter to both :php:func:`base_url()` and :php:func:`site_url()` that allows enforcing of a protocol different than the one in the *base_url* configuration setting. @@ -515,7 +515,7 @@ Bug fixes for 3.0 - Fixed a bug (#784, #861) - :doc:`Database Forge ` method ``create_table()`` used to accept constraints for MSSQL/SQLSRV integer-type columns. - Fixed a bug (#706) - SQLSRV/MSSSQL didn't escape field names. - Fixed a bug (#1452) - ``protect_identifiers()`` didn't properly detect identifiers with spaces in their names. -- Fixed a bug where ``protect_identifiers()`` ignored it's extra arguments when the value passed to it is an array. +- Fixed a bug where ``protect_identifiers()`` ignored its extra arguments when the value passed to it is an array. - Fixed a bug where ``_has_operator()`` didn't detect BETWEEN. - Fixed a bug in :doc:`Query Builder `'s ``join()`` method where it failed with identifiers containing dashes. - Fixed a bug (#1264) - :doc:`Database Forge ` and :doc:`Database Utilities ` didn't update/reset the databases and tables list cache when a table or a database is created, dropped or renamed. @@ -555,7 +555,7 @@ Bug fixes for 3.0 - Fixed a bug where the :doc:`Session Library ` accepted cookies with *last_activity* values being in the future. - Fixed a bug (#1897) - :doc:`Email Library ` triggered PHP E_WARNING errors when *mail* protocol used and ``to()`` is never called. - Fixed a bug (#1409) - :doc:`Email Library ` didn't properly handle multibyte characters when applying Q-encoding to headers. -- Fixed a bug where :doc:`Email Library ` didn't honor it's *wordwrap* setting while handling alternative messages. +- Fixed a bug where :doc:`Email Library ` didn't honor its *wordwrap* setting while handling alternative messages. - Fixed a bug (#1476, #1909) - :doc:`Pagination Library ` didn't take into account actual routing when determining the current page. - Fixed a bug (#1766) - :doc:`Query Builder ` didn't always take into account the *dbprefix* setting. - Fixed a bug (#779) - :doc:`URI Class ` didn't always trim slashes from the *uri_string* as shown in the documentation. @@ -602,7 +602,7 @@ Bug fixes for 3.0 - Fixed a bug (#2490) - :doc:`Database Class ` method ``query()`` returning boolean instead of a result object for PostgreSQL-specific *INSERT INTO ... RETURNING* statements. - Fixed a bug (#249) - :doc:`Cache Library ` didn't properly handle Memcache(d) configurations with missing options. - Fixed a bug (#180) - :php:func:`config_item()` didn't take into account run-time configuration changes. -- Fixed a bug (#2551) - :doc:`Loader Library ` method ``library()`` didn't properly check if a class that is being loaded already exits. +- Fixed a bug (#2551) - :doc:`Loader Library ` method ``library()`` didn't properly check if a class that is being loaded already exists. - Fixed a bug (#2560) - :doc:`Form Helper ` function :php:func:`form_open()` set the 'method="post"' attribute only if the passed attributes equaled an empty string. - Fixed a bug (#2585) - :doc:`Query Builder ` methods ``min()``, ``max()``, ``avg()``, ``sum()`` didn't escape field names. @@ -684,7 +684,7 @@ Bug fixes for 2.1.1 - Fixed a bug (#538) - Windows paths were ignored when using the :doc:`Image Manipulation Library ` to create a new file. - Fixed a bug - When database caching was enabled, $this->db->query() checked the cache before binding variables which resulted in cached queries never being found. - Fixed a bug - CSRF cookie value was allowed to be any (non-empty) string before being written to the output, making code injection a risk. -- Fixed a bug (#726) - PDO put a 'dbname' argument in it's connection string regardless of the database platform in use, which made it impossible to use SQLite. +- Fixed a bug (#726) - PDO put a 'dbname' argument in its connection string regardless of the database platform in use, which made it impossible to use SQLite. - Fixed a bug - ``CI_DB_pdo_driver::num_rows()`` was not returning properly value with SELECT queries, cause it was relying on ``PDOStatement::rowCount()``. - Fixed a bug (#1059) - ``CI_Image_lib::clear()`` was not correctly clearing all necessary object properties, namely width and height. diff --git a/user_guide_src/source/helpers/smiley_helper.rst b/user_guide_src/source/helpers/smiley_helper.rst index 3925f8b1a..cfd52ffbc 100644 --- a/user_guide_src/source/helpers/smiley_helper.rst +++ b/user_guide_src/source/helpers/smiley_helper.rst @@ -17,7 +17,7 @@ This helper is loaded using the following code:: Overview ======== -The Smiley helper has a renderer that takes plain text simileys, like +The Smiley helper has a renderer that takes plain text smileys, like :-) and turns them into a image representation, like |smile!| It also lets you display a set of smiley images that when clicked will @@ -44,7 +44,7 @@ The Controller -------------- In your **application/controllers/** directory, create a file called -smileys.php and place the code below in it. +Smileys.php and place the code below in it. .. important:: Change the URL in the :php:func:`get_clickable_smileys()` function below so that it points to your smiley folder. @@ -156,7 +156,7 @@ string, the second must contain the URL to your smiley folder Example:: - $str = 'Here are some simileys: :-) ;-)'; + $str = 'Here are some smileys: :-) ;-)'; $str = parse_smileys($str, "http://example.com/images/smileys/"); echo $str; 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 2b956af4588eb64a7a4f9c72e1d223a33b65e8c6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 7 Aug 2013 14:32:56 +0300 Subject: An improved version of PR #2584, fixes #2583 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a987c507d..8b73e7a98 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -605,6 +605,7 @@ Bug fixes for 3.0 - Fixed a bug (#2551) - :doc:`Loader Library ` method ``library()`` didn't properly check if a class that is being loaded already exists. - Fixed a bug (#2560) - :doc:`Form Helper ` function :php:func:`form_open()` set the 'method="post"' attribute only if the passed attributes equaled an empty string. - Fixed a bug (#2585) - :doc:`Query Builder ` methods ``min()``, ``max()``, ``avg()``, ``sum()`` didn't escape field names. +- Fixed an edge case (#2583) in the :doc:`Email Library ` where `Suhosin ` blocked messages sent via ``mail()`` due to trailing newspaces in headers. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 2f8d2d381ef4a2fd9ea8f67a36a731aae8b14064 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 7 Aug 2013 15:54:47 +0300 Subject: Add a changelog entry for PR #2590 and further optimize log_message() CI_Log::write_log() already checks the log threshold, so there's no point in doing it in log_message() as well. --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8b73e7a98..4a45a71b0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -606,6 +606,7 @@ Bug fixes for 3.0 - Fixed a bug (#2560) - :doc:`Form Helper ` function :php:func:`form_open()` set the 'method="post"' attribute only if the passed attributes equaled an empty string. - Fixed a bug (#2585) - :doc:`Query Builder ` methods ``min()``, ``max()``, ``avg()``, ``sum()`` didn't escape field names. - Fixed an edge case (#2583) in the :doc:`Email Library ` where `Suhosin ` blocked messages sent via ``mail()`` due to trailing newspaces in headers. +- Fixed a bug (#2590) - :php:func:`log_message()` didn't actually cache the ``CI_Log`` class instance. Version 2.1.4 ============= -- 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') 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/changelog.rst | 1 + user_guide_src/source/installation/upgrade_300.rst | 21 ++++++++++++++++----- user_guide_src/source/libraries/input.rst | 16 ++++++++++++---- 3 files changed, 29 insertions(+), 9 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4a45a71b0..ba104bb72 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -388,6 +388,7 @@ Release Date: Not Released - Changed method ``valid_ip()`` to use PHP's native ``filter_var()`` function. - Changed internal method ``_sanitize_globals()`` to skip enforcing reversal of *register_globals* in PHP 5.4+, where this functionality no longer exists. - Changed methods ``get()``, ``post()``, ``get_post()``, ``cookie()``, ``server()``, ``user_agent()`` to return NULL instead of FALSE when no value is found. + - Changed method ``get_post()`` to check in GET then in POST. Added method ``post_get()`` which checks in POST then in GET, as ``get_post()`` was doing before. - Changed method ``_fetch_from_array()`` to parse array notation in field name. - :doc:`Common functions ` changes include: 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 diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 177f5cb64..fb245d7cd 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -98,7 +98,7 @@ The method returns NULL if there are no items in the POST. $this->input->get() =================== -This method is identical to the post method, only it fetches get data +This method is identical to the POST method, only it fetches GET data :: $this->input->get('some_data', TRUE); @@ -116,18 +116,26 @@ The method returns NULL if there are no items in the GET. $this->input->get(); // returns all GET items without XSS filtering +$this->input->post_get() +======================== + +This method will search through both the POST and GET streams for +data, looking first in POST, and then in GET:: + + $this->input->post_get('some_data', TRUE); + $this->input->get_post() ======================== -This method will search through both the post and get streams for -data, looking first in post, and then in get:: +This method will search through both the POST and GET streams for +data, looking first in GET, and then in POST:: $this->input->get_post('some_data', TRUE); $this->input->cookie() ====================== -This method is identical to the post method, only it fetches cookie data +This method is identical to the POST method, only it fetches cookie data :: $this->input->cookie('some_cookie'); -- 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/changelog.rst | 2 +- user_guide_src/source/installation/upgrade_300.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ba104bb72..84989189d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -388,7 +388,7 @@ Release Date: Not Released - Changed method ``valid_ip()`` to use PHP's native ``filter_var()`` function. - Changed internal method ``_sanitize_globals()`` to skip enforcing reversal of *register_globals* in PHP 5.4+, where this functionality no longer exists. - Changed methods ``get()``, ``post()``, ``get_post()``, ``cookie()``, ``server()``, ``user_agent()`` to return NULL instead of FALSE when no value is found. - - Changed method ``get_post()`` to check in GET then in POST. Added method ``post_get()`` which checks in POST then in GET, as ``get_post()`` was doing before. + - Added method ``post_get()`` and changed ``get_post()`` to search in GET data first. Both methods' names now properly match their GET/POST data search priorities. - Changed method ``_fetch_from_array()`` to parse array notation in field name. - :doc:`Common functions ` changes include: 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 ce3053792fd2af643563906d1be88be88f9c3a6f Mon Sep 17 00:00:00 2001 From: Zaki Akhmad Date: Wed, 14 Aug 2013 15:38:51 +0700 Subject: add '$' at news_section.rst file --- user_guide_src/source/tutorial/news_section.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/tutorial/news_section.rst b/user_guide_src/source/tutorial/news_section.rst index c21f4e6de..ad9ed41d3 100644 --- a/user_guide_src/source/tutorial/news_section.rst +++ b/user_guide_src/source/tutorial/news_section.rst @@ -127,7 +127,7 @@ the views. public function index() { - data['news'] = $this->news_model->get_news(); + $data['news'] = $this->news_model->get_news(); $data['title'] = 'News archive'; $this->load->view('templates/header', $data); -- cgit v1.2.3-24-g4f1b From ac23e210c71807858e98ecdb62185adc5cb75111 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 28 Aug 2013 13:07:05 +0300 Subject: [ci skip] Fix a documentation error --- user_guide_src/source/libraries/form_validation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 8b35fdc75..032cff23b 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -431,7 +431,7 @@ Here's how your controller should now look:: } } - protected function username_check($str) + public function username_check($str) { if ($str == 'test') { -- cgit v1.2.3-24-g4f1b From 967eea59ab1abf5c1237ec802c2f85c19cfb7e11 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Mon, 2 Sep 2013 02:15:45 +0200 Subject: Add changelog entry for #2609 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 84989189d..4f30a9aa7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -608,6 +608,7 @@ Bug fixes for 3.0 - Fixed a bug (#2585) - :doc:`Query Builder ` methods ``min()``, ``max()``, ``avg()``, ``sum()`` didn't escape field names. - Fixed an edge case (#2583) in the :doc:`Email Library ` where `Suhosin ` blocked messages sent via ``mail()`` due to trailing newspaces in headers. - Fixed a bug (#2590) - :php:func:`log_message()` didn't actually cache the ``CI_Log`` class instance. +- Fixed a bug (#2609) - :php:func:`get_config()` optional argument was only effective on first function call. Also, it can now add items, in addition to updating existing items. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 4013be3d0953612ce081802bb6cc331338d8f58a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 10 Sep 2013 19:31:04 +0300 Subject: Add support for UPDATE ... RETURNING statements in PostgreSQL An improved version of PR #2629. Also removes REPLACE from the regular expression, as it is not supported by PostgreSQL. --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4f30a9aa7..3e36d88f5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -600,7 +600,7 @@ Bug fixes for 3.0 - Fixed a bug (#2388) - :doc:`Email Library ` used to ignore attachment errors, resulting in broken emails being sent. - Fixed a bug (#2498) - :doc:`Form Validation Library ` rule **valid_base64** only checked characters instead of actual validity. - Fixed a bug (#2425) - OCI8 :doc:`database ` driver's method ``stored_procedure()`` didn't log an error unless **db_debug** was set to TRUE. -- Fixed a bug (#2490) - :doc:`Database Class ` method ``query()`` returning boolean instead of a result object for PostgreSQL-specific *INSERT INTO ... RETURNING* statements. +- Fixed a bug (#2490) - :doc:`Database Class ` method ``query()`` returning boolean instead of a result object when the PostgreSQL-specific *RETURNING* clause is used. - Fixed a bug (#249) - :doc:`Cache Library ` didn't properly handle Memcache(d) configurations with missing options. - Fixed a bug (#180) - :php:func:`config_item()` didn't take into account run-time configuration changes. - Fixed a bug (#2551) - :doc:`Loader Library ` method ``library()`` didn't properly check if a class that is being loaded already exists. -- cgit v1.2.3-24-g4f1b From 488ef2119e75ce6c299a193aed035218256eebd3 Mon Sep 17 00:00:00 2001 From: Kaiwang Chen Date: Thu, 12 Sep 2013 11:55:45 +0800 Subject: Add changelog entry for #2633. --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3e36d88f5..a681cf3cf 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -436,6 +436,7 @@ Release Date: Not Released - Added support for HTTP-Only cookies with new config option *cookie_httponly* (default FALSE). - Renamed method ``_call_hook()`` to ``call_hook()`` in the :doc:`Hooks Library `. - ``$config['time_reference']`` now supports all timezone strings supported by PHP. + - Made the exception handler complete by registering a shutdown handler to redirect critical events to it. Bug fixes for 3.0 -- cgit v1.2.3-24-g4f1b From 8ce3134e739c688f2a3ade0d8c792d05d7879a78 Mon Sep 17 00:00:00 2001 From: Kaiwang Chen Date: Thu, 12 Sep 2013 22:55:58 +0800 Subject: Make the changelog entry for #2633 more descriptive. --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a681cf3cf..c99afc112 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -436,7 +436,7 @@ Release Date: Not Released - Added support for HTTP-Only cookies with new config option *cookie_httponly* (default FALSE). - Renamed method ``_call_hook()`` to ``call_hook()`` in the :doc:`Hooks Library `. - ``$config['time_reference']`` now supports all timezone strings supported by PHP. - - Made the exception handler complete by registering a shutdown handler to redirect critical events to it. + - Made the exception handler complete by registering a shutdown handler to redirect critical events such as PHP parse errors to it, so that they can be displayed and logged without the help of the standard PHP error handler. Bug fixes for 3.0 -- cgit v1.2.3-24-g4f1b From 9b34448a295cac42273439e7cadb284bd3fe1a4d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 12 Sep 2013 20:13:07 +0300 Subject: [ci skip] Simplify changelog message for PR #2633 --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c99afc112..69f88a8a8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -436,7 +436,7 @@ Release Date: Not Released - Added support for HTTP-Only cookies with new config option *cookie_httponly* (default FALSE). - Renamed method ``_call_hook()`` to ``call_hook()`` in the :doc:`Hooks Library `. - ``$config['time_reference']`` now supports all timezone strings supported by PHP. - - Made the exception handler complete by registering a shutdown handler to redirect critical events such as PHP parse errors to it, so that they can be displayed and logged without the help of the standard PHP error handler. + - Fatal PHP errors are now also passed to ``_exception_handler()``, so they can be logged. Bug fixes for 3.0 -- cgit v1.2.3-24-g4f1b From 838c9a96f645aac24daa31285efa1051535c4219 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 13 Sep 2013 14:05:13 +0300 Subject: Drop the unused parameter from log_message() / CI_Log::write_log() --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/general/common_functions.rst | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 69f88a8a8..3bf2d708f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -399,6 +399,7 @@ Release Date: Not Released - Changed ``_exception_handler()`` to respect php.ini *display_errors* setting. - Added function :php:func:`is_https()` to check if a secure connection is used. - Added function :php:func:`function_usable()` to check if a function exists and is not disabled by `Suhosin `. + - Removed the third (`$php_error`) from function :php:func:`log_message()`. - :doc:`Output Library ` changes include: diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index 32e8a8be0..e085ef808 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -96,11 +96,10 @@ please see the :doc:`Error Handling ` documentation. log_message() ============= -.. php:function:: log_message($level, $message, $php_error = FALSE) +.. php:function:: log_message($level, $message) :param string $level: Log level: 'error', 'debug' or 'info' :param string $message: Message to log - :param bool $php_error: Whether we're logging a native PHP error message :returns: void This function is an alias for ``CI_Log::write_log()``. For more info, -- cgit v1.2.3-24-g4f1b From 3c5ec85c6a6303dfed8cefbbb77f5ce7571967bb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 13 Sep 2013 15:01:08 +0300 Subject: Update MySQLi to use the PHP API for transactions, where possible --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3bf2d708f..98036659f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -181,6 +181,7 @@ Release Date: Not Released - Server version checking is now done via ``mysqli::$server_info`` instead of running an SQL query. - Added persistent connections support for PHP >= 5.3. - Added support for ``backup()`` in :doc:`Database Utilities `. + - Changed methods ``trans_being()``, ``trans_commit()`` and ``trans_rollback()`` to use the PHP API instead of sending queries. - Improved support of the PDO driver, including: -- cgit v1.2.3-24-g4f1b From a9346aa754f5488f7535f580dd744477f52d5063 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 13 Sep 2013 16:03:07 +0300 Subject: Fix a PostgreSQL string escaping bug and use pg_escape_literal() when possible --- user_guide_src/source/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 98036659f..357ecc12e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -199,6 +199,7 @@ Release Date: Not Released - Removed ``limit()`` and ``order_by()`` support for *UPDATE* and *DELETE* queries as PostgreSQL does not support those features. - Added a work-around for dead persistent connections to be re-created after a database restart. - Changed ``db_connect()`` to include the (new) **schema** value into Postgre's **search_path** session variable. + - ``pg_escape_literal()`` is now used for escaping strings, if available. - Improved support of the CUBRID driver, including: @@ -612,6 +613,7 @@ Bug fixes for 3.0 - Fixed an edge case (#2583) in the :doc:`Email Library ` where `Suhosin ` blocked messages sent via ``mail()`` due to trailing newspaces in headers. - Fixed a bug (#2590) - :php:func:`log_message()` didn't actually cache the ``CI_Log`` class instance. - Fixed a bug (#2609) - :php:func:`get_config()` optional argument was only effective on first function call. Also, it can now add items, in addition to updating existing items. +- Fixed a bug in the 'postgre' :doc:`database ` driver where the connection ID wasn't passed to ``pg_escape_string()``. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From ae50f5537718431af05037c857d1c303e25a76f6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 13 Sep 2013 16:17:41 +0300 Subject: Fix #2639 --- user_guide_src/source/changelog.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 357ecc12e..f6207750e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -468,7 +468,7 @@ Bug fixes for 3.0 - Fixed a possible bug in ``CI_Input::is_ajax_request()`` where some clients might not send the X-Requested-With HTTP header value exactly as 'XmlHttpRequest'. - Fixed a bug (#1039) - MySQL's _backup() method failed due to a table name not being escaped. - Fixed a bug (#1070) - CI_DB_driver::initialize() didn't set a character set if a database is not selected. -- Fixed a bug (#177) - CI_Form_validation::set_value() didn't set the default value if POST data is NULL. +- Fixed a bug (#177) - ``CI_Form_validation::set_value()`` didn't set the default value if POST data is NULL. - Fixed a bug (#68, #414) - Oracle's escape_str() didn't properly escape LIKE wild characters. - Fixed a bug (#81) - ODBC's list_fields() and field_data() methods skipped the first column due to odbc_field_*() functions' index starting at 1 instead of 0. - Fixed a bug (#129) - ODBC's num_rows() returned -1 in some cases, due to not all subdrivers supporting the odbc_num_rows() function. @@ -614,6 +614,7 @@ Bug fixes for 3.0 - Fixed a bug (#2590) - :php:func:`log_message()` didn't actually cache the ``CI_Log`` class instance. - Fixed a bug (#2609) - :php:func:`get_config()` optional argument was only effective on first function call. Also, it can now add items, in addition to updating existing items. - Fixed a bug in the 'postgre' :doc:`database ` driver where the connection ID wasn't passed to ``pg_escape_string()``. +- Fixed a bug (#2639) - :doc:`Form Helper ` functions :php:func:`set_radio()` and :php:func:`set_checkbox()` didn't parse array notation for keys if the rule was not present in the :doc:`Form Validation Library `. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 67f6a5e0321cc5d71dc2adc8dc72c71e96408dac Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 13 Sep 2013 16:21:31 +0300 Subject: Fix array notation fields for set_select() as well --- user_guide_src/source/changelog.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f6207750e..61293a3b3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -596,7 +596,7 @@ Bug fixes for 3.0 - Fixed a bug (#2239) - :doc:`Email Library ` improperly handled the Subject when used with ``bcc_batch_mode`` resulting in E_WARNING messages and an empty Subject. - Fixed a bug (#2234) - :doc:`Query Builder ` didn't reset JOIN cache for write-type queries. - Fixed a bug (#2298) - :doc:`Database Results ` method ``next_row()`` kept returning the last row, allowing for infinite loops. -- Fixed a bug (#2236) - :doc:`Form Helper ` function ``set_value()`` didn't parse array notation for keys if the rule was not present in the :doc:`Form Validation Library `. +- Fixed a bug (#2236, #2639) - :doc:`Form Helper ` functions :func:`set_value()`, :func:`set_select()`, :func:`set_radio()`, :func:`set_checkbox()` didn't parse array notation for keys if the rule was not present in the :doc:`Form Validation Library `. - Fixed a bug (#2353) - :doc:`Query Builder ` erroneously prefixed literal strings with **dbprefix**. - Fixed a bug (#78) - :doc:`Cart Library ` didn't allow non-English letters in product names. - Fixed a bug (#77) - :doc:`Database Class ` didn't properly handle the transaction "test mode" flag. @@ -614,7 +614,6 @@ Bug fixes for 3.0 - Fixed a bug (#2590) - :php:func:`log_message()` didn't actually cache the ``CI_Log`` class instance. - Fixed a bug (#2609) - :php:func:`get_config()` optional argument was only effective on first function call. Also, it can now add items, in addition to updating existing items. - Fixed a bug in the 'postgre' :doc:`database ` driver where the connection ID wasn't passed to ``pg_escape_string()``. -- Fixed a bug (#2639) - :doc:`Form Helper ` functions :php:func:`set_radio()` and :php:func:`set_checkbox()` didn't parse array notation for keys if the rule was not present in the :doc:`Form Validation Library `. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From f4bfb16b5fdcd042d3751cab2626df678b8d59c0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 13 Sep 2013 18:14:29 +0300 Subject: [ci skip] Fix a changelog message --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 61293a3b3..6b82f2dde 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -181,7 +181,7 @@ Release Date: Not Released - Server version checking is now done via ``mysqli::$server_info`` instead of running an SQL query. - Added persistent connections support for PHP >= 5.3. - Added support for ``backup()`` in :doc:`Database Utilities `. - - Changed methods ``trans_being()``, ``trans_commit()`` and ``trans_rollback()`` to use the PHP API instead of sending queries. + - Changed methods ``trans_begin()``, ``trans_commit()`` and ``trans_rollback()`` to use the PHP API instead of sending queries. - Improved support of the PDO driver, including: -- cgit v1.2.3-24-g4f1b From 3914c0eff4414dc8997e6866276c5eefe6103ff3 Mon Sep 17 00:00:00 2001 From: AdwinTrave Date: Sun, 15 Sep 2013 13:21:38 -0400 Subject: Adding missing reference to min_length in rules reference --- user_guide_src/source/libraries/form_validation.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 032cff23b..8534175bb 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -866,6 +866,7 @@ Rule Parameter Description **is_unique** Yes Returns FALSE if the form element is not unique to the table and field name in the is_unique[table.field] parameter. Note: This rule requires :doc:`Query Builder <../database/query_builder>` to be enabled in order to work. +**min_length** Yes Returns FALSE if the form element is shorter then the parameter value. min_length[3] **max_length** Yes Returns FALSE if the form element is longer then the parameter value. max_length[12] **exact_length** Yes Returns FALSE if the form element is not exactly the parameter value. exact_length[8] **greater_than** Yes Returns FALSE if the form element is less than or equal to the parameter value or not greater_than[8] -- cgit v1.2.3-24-g4f1b From 0c23a2712b07a53041cf808c280e71c623df3c8a Mon Sep 17 00:00:00 2001 From: vlakoff Date: Fri, 20 Sep 2013 22:09:20 +0200 Subject: Fix duplicate changelog entry --- user_guide_src/source/changelog.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 69f88a8a8..e36be29f6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -766,7 +766,6 @@ Bug fixes for 2.1.0 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 $this->db->count_all() then $this->db->get() - Fixed a 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. @@ -787,7 +786,7 @@ Bug fixes for 2.1.0 - 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 invalid date time format in :doc:`Date helper ` and :doc:`XMLRPC library `. -- Fixed a bug (#200) - MySQL queries would be malformed after calling count_all() then db->get(). +- Fixed a bug (#200) - MySQL queries would be malformed after calling db->count_all() then db->get(). Version 2.0.3 ============= -- cgit v1.2.3-24-g4f1b From fd0aabb1e6f3db088ad9b3079adc0f9bba9b6c2b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 23 Sep 2013 13:18:20 +0300 Subject: Fix issue #33 --- user_guide_src/source/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d804cc532..a66fb265f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -392,6 +392,7 @@ Release Date: Not Released - Changed methods ``get()``, ``post()``, ``get_post()``, ``cookie()``, ``server()``, ``user_agent()`` to return NULL instead of FALSE when no value is found. - Added method ``post_get()`` and changed ``get_post()`` to search in GET data first. Both methods' names now properly match their GET/POST data search priorities. - Changed method ``_fetch_from_array()`` to parse array notation in field name. + - Added an option for ``_clean_input_keys()`` to return FALSE instead of terminating the whole script. - :doc:`Common functions ` changes include: @@ -614,6 +615,7 @@ Bug fixes for 3.0 - Fixed a bug (#2590) - :php:func:`log_message()` didn't actually cache the ``CI_Log`` class instance. - Fixed a bug (#2609) - :php:func:`get_config()` optional argument was only effective on first function call. Also, it can now add items, in addition to updating existing items. - Fixed a bug in the 'postgre' :doc:`database ` driver where the connection ID wasn't passed to ``pg_escape_string()``. +- Fixed a bug (#33) - Script execution was terminated when an invalid cookie key was encountered. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 871d8f67611d94e2662dd0ac6e06b96accc954e6 Mon Sep 17 00:00:00 2001 From: Jesse van Assen Date: Fri, 27 Sep 2013 12:04:37 +0200 Subject: Added changelog entry. --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2adbca19d..f5e2da738 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -501,6 +501,7 @@ Bug fixes for 3.0 - Fixed a bug (#2380) - :doc:`URI Routing ` method ``fetch_method()`` returned 'index' if the requested method name matches its controller name. - Fixed a bug (#2388) - :doc:`Email Library ` used to ignore attachment errors, resulting in broken emails being sent. - Fixed a bug (#2498) - :doc:`Form Validation Library ` rule **valid_base64** only checked characters instead of actual validity. +- Fixed a bug (#2515) - The script now halts when a fatal error occurs, instead of continuing. Version 2.1.3 ============= -- cgit v1.2.3-24-g4f1b From 8bb20a1ff7217c9f5125db49916da8a9b6574c19 Mon Sep 17 00:00:00 2001 From: Tomaz Lovrec Date: Wed, 16 Oct 2013 12:34:36 +0200 Subject: Fixed empty line at EOF and added changelog entry --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a66fb265f..a76fcd784 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -57,6 +57,7 @@ Release Date: Not Released - Removed *cheatsheets* and *quick_reference* PDFs from the documentation. - Added availability checks where usage of dangerous functions like ``eval()`` and ``exec()`` is required. - Added support for changing the file extension of log files using ``$config['log_file_extension']``. + - Added possibility clear out the cached variables from the Loader. - Helpers -- cgit v1.2.3-24-g4f1b From b69cbcb6844870af6f95fd7648c8533408b12eb6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Oct 2013 13:59:43 +0300 Subject: Changelog/doc edits following PR #2684 --- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/libraries/loader.rst | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a76fcd784..5774ff115 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -57,7 +57,6 @@ Release Date: Not Released - Removed *cheatsheets* and *quick_reference* PDFs from the documentation. - Added availability checks where usage of dangerous functions like ``eval()`` and ``exec()`` is required. - Added support for changing the file extension of log files using ``$config['log_file_extension']``. - - Added possibility clear out the cached variables from the Loader. - Helpers @@ -382,6 +381,7 @@ Release Date: Not Released - Added support for model aliasing on autoload. - Changed method ``is_loaded()`` to ask for the (case sensitive) library name instead of its instance name. - Removed ``$_base_classes`` property and unified all class data in ``$_ci_classes`` instead. + - Added method ``clear_vars()`` to allow clearing the cached variables for views. - :doc:`Input Library ` changes include: diff --git a/user_guide_src/source/libraries/loader.rst b/user_guide_src/source/libraries/loader.rst index 19446a9c8..91db5afbd 100644 --- a/user_guide_src/source/libraries/loader.rst +++ b/user_guide_src/source/libraries/loader.rst @@ -234,6 +234,11 @@ $this->load->get_vars() This method retrieves all variables available to your views. +$this->load->clear_vars() +========================= + +Clears cached view variables. + $this->load->helper('file_name') ================================ -- cgit v1.2.3-24-g4f1b From abcb67c76ccb384ea213f9c4f42a392b15b3e15e Mon Sep 17 00:00:00 2001 From: David Cox Jr Date: Wed, 16 Oct 2013 14:43:52 -0400 Subject: req. changes: cleaned up conditionals added changelog note regarding profiler updated as per styleguide --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a66fb265f..052624076 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -351,6 +351,7 @@ Release Date: Not Released - Database object names are now being displayed. - The sum of all queries running times in seconds is now being displayed. - Added support for displaying the HTTP DNT ("Do Not Track") header. + - Added support for displaying $_FILES. - :doc:`Migration Library ` changes include: -- cgit v1.2.3-24-g4f1b From 3fa729d7092c814fe14e15d8d51789ce7907f2a8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 18 Oct 2013 20:57:41 +0300 Subject: Fix issue #2681 (alternative to PR #2690) --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8f5cffcb0..b5c00699a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -618,6 +618,7 @@ Bug fixes for 3.0 - Fixed a bug (#2609) - :php:func:`get_config()` optional argument was only effective on first function call. Also, it can now add items, in addition to updating existing items. - Fixed a bug in the 'postgre' :doc:`database ` driver where the connection ID wasn't passed to ``pg_escape_string()``. - Fixed a bug (#33) - Script execution was terminated when an invalid cookie key was encountered. +- Fixed a bug (#2681) - `CI_Security::entity_decode()` used the `PREG_REPLACE_EVAL` flag, which is deprecated since PHP 5.5. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From a277a50f82dacaa129876160dadbda98fc9e33ca Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 18 Oct 2013 20:58:44 +0300 Subject: [ci skip] Fix a changelog entry --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b5c00699a..8c992a575 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -618,7 +618,7 @@ Bug fixes for 3.0 - Fixed a bug (#2609) - :php:func:`get_config()` optional argument was only effective on first function call. Also, it can now add items, in addition to updating existing items. - Fixed a bug in the 'postgre' :doc:`database ` driver where the connection ID wasn't passed to ``pg_escape_string()``. - Fixed a bug (#33) - Script execution was terminated when an invalid cookie key was encountered. -- Fixed a bug (#2681) - `CI_Security::entity_decode()` used the `PREG_REPLACE_EVAL` flag, which is deprecated since PHP 5.5. +- Fixed a bug (#2681) - ``CI_Security::entity_decode()`` used the `PREG_REPLACE_EVAL` flag, which is deprecated since PHP 5.5. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 6c85442746c46009cdf3fe517465e174a91cc4c5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 21 Oct 2013 13:58:15 +0300 Subject: Fix #2691 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8c992a575..9f6feb744 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -619,6 +619,7 @@ Bug fixes for 3.0 - Fixed a bug in the 'postgre' :doc:`database ` driver where the connection ID wasn't passed to ``pg_escape_string()``. - Fixed a bug (#33) - Script execution was terminated when an invalid cookie key was encountered. - Fixed a bug (#2681) - ``CI_Security::entity_decode()`` used the `PREG_REPLACE_EVAL` flag, which is deprecated since PHP 5.5. +- Fixed a bug (#2691) - nested transactions could end in a deadlock when an error is encountered with *db_debug* set to TRUE. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 72b4b3cbc71d2c266938b8878baba11c11c565ca Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 21 Oct 2013 14:44:57 +0300 Subject: Add 'filename' to the return elements for create_captcha() (PR #2602) --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/helpers/captcha_helper.rst | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8f5dfe540..053f57703 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -128,6 +128,7 @@ Release Date: Not Released - Added *word_length* and *pool* options to allow customization of the generated word. - Added *colors* configuration to allow customization for the *background*, *border*, *text* and *grid* colors. + - Added *filename* to the returned array elements. - :doc:`Directory Helper ` :php:func:`directory_map()` will now append ``DIRECTORY_SEPARATOR`` to directory names in the returned array. - :doc:`Array Helper ` :php:func:`element()` and :php:func:`elements()` now return NULL instead of FALSE when the required elements don't exist. diff --git a/user_guide_src/source/helpers/captcha_helper.rst b/user_guide_src/source/helpers/captcha_helper.rst index 3c56addf3..f47173453 100644 --- a/user_guide_src/source/helpers/captcha_helper.rst +++ b/user_guide_src/source/helpers/captcha_helper.rst @@ -26,7 +26,7 @@ create_captcha() :param string $img_path: Path to create the image in :param string $img_url: URL to the CAPTCHA image folder :param string $font_path: Server path to font - :returns: array('word' => $word, 'time' => $now, 'image' => $img) + :returns: array Takes an array of information to generate the CAPTCHA as input and creates the image to your specifications, returning an array of @@ -35,9 +35,10 @@ associative data about the image. :: array( - 'image' => IMAGE TAG - 'time' => TIMESTAMP (in microtime) - 'word' => CAPTCHA WORD + 'word' => CAPTCHA WORD, + 'time' => TIMESTAMP (in microtime), + 'image' => IMAGE TAG, + 'filename' => IMAGE FILE NAME ) The **image** is the actual image tag:: -- cgit v1.2.3-24-g4f1b From 32c7212edb0488524a0eece98cb1e2321ee90c29 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 21 Oct 2013 15:35:05 +0300 Subject: Add CI_Upload:: option --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/libraries/file_uploading.rst | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 053f57703..ecd0eb541 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -274,6 +274,7 @@ Release Date: Not Released - Added the **min_width** and **min_height** options for images. - Removed method ``clean_file_name()`` and its usage in favor of :doc:`Security Library `'s ``sanitize_filename()``. - Added **file_ext_tolower** config setting. + - Added **mod_mime_fix** option to disable suffixing multiple file extensions with an underscore. - :doc:`Cart library ` changes include: diff --git a/user_guide_src/source/libraries/file_uploading.rst b/user_guide_src/source/libraries/file_uploading.rst index a295d7427..ac56fabce 100644 --- a/user_guide_src/source/libraries/file_uploading.rst +++ b/user_guide_src/source/libraries/file_uploading.rst @@ -224,6 +224,11 @@ Preference Default Value Options Descripti **detect_mime** TRUE TRUE/FALSE (boolean) If set to TRUE, a server side detection of the file type will be performed to avoid code injection attacks. DO NOT disable this option unless you have no other option as that would cause a security risk. +**mod_mime_fix** TRUE TRUE/FALSE (boolean) If set to TRUE, multiple filename extensions will be suffixed with an + underscore in order to avoid triggering `Apache mod_mime + `_. + DO NOT turn off this option if your upload directory is public, as this + is a security risk. ============================ ================= ======================= ====================================================================== Setting preferences in a config file -- cgit v1.2.3-24-g4f1b From 4c07fce7191ed5d9c393479406cce454a9c4a7cc Mon Sep 17 00:00:00 2001 From: vlakoff Date: Fri, 25 Oct 2013 01:20:32 +0200 Subject: Implement $protocol parameter in Config base_url() and site_url() methods Let's keep the implementation logic in one place. Improves 2023c3d05b042cf1322286d69557c2b8bf3bd8d5. --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ecd0eb541..8f11bcc00 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -419,6 +419,7 @@ Release Date: Not Released - Changed ``site_url()`` method to accept an array as well. - Removed internal method ``_assign_to_config()`` and moved its implementation to *CodeIgniter.php* instead. - ``item()`` now returns NULL instead of FALSE when the required config item doesn't exist. + - Added an optional second parameter to both ``base_url()`` and ``site_url()`` that allows enforcing of a protocol different than the one in the *base_url* configuration setting. - :doc:`Security Library ` changes include: -- cgit v1.2.3-24-g4f1b From 8c0e56f5349cb52e993eb7132a87151e838e95b0 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Sat, 26 Oct 2013 01:15:49 +0200 Subject: Remove redundant changelog entry --- user_guide_src/source/changelog.rst | 1 - 1 file changed, 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8f11bcc00..c191432b8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -77,7 +77,6 @@ Release Date: Not Released - Added support (auto-detection) for HTTP/1.1 response code 303 in :php:func:`redirect()`. - Changed :php:func:`redirect()` to choose the **refresh** method only on IIS servers, instead of all servers on Windows (when **auto** is used). - Changed :php:func:`anchor()`, :php:func:`anchor_popup()`, and :php:func:`redirect()` to support protocol-relative URLs (e.g. *//ellislab.com/codeigniter*). - - Added an optional second parameter to both :php:func:`base_url()` and :php:func:`site_url()` that allows enforcing of a protocol different than the one in the *base_url* configuration setting. - :doc:`HTML Helper ` changes include: -- cgit v1.2.3-24-g4f1b From c6fc0c8a4e3e3909b305e3fc24d898a3563d82a8 Mon Sep 17 00:00:00 2001 From: kakysha Date: Mon, 28 Oct 2013 23:01:08 +0300 Subject: Update Redis Caching block Added config options --- user_guide_src/source/libraries/caching.rst | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/caching.rst b/user_guide_src/source/libraries/caching.rst index 8d7b4c440..10d0e84d7 100644 --- a/user_guide_src/source/libraries/caching.rst +++ b/user_guide_src/source/libraries/caching.rst @@ -239,21 +239,32 @@ For more information on WinCache, please see Redis Caching ============= +Redis is an in-memory key-value store which can operate in LRU cache mode. +To use it, you need Redis server and any Redis PHP extension, e.g. this one +`https://github.com/nicolasff/phpredis `_. + +Config options to connect to redis server must be stored in the application/config/redis.php file. +Available options are:: + + $config['socket_type'] = 'tcp'; //`tcp` or `unix` + $config['socket'] = '/var/run/redis.sock'; // in case of `unix` socket type + $config['host'] = '127.0.0.1'; + $config['password'] = NULL; + $config['port'] = 6379; + $config['timeout'] = 0; + All of the methods listed above can be accessed without passing a specific adapter to the driver loader as follows:: $this->load->driver('cache'); $this->cache->redis->save('foo', 'bar', 10); -.. important:: Redis may require one or more of the following options: - **host**, **post**, **timeout**, **password**. - -The Redis PHP extension repository is located at -`https://github.com/nicolasff/phpredis `_. +For more information on Redis, please see +`http://redis.io `_. Dummy Cache =========== This is a caching backend that will always 'miss.' It stores no data, but lets you keep your caching code in place in environments that don't -support your chosen cache. \ No newline at end of file +support your chosen cache. -- cgit v1.2.3-24-g4f1b From 6b1b803ee134462e29053a8e34cff8dc2dc96f2d Mon Sep 17 00:00:00 2001 From: kakysha Date: Mon, 28 Oct 2013 23:12:19 +0300 Subject: Added changelog entry --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c191432b8..fd024ffce 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -623,6 +623,7 @@ Bug fixes for 3.0 - Fixed a bug (#2681) - ``CI_Security::entity_decode()`` used the `PREG_REPLACE_EVAL` flag, which is deprecated since PHP 5.5. - Fixed a bug (#2691) - nested transactions could end in a deadlock when an error is encountered with *db_debug* set to TRUE. - Fixed a bug (#2515) - ``_exception_handler()`` used to send the 200 "OK" HTTP status code and didn't stop script exection even on fatal errors. +- Fixed a bug - `redis` :doc:`Caching ` driver didn't handle connection failure properly. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From f06864ca1442101d2d3644b5b0948ce5dfcd097f Mon Sep 17 00:00:00 2001 From: kakysha Date: Tue, 29 Oct 2013 02:52:44 +0300 Subject: typos --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index fd024ffce..1c1100b3d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -623,7 +623,7 @@ Bug fixes for 3.0 - Fixed a bug (#2681) - ``CI_Security::entity_decode()`` used the `PREG_REPLACE_EVAL` flag, which is deprecated since PHP 5.5. - Fixed a bug (#2691) - nested transactions could end in a deadlock when an error is encountered with *db_debug* set to TRUE. - Fixed a bug (#2515) - ``_exception_handler()`` used to send the 200 "OK" HTTP status code and didn't stop script exection even on fatal errors. -- Fixed a bug - `redis` :doc:`Caching ` driver didn't handle connection failure properly. +- Fixed a bug - Redis :doc:`Caching ` driver didn't handle connection failures properly. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 34565a7299fa12e951f8e4b40164b8f34d17de23 Mon Sep 17 00:00:00 2001 From: kakysha Date: Tue, 29 Oct 2013 02:59:30 +0300 Subject: Update caching.rst --- user_guide_src/source/libraries/caching.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/caching.rst b/user_guide_src/source/libraries/caching.rst index 10d0e84d7..9c588f29e 100644 --- a/user_guide_src/source/libraries/caching.rst +++ b/user_guide_src/source/libraries/caching.rst @@ -240,7 +240,7 @@ Redis Caching ============= Redis is an in-memory key-value store which can operate in LRU cache mode. -To use it, you need Redis server and any Redis PHP extension, e.g. this one +To use it, you need Redis server and phpredis PHP extension `https://github.com/nicolasff/phpredis `_. Config options to connect to redis server must be stored in the application/config/redis.php file. -- cgit v1.2.3-24-g4f1b From 4118981aff99c3495a4cf63c96271959587e06ce Mon Sep 17 00:00:00 2001 From: Kakysha Date: Tue, 29 Oct 2013 04:00:41 +0400 Subject: newline at the eof --- user_guide_src/source/libraries/caching.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/caching.rst b/user_guide_src/source/libraries/caching.rst index 9c588f29e..3f7dc2dd9 100644 --- a/user_guide_src/source/libraries/caching.rst +++ b/user_guide_src/source/libraries/caching.rst @@ -267,4 +267,4 @@ Dummy Cache This is a caching backend that will always 'miss.' It stores no data, but lets you keep your caching code in place in environments that don't -support your chosen cache. +support your chosen cache. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 2d5ebf754546f680879831f58b9236d8d53af8b5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 29 Oct 2013 13:27:59 +0200 Subject: Update sess_time_to_update description (rel #2397) --- user_guide_src/source/libraries/sessions.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index 36c7c1d32..2f8bea0b6 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -252,7 +252,7 @@ Session Preferences =================== You'll find the following Session related preferences in your -application/config/config.php file: +*application/config/config.php* file: =========================== =============== =========================== ========================================================================== Preference Default Options Description @@ -271,7 +271,8 @@ Preference Default Options Descript table before enabling this option (Cookie driver only). **sess_table_name** ci_sessions Any valid SQL table name The name of the session database table (Cookie driver only). **sess_time_to_update** 300 Time in seconds This options controls how often the session class will regenerate itself - and create a new session id. + and create a new session ID. Setting it to 0 will disable session + ID regeneartion. **sess_match_ip** FALSE TRUE/FALSE (boolean) Whether to match the user's IP address when reading the session data. Note that some ISPs dynamically changes the IP, so if you want a non-expiring session you will likely set this to FALSE. -- cgit v1.2.3-24-g4f1b From 0b58b3cad456efc5ecce89f622876c6b715439c2 Mon Sep 17 00:00:00 2001 From: Fatih Kalifa Date: Tue, 5 Nov 2013 15:36:40 +0700 Subject: Fix HTTP Verb Routing Rules Fix code style, removed (:any) rule in http verb to avoid confusion, and add proposed documentation and changelog --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/general/routing.rst | 36 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4a45a71b0..90229d206 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -420,6 +420,7 @@ Release Date: Not Released - :doc:`URI Routing ` changes include: + - Added possibility to route requests using HTTP Verb - Added possibility to route requests using callbacks. - Added a new reserved route (*translate_uri_dashes*) to allow usage of dashes in the controller and method URI segments. - Deprecated methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` in favor of their respective public properties. diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index 5520f59fe..6495f1ad4 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -142,6 +142,42 @@ routing rules to process the back-references. Example:: return 'catalog/product_edit/' . strtolower($product_type) . '/' . $id; }; +Using HTTP Verb in Routes +========================= + +If you prefer you can use HTTP Verb (or method) to define your routing rules. +This is particularly useful when building RESTful application. You can use standard HTTP +Verb (GET, PUT, POST, DELETE) or custom HTTP Verb (e.g: PURGE). HTTP Verb rule is case +insensitive. All you need to do is add array index using HTTP Verb rule. Example:: + + $route['products']['put'] = 'product/insert'; + +In the above example, a PUT request to URI "products" would call the "product" controller +class and "insert" method + +:: + + $route['products/(:num)']['DELETE'] = 'product/delete/$1'; + +A DELETE request to URL with "products" as first segment and a number in the second will be +remapped to the "product" class and "delete" method passing in the match as a variable to +the method. + +:: + + $route['products/([a-z]+)/(\d+)']['get'] = 'product/$1/$2'; + +A GET request to a URI similar to products/shirts/123 would call the "product" controller +class and "shirt" method with number as method parameter + +Using HTTP Verb is optional, so if you want any HTTP Verb to be handled in one rule +You could just write your routing rule without HTTP Verb. Example:: + + $route['product'] = 'product'; + +This way, all incoming request using any HTTP method containing the word "product" +in the first segment will be remapped to "product" class + Reserved Routes =============== -- cgit v1.2.3-24-g4f1b From 01e9fb1d6aab8e513a9ebd786e9abff74d8b63ca Mon Sep 17 00:00:00 2001 From: GDmac Date: Sat, 9 Nov 2013 08:01:52 +0100 Subject: docs: get_compile_select get_compile_select(null,false) without reset also preserves LIMIT settings --- user_guide_src/source/database/query_builder.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 65609c1cb..5e0dcb4be 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -68,7 +68,7 @@ Example:: // Produces string: SELECT * FROM mytable The second parameter enables you to set whether or not the query builder query -will be reset (by default it will be—just like `$this->db->get()`):: +will be reset (by default it will be reset, just like when using `$this->db->get()`):: echo $this->db->limit(10,20)->get_compiled_select('mytable', FALSE); // Produces string: SELECT * FROM mytable LIMIT 20, 10 @@ -76,7 +76,7 @@ will be reset (by default it will be—just like `$this->db->get()`):: echo $this->db->select('title, content, date')->get_compiled_select(); - // Produces string: SELECT title, content, date FROM mytable + // Produces string: SELECT title, content, date FROM mytable LIMIT 20, 10 The key thing to notice in the above example is that the second query did not utilize `$this->db->from()`_ and did not pass a table name into the first @@ -1055,4 +1055,4 @@ run the query:: $data = $this->db->get()->result_array(); // Would execute and return an array of results of the following query: - // SELECT field1, field1 from mytable where field3 = 5; \ No newline at end of file + // SELECT field1, field1 from mytable where field3 = 5; -- cgit v1.2.3-24-g4f1b From c761a206def7714d18623d46b05adc2bbeedce21 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Nov 2013 14:02:15 +0200 Subject: Polish changes from PR #2712 --- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/general/routing.rst | 37 ++++++++++--------------------- 2 files changed, 13 insertions(+), 26 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index fbea04c43..5fc86b1b5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -429,7 +429,7 @@ Release Date: Not Released - :doc:`URI Routing ` changes include: - - Added possibility to route requests using HTTP Verb + - Added possibility to route requests using HTTP verbs. - Added possibility to route requests using callbacks. - Added a new reserved route (*translate_uri_dashes*) to allow usage of dashes in the controller and method URI segments. - Deprecated methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` in favor of their respective public properties. diff --git a/user_guide_src/source/general/routing.rst b/user_guide_src/source/general/routing.rst index 6495f1ad4..0b91d3fa9 100644 --- a/user_guide_src/source/general/routing.rst +++ b/user_guide_src/source/general/routing.rst @@ -142,41 +142,28 @@ routing rules to process the back-references. Example:: return 'catalog/product_edit/' . strtolower($product_type) . '/' . $id; }; -Using HTTP Verb in Routes -========================= +Using HTTP verbs in routes +========================== -If you prefer you can use HTTP Verb (or method) to define your routing rules. -This is particularly useful when building RESTful application. You can use standard HTTP -Verb (GET, PUT, POST, DELETE) or custom HTTP Verb (e.g: PURGE). HTTP Verb rule is case -insensitive. All you need to do is add array index using HTTP Verb rule. Example:: +It is possible to use HTTP verbs (request method) to define your routing rules. +This is particularly useful when building RESTful applications. You can use standard HTTP +verbs (GET, PUT, POST, DELETE, PATCH) or a custom one such (e.g. PURGE). HTTP verb rules +are case-insensitive. All you need to do is to add the verb as an array key to your route. +Example:: $route['products']['put'] = 'product/insert'; -In the above example, a PUT request to URI "products" would call the "product" controller -class and "insert" method +In the above example, a PUT request to URI "products" would call the ``Product::insert()`` +controller method. :: $route['products/(:num)']['DELETE'] = 'product/delete/$1'; -A DELETE request to URL with "products" as first segment and a number in the second will be -remapped to the "product" class and "delete" method passing in the match as a variable to -the method. - -:: - - $route['products/([a-z]+)/(\d+)']['get'] = 'product/$1/$2'; - -A GET request to a URI similar to products/shirts/123 would call the "product" controller -class and "shirt" method with number as method parameter - -Using HTTP Verb is optional, so if you want any HTTP Verb to be handled in one rule -You could just write your routing rule without HTTP Verb. Example:: - - $route['product'] = 'product'; +A DELETE request to URL with "products" as first the segment and a number in the second will be +mapped to the ``Product::delete()`` method, passing the numeric value as the first parameter. -This way, all incoming request using any HTTP method containing the word "product" -in the first segment will be remapped to "product" class +Using HTTP verbs is of course, optional. Reserved Routes =============== -- cgit v1.2.3-24-g4f1b From 17a0528c23c4d6cf95b03299fbfe2ff789b82249 Mon Sep 17 00:00:00 2001 From: GDmac Date: Mon, 11 Nov 2013 13:18:09 +0100 Subject: Cleanup PR #2719 for Fix #2406 query builder cache Signed-off-by: GDmac --- user_guide_src/source/database/query_builder.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 5e0dcb4be..480067407 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -1055,4 +1055,4 @@ run the query:: $data = $this->db->get()->result_array(); // Would execute and return an array of results of the following query: - // SELECT field1, field1 from mytable where field3 = 5; + // SELECT field1, field1 from mytable where field3 = 5; \ No newline at end of file -- 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/changelog.rst | 2 ++ user_guide_src/source/general/cli.rst | 2 +- user_guide_src/source/general/common_functions.rst | 13 ++++++++++++ user_guide_src/source/helpers/date_helper.rst | 2 +- user_guide_src/source/installation/upgrade_300.rst | 24 ++++++++++++++++++++++ user_guide_src/source/libraries/input.rst | 3 +++ 6 files changed, 44 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5fc86b1b5..23fd95893 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -396,6 +396,7 @@ Release Date: Not Released - Added method ``post_get()`` and changed ``get_post()`` to search in GET data first. Both methods' names now properly match their GET/POST data search priorities. - Changed method ``_fetch_from_array()`` to parse array notation in field name. - Added an option for ``_clean_input_keys()`` to return FALSE instead of terminating the whole script. + - Deprecated the ``is_cli_request()`` method, it is now an alias for the new :php:func:`is_cli()` common function. - :doc:`Common functions ` changes include: @@ -404,6 +405,7 @@ Release Date: Not Released - Removed redundant conditional to determine HTTP server protocol in :php:func:`set_status_header()`. - Changed ``_exception_handler()`` to respect php.ini *display_errors* setting. - Added function :php:func:`is_https()` to check if a secure connection is used. + - Added function :php:func:`is_cli()` to replace the ``CI_Input::is_cli_request()`` method. - Added function :php:func:`function_usable()` to check if a function exists and is not disabled by `Suhosin `. - Removed the third (`$php_error`) from function :php:func:`log_message()`. diff --git a/user_guide_src/source/general/cli.rst b/user_guide_src/source/general/cli.rst index 4145d5ccc..4f3b07d9e 100644 --- a/user_guide_src/source/general/cli.rst +++ b/user_guide_src/source/general/cli.rst @@ -23,7 +23,7 @@ but they are not always obvious. - 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 ``$this->input->is_cli_request()`` + checking the return value of :func:`is_cli()`. - 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 diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index e085ef808..2dfec9cc0 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -173,6 +173,19 @@ is_https() Returns TRUE if a secure (HTTPS) connection is used and FALSE in any other case (including non-HTTP requests). +is_cli() +======== + +.. php:function:: is_cli() + + :returns: bool + +Returns TRUE if the application is run through the command line +and FALSE if not. + +.. note:: This function checks both if the ``PHP_SAPI`` value is 'cli' + or if the ``STDIN`` constant is defined. + function_usable() ================= diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 5dfee8b48..8126eba6c 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -80,7 +80,7 @@ Example:: $time = time(); echo standard_date($format, $time); -.. note:: This function is DEPRECATED.Use the native ``date()`` combined with +.. note:: This function is DEPRECATED. Use the native ``date()`` combined with `DateTime's format constants `_ instead: 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 diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index fb245d7cd..b58ed2f0d 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -315,6 +315,9 @@ see if PHP is being run on the command line. $this->input->is_cli_request() +.. note:: This method is DEPRECATED and is now just an alias for the + :php:func:`is_cli()` function. + $this->input->method() ====================== -- cgit v1.2.3-24-g4f1b From 29947ee882a8d519d62ca9061ed6513cedfb1930 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Nov 2013 18:36:46 +0200 Subject: Add CLI error templates and only send HTTP status headers for non-CLI requests (issue #1743) --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 23fd95893..93e75c2a2 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -55,6 +55,7 @@ Release Date: Not Released - Changed environment defaults to report all errors in *development* and only fatal ones in *testing*, *production* but only display them in *development*. - Updated *ip_address* database field lengths from 16 to 45 for supporting IPv6 address on :doc:`Trackback Library ` and :doc:`Captcha Helper `. - Removed *cheatsheets* and *quick_reference* PDFs from the documentation. + - Added support non-HTML error templates for CLI applications. - Added availability checks where usage of dangerous functions like ``eval()`` and ``exec()`` is required. - Added support for changing the file extension of log files using ``$config['log_file_extension']``. -- 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') 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 f8f14f3da263338bb4723012229f6c373a1764c6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 10 Dec 2013 11:32:32 +0200 Subject: Fix a bug where DB() tried to set the MySQL-specific 'sql_mode' on all drivers Supersedes PR #2756 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 93e75c2a2..b7fa9bb41 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -628,6 +628,7 @@ Bug fixes for 3.0 - Fixed a bug (#2691) - nested transactions could end in a deadlock when an error is encountered with *db_debug* set to TRUE. - Fixed a bug (#2515) - ``_exception_handler()`` used to send the 200 "OK" HTTP status code and didn't stop script exection even on fatal errors. - Fixed a bug - Redis :doc:`Caching ` driver didn't handle connection failures properly. +- Fixed a bug (#2756) - :doc:`Database Class ` executed the MySQL-specific `SET SESSION sql_mode` query for all drivers when the 'stricton' option is set. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 25a246c2bf184f968c2d895de1653319eaa081aa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 17 Dec 2013 13:07:26 +0200 Subject: Fix #2775 (security lib docs) --- user_guide_src/source/libraries/security.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/security.rst b/user_guide_src/source/libraries/security.rst index 05553142f..be1f8d205 100644 --- a/user_guide_src/source/libraries/security.rst +++ b/user_guide_src/source/libraries/security.rst @@ -83,14 +83,14 @@ application/config/config.php file and setting this:: If you use the :doc:`form helper <../helpers/form_helper>`, then ``form_open()`` will automatically insert a hidden csrf field in -your forms. If not, then you can use ``csrf_get_token_name()`` -and ``csrf_get_hash()`` +your forms. If not, then you can use ``get_csrf_token_name()`` +and ``get_csrf_hash()`` :: $csrf = array( - 'name' => $this->security->csrf_get_token_name(), - 'hash' => $this->security->csrf_get_hash() + 'name' => $this->security->get_csrf_token_name(), + 'hash' => $this->security->get_csrf_hash() ); ... -- cgit v1.2.3-24-g4f1b From 6bdfa428d96358787b5c1fdb05c811ab57860e16 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 19 Dec 2013 15:36:01 +0200 Subject: [ci skip] Add notes to get_compiled_insert(), get_compiled_update() docs --- user_guide_src/source/database/query_builder.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 480067407..9a96db003 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -665,10 +665,12 @@ will be reset (by default it will be--just like `$this->db->insert()`_):: // Produces string: INSERT INTO mytable (title, content) VALUES ('My Title', 'My Content') The key thing to notice in the above example is that the second query did not -utlize `$this->db->from()`_ nor did it pass a table name into the first +utlize `$this->db->from()` nor did it pass a table name into the first parameter. The reason this worked is because the query has not been executed -using `$this->db->insert()`_ which resets values or reset directly using -`$this->db->reset_query()`_. +using `$this->db->insert()` which resets values or reset directly using +`$this->db->reset_query()`. + +.. note:: This method doesn't work for batched inserts. $this->db->insert_batch() ========================= @@ -886,8 +888,9 @@ $this->db->get_compiled_update() This works exactly the same way as ``$this->db->get_compiled_insert()`` except that it produces an UPDATE SQL string instead of an INSERT SQL string. -For more information view documentation for `$this->db->get_compiled_insert()`_. +For more information view documentation for `$this->db->get_compiled_insert()`. +.. note:: This method doesn't work for batched updates. ************* Deleting Data -- cgit v1.2.3-24-g4f1b From 3cfd53937034d92ff15f9c2457a0f5bc1d80b0f6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 19 Dec 2013 16:08:12 +0200 Subject: [ci skip] Fix a changelog message --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b7fa9bb41..d1a5e8c2b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -439,7 +439,7 @@ Release Date: Not Released - :doc:`Language Library ` changes include: - - Changed method ``load()`` to filter the language name with ``ctype_digit()``. + - Changed method ``load()`` to filter the language name with ``ctype_alpha()``. - Added an optional second parameter to method ``line()`` to disable error login for line keys that were not found. - Language files are now loaded in a cascading style with the one in **system/** always loaded and overriden afterwards, if another one is found. -- cgit v1.2.3-24-g4f1b From 0db570c1958e43531b7dc3c83584c85521a3d144 Mon Sep 17 00:00:00 2001 From: Tufan Barış YILDIRIM Date: Thu, 19 Dec 2013 21:31:23 +0200 Subject: added changelog about EXISTS / NOT EXISTS @narfbg "And you should also add a changelog entry for this addition. :)" --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d1a5e8c2b..3dc7ade36 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -137,6 +137,7 @@ Release Date: Not Released - Database + - Added EXISTS / NOT EXISTS support to DB_Driver class. - Added **dsn** configuration setting for drivers that support DSN strings (PDO, PostgreSQL, Oracle, ODBC, CUBRID). - Added **schema** configuration setting (defaults to *public*) for drivers that might need it (currently used by PostgreSQL and ODBC). - Added subdrivers support (currently only used by PDO). -- cgit v1.2.3-24-g4f1b From 295cfa92574c2ee0c0465e4f86a0d3215a32413c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 20 Dec 2013 11:48:38 +0200 Subject: Polishing changes from #PR #2781 Looks like an unnecessary commit was made by the author just as I was clicking the Merge button. :) --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3dc7ade36..54583e6fb 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -137,7 +137,6 @@ Release Date: Not Released - Database - - Added EXISTS / NOT EXISTS support to DB_Driver class. - Added **dsn** configuration setting for drivers that support DSN strings (PDO, PostgreSQL, Oracle, ODBC, CUBRID). - Added **schema** configuration setting (defaults to *public*) for drivers that might need it (currently used by PostgreSQL and ODBC). - Added subdrivers support (currently only used by PDO). @@ -166,6 +165,7 @@ Release Date: Not Released - Added an optional parameter that allows to disable escaping (useful for custom fields) for methods ``join()``, ``order_by()``, ``where_in()``, ``or_where_in()``, ``where_not_in()``, ``or_where_not_in()``, ``insert()``, ``insert_batch()``. - Added support for ``join()`` with multiple conditions. - Added support for *USING* in ``join()``. + - Added support for *EXISTS* in ``where()``. - Added seed values support for random ordering with ``order_by(seed, 'RANDOM')``. - Changed ``limit()`` to ignore NULL values instead of always casting to integer. - Changed ``offset()`` to ignore empty values instead of always casting to integer. -- cgit v1.2.3-24-g4f1b From 5e6ce4699e074118c15d887e30b1e6720448264e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 3 Jan 2014 11:25:30 +0200 Subject: [ci skip] Add a missing semicolon in the docs css --- user_guide_src/source/_themes/eldocs/static/asset/css/common.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/_themes/eldocs/static/asset/css/common.css b/user_guide_src/source/_themes/eldocs/static/asset/css/common.css index 197739a57..5cbb37f94 100644 --- a/user_guide_src/source/_themes/eldocs/static/asset/css/common.css +++ b/user_guide_src/source/_themes/eldocs/static/asset/css/common.css @@ -133,7 +133,7 @@ a:visited{ color: #1A5B8D; } a:hover, a:active{ color: #742CAC; } -a.headerlink{ visibility: hidden; margin-left: 0.4em } +a.headerlink{ visibility: hidden; margin-left: 0.4em; } :hover > a.headerlink { visibility: visible; } @@ -350,4 +350,4 @@ fieldset{ border: 0; } h3,h4,h5,h6{ font-size: 14px; } } -#header input[type="submit"], x:-moz-any-link{ padding: 4px 10px; } +#header input[type="submit"], x:-moz-any-link{ padding: 4px 10px; } \ No newline at end of file -- cgit v1.2.3-24-g4f1b From a6eae87d14efe3169156a12ad3706852ff70e2c4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 3 Jan 2014 18:25:20 +0200 Subject: [ci skip] Some spaces & docblock fixes --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 54583e6fb..8bba39431 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -23,7 +23,7 @@ Release Date: Not Released - ``$_SERVER['CI_ENV']`` can now be set to control the ``ENVIRONMENT`` constant. - Added an optional backtrace to php-error template. - Added Android to the list of user agents. - - Added Windows 7, Windows 8, Android, Blackberry, iOS and PlayStation 3 to the list of user platforms. + - Added Windows 7, Windows 8, Windows 8.1, Android, Blackberry, iOS and PlayStation 3 to the list of user platforms. - Added Fennec (Firefox for mobile) to the list of mobile user agents. - Ability to log certain error types, not all under a threshold. - Added support for pem, p10, p12, p7a, p7c, p7m, p7r, p7s, crt, crl, der, kdb, rsa, cer, sst, csr Certs to mimes.php. -- cgit v1.2.3-24-g4f1b From 1720a6aee782b1193454e2ec172f3e89461f83f4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 6 Jan 2014 13:50:05 +0200 Subject: Fix #2579: Query Builder's "no escape" functionality didn't work properly with query cache --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8bba39431..7cc27eb5a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -630,6 +630,7 @@ Bug fixes for 3.0 - Fixed a bug (#2515) - ``_exception_handler()`` used to send the 200 "OK" HTTP status code and didn't stop script exection even on fatal errors. - Fixed a bug - Redis :doc:`Caching ` driver didn't handle connection failures properly. - Fixed a bug (#2756) - :doc:`Database Class ` executed the MySQL-specific `SET SESSION sql_mode` query for all drivers when the 'stricton' option is set. +- Fixed a bug (#2579) - :doc:`Query Builder `s "no escape" functionality didn't work properly with query cache. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From a9c7d18dc4ba53507d6e606221f06aa3fafeaa8e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 6 Jan 2014 14:38:00 +0200 Subject: Fix #2237: Parser library failed if the same tag pair is used more than once within a template (manually applying PR #2238 + updated unit tests) --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7cc27eb5a..6d0ceb6c3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -631,6 +631,7 @@ Bug fixes for 3.0 - Fixed a bug - Redis :doc:`Caching ` driver didn't handle connection failures properly. - Fixed a bug (#2756) - :doc:`Database Class ` executed the MySQL-specific `SET SESSION sql_mode` query for all drivers when the 'stricton' option is set. - Fixed a bug (#2579) - :doc:`Query Builder `s "no escape" functionality didn't work properly with query cache. +- Fixed a bug (#2237) - :doc:`Parser Library ` failed if the same tag pair is used more than once within a template. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From dc53d7b68adc6fdc8d0917ee2d29f5670ff82b45 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 7 Jan 2014 12:12:11 +0200 Subject: Add Basic HTTP authentication support to the XML-RPC library (based on PR #1716) --- user_guide_src/source/changelog.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 6d0ceb6c3..27031b941 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -342,7 +342,6 @@ Release Date: Not Released - Deprecated usage of the "anchor_class" setting (use the new "attributes" setting instead). - Added $config['reuse_query_string'] to allow automatic repopulation of query string arguments, combined with normal URI segments. - Removed the default `` `` from a number of the configuration variables. - - Added the ability to use a proxy with the :doc:`XML-RPC Library `. - :doc:`Encryption Library ` changes include: @@ -354,13 +353,18 @@ Release Date: Not Released - Database object names are now being displayed. - The sum of all queries running times in seconds is now being displayed. - Added support for displaying the HTTP DNT ("Do Not Track") header. - - Added support for displaying $_FILES. + - Added support for displaying ``$_FILES``. - :doc:`Migration Library ` changes include: - Added support for timestamp-based migrations (enabled by default). - Added ``$config['migration_type']`` to allow switching between *sequential* and *timestamp* migrations. + - :doc:`XML-RPC Library ` changes include: + + - Added the ability to use a proxy. + - Added Basic HTTP authentication support. + - :doc:`User Agent Library ` will now check if robots are pretending to be mobile clients (helps with e.g. Google indexing mobile website versions). - Added support for setting :doc:`Table ` class defaults in a config file. -- cgit v1.2.3-24-g4f1b From 1bbc5644b0c306ff72dc1228b169db56902fc031 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 7 Jan 2014 12:45:27 +0200 Subject: Fix #2268 (manually implementing PR #2269) --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 27031b941..892bbfbdf 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -636,6 +636,7 @@ Bug fixes for 3.0 - Fixed a bug (#2756) - :doc:`Database Class ` executed the MySQL-specific `SET SESSION sql_mode` query for all drivers when the 'stricton' option is set. - Fixed a bug (#2579) - :doc:`Query Builder `s "no escape" functionality didn't work properly with query cache. - Fixed a bug (#2237) - :doc:`Parser Library ` failed if the same tag pair is used more than once within a template. +- Fixed a bug (#2268) - :doc:`Security Library ` didn't properly match JavaScript events. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 61a7b8f4b38bbca520c43ac100899449f73bf408 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 7 Jan 2014 13:36:50 +0200 Subject: Implement Loader method chaining Requested in issue #2165 Supersedes PR #2319 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 892bbfbdf..32d033c9b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -381,6 +381,7 @@ Release Date: Not Released - :doc:`Loader Library ` changes include: + - Added method chaining support. - Added method ``get_vars()`` to the Loader to retrieve all variables loaded with ``$this->load->vars()``. - ``_ci_autoloader()`` is now a protected method. - Added autoloading of drivers with ``$autoload['drivers']``. -- cgit v1.2.3-24-g4f1b From 3b2803ef6ddd72772bf5bcb130ace207bc10d60e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 7 Jan 2014 14:46:38 +0200 Subject: Fix #2143 When trying to load rules from a configuration file, the Form validation library matched against ruri_string() as opposed to 'controller/method' like described in the manual. Since ruri_string() also makes sense, now both are being checked with ruri_string() having a higher precedence. Supersedes PR #2224 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 32d033c9b..2ad8eff0f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -638,6 +638,7 @@ Bug fixes for 3.0 - Fixed a bug (#2579) - :doc:`Query Builder `s "no escape" functionality didn't work properly with query cache. - Fixed a bug (#2237) - :doc:`Parser Library ` failed if the same tag pair is used more than once within a template. - Fixed a bug (#2268) - :doc:`Security Library ` didn't properly match JavaScript events. +- Fixed a bug (#2143) - :doc:`Form Validation Library ` didn't check for rule groups named in a *controller/method* manner when trying to load from a config file. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From a20ec975e653f501cca8e1cf57a9ea244417990f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 7 Jan 2014 15:23:10 +0200 Subject: Add ability for changing the original file path/name in CI_Zip::read_file() Supersedes PR #884 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2ad8eff0f..cf15e0fe2 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -367,6 +367,7 @@ Release Date: Not Released - :doc:`User Agent Library ` will now check if robots are pretending to be mobile clients (helps with e.g. Google indexing mobile website versions). - Added support for setting :doc:`Table ` class defaults in a config file. + - :doc:`Zip Library ` method ``read_file()`` can now also alter the original file path/name while adding files to an archive. - Core -- 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/changelog.rst | 7 ++++--- user_guide_src/source/installation/upgrade_300.rst | 20 +++++++++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cf15e0fe2..e285ab014 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -130,9 +130,10 @@ Release Date: Not Released - Added *colors* configuration to allow customization for the *background*, *border*, *text* and *grid* colors. - Added *filename* to the returned array elements. - - :doc:`Directory Helper ` :php:func:`directory_map()` will now append ``DIRECTORY_SEPARATOR`` to directory names in the returned array. - - :doc:`Array Helper ` :php:func:`element()` and :php:func:`elements()` now return NULL instead of FALSE when the required elements don't exist. - - :doc:`Language Helper ` :php:func:`lang()` now accepts an optional list of additional HTML attributes. + - :doc:`Directory Helper ` :func:`directory_map()` will now append ``DIRECTORY_SEPARATOR`` to directory names in the returned array. + - :doc:`Array Helper ` :func:`element()` and :php:func:`elements()` now return NULL instead of FALSE when the required elements don't exist. + - :doc:`Language Helper ` :func:`lang()` now accepts an optional list of additional HTML attributes. + - Changed the default tag for use in :doc:`Text Helper ` :func:`highlight_phrase()` to ```` (formerly ````). - Deprecated the :doc:`Email Helper ` as its ``valid_email()``, ``send_email()`` functions are now only aliases for PHP native functions ``filter_var()`` and ``mail()`` respectively. - Database 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 896d3e3a973d24985b61d963c9cdb086a010a74f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 7 Jan 2014 17:13:25 +0200 Subject: Add a more clear note about query builder caching (issue #2721) --- user_guide_src/source/database/query_builder.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 9a96db003..5bfdfdb52 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -1058,4 +1058,9 @@ run the query:: $data = $this->db->get()->result_array(); // Would execute and return an array of results of the following query: - // SELECT field1, field1 from mytable where field3 = 5; \ No newline at end of file + // SELECT field1, field1 from mytable where field3 = 5; + +.. note:: Double calls to ``get_compiled_select()`` while you're using the + Query Builder Caching functionality and NOT resetting your queries + will results in the cache being merged twice. That in turn will + i.e. if you're caching a ``select()`` - select the same field twice. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From da8c7a5bb92b928c19918632d8cb8a06d0ea747d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 7 Jan 2014 18:08:26 +0200 Subject: Fix a few bugs in CI_Hook (based on PR #2762) --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e285ab014..670e8d0e1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -641,6 +641,7 @@ Bug fixes for 3.0 - Fixed a bug (#2237) - :doc:`Parser Library ` failed if the same tag pair is used more than once within a template. - Fixed a bug (#2268) - :doc:`Security Library ` didn't properly match JavaScript events. - Fixed a bug (#2143) - :doc:`Form Validation Library ` didn't check for rule groups named in a *controller/method* manner when trying to load from a config file. +- Fixed a bug (#2762) - :doc:`Hooks Class ` didn't properly check if the called class/function exists. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 4b85e77aaf607713c9954b463b6ad3ba91012a05 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 8 Jan 2014 14:02:01 +0200 Subject: [ci skip] Add a changelog entry for PR #2800 --- user_guide_src/source/changelog.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 670e8d0e1..49ca39502 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -451,10 +451,13 @@ Release Date: Not Released - Added an optional second parameter to method ``line()`` to disable error login for line keys that were not found. - Language files are now loaded in a cascading style with the one in **system/** always loaded and overriden afterwards, if another one is found. + - :doc:`Hooks Library ` changes include: + - Renamed method ``_call_hook()`` to ``call_hook()``. + - Class instances are now stored in order to maintain their state. + - Removed ``CI_CORE`` boolean constant from *CodeIgniter.php* (no longer Reactor and Core versions). - Log Library will now try to create the **log_path** directory if it doesn't exist. - Added support for HTTP-Only cookies with new config option *cookie_httponly* (default FALSE). - - Renamed method ``_call_hook()`` to ``call_hook()`` in the :doc:`Hooks Library `. - ``$config['time_reference']`` now supports all timezone strings supported by PHP. - Fatal PHP errors are now also passed to ``_exception_handler()``, so they can be logged. -- cgit v1.2.3-24-g4f1b From 5ac428bea999a332b46b17fe26ee0045e5cfd39c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 8 Jan 2014 16:07:31 +0200 Subject: Fix #148 CI_Input::_clean_input_data() assumed that all input data is URL-encoded while sanitizing it. However, PHP already performs URL-decoding on it, so this is either redudant or overly intrusive as it resulted in many, many reports of data containing '%' followed by 1 numeric characters being essentially destroyed. Supersedes PR #1229 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 49ca39502..af9dcb0e8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -645,6 +645,7 @@ Bug fixes for 3.0 - Fixed a bug (#2268) - :doc:`Security Library ` didn't properly match JavaScript events. - Fixed a bug (#2143) - :doc:`Form Validation Library ` didn't check for rule groups named in a *controller/method* manner when trying to load from a config file. - Fixed a bug (#2762) - :doc:`Hooks Class ` didn't properly check if the called class/function exists. +- Fixed a bug (#346) - while sanitizing input data, ``CI_Input::_clean_input_data()`` assumed that it is URL-encoded, stripping certain character sequences from it. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From fb614478990694c3622baee2d01b414638c26508 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 8 Jan 2014 16:09:05 +0200 Subject: [ci skip] Fix a wrong issue reference from the previous commit --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index af9dcb0e8..3fa27ffa8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -645,7 +645,7 @@ Bug fixes for 3.0 - Fixed a bug (#2268) - :doc:`Security Library ` didn't properly match JavaScript events. - Fixed a bug (#2143) - :doc:`Form Validation Library ` didn't check for rule groups named in a *controller/method* manner when trying to load from a config file. - Fixed a bug (#2762) - :doc:`Hooks Class ` didn't properly check if the called class/function exists. -- Fixed a bug (#346) - while sanitizing input data, ``CI_Input::_clean_input_data()`` assumed that it is URL-encoded, stripping certain character sequences from it. +- Fixed a bug (#148) - while sanitizing input data, ``CI_Input::_clean_input_data()`` assumed that it is URL-encoded, stripping certain character sequences from it. Version 2.1.4 ============= -- 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/changelog.rst | 2 + user_guide_src/source/installation/upgrade_300.rst | 45 ++++++++++++++++++---- 2 files changed, 40 insertions(+), 7 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3fa27ffa8..85cd60293 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -402,6 +402,7 @@ Release Date: Not Released - Changed method ``valid_ip()`` to use PHP's native ``filter_var()`` function. - Changed internal method ``_sanitize_globals()`` to skip enforcing reversal of *register_globals* in PHP 5.4+, where this functionality no longer exists. - Changed methods ``get()``, ``post()``, ``get_post()``, ``cookie()``, ``server()``, ``user_agent()`` to return NULL instead of FALSE when no value is found. + - Changed default value of the ``$xss_clean`` parameter to NULL for all methods that utilize it, the default value is now determined by the ``$config['global_xss_filtering']`` setting. - Added method ``post_get()`` and changed ``get_post()`` to search in GET data first. Both methods' names now properly match their GET/POST data search priorities. - Changed method ``_fetch_from_array()`` to parse array notation in field name. - Added an option for ``_clean_input_keys()`` to return FALSE instead of terminating the whole script. @@ -646,6 +647,7 @@ Bug fixes for 3.0 - Fixed a bug (#2143) - :doc:`Form Validation Library ` didn't check for rule groups named in a *controller/method* manner when trying to load from a config file. - Fixed a bug (#2762) - :doc:`Hooks Class ` didn't properly check if the called class/function exists. - Fixed a bug (#148) - while sanitizing input data, ``CI_Input::_clean_input_data()`` assumed that it is URL-encoded, stripping certain character sequences from it. +- Fixed a bug (#346) - with ``$config['global_xss_filtering']`` turned on, the ``$_GET``, ``$_POST``, ``$_COOKIE`` and ``$_SERVER`` superglobals were overwritten during initialization time, resulting in XSS filtering being either performed twice or there was no possible way to get the original data, even though options for this do exist. Version 2.1.4 ============= 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 bfb635b276d880336db795f1a603de66ccfc80f6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 8 Jan 2014 18:32:05 +0200 Subject: Make newline standardization configurable Added ['standardize_newlines'] Also altered the Session cookie driver, which experienced issues with this feature due to it's HMAC verification failing after the Input class alters newlines in non-encrypted session cookies. Supersedes PR #2470 --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/libraries/input.rst | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 85cd60293..906c303a4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -58,6 +58,7 @@ Release Date: Not Released - Added support non-HTML error templates for CLI applications. - Added availability checks where usage of dangerous functions like ``eval()`` and ``exec()`` is required. - Added support for changing the file extension of log files using ``$config['log_file_extension']``. + - Added support for turning newline standardization on/off via ``$config['standardize_newlines']``. - Helpers diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index b58ed2f0d..72746c147 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -25,7 +25,8 @@ following: (and a few other) characters. - Provides XSS (Cross-site Scripting Hacks) filtering. This can be enabled globally, or upon request. -- Standardizes newline characters to \\n(In Windows \\r\\n) +- Standardizes newline characters to ``PHP_EOL`` (\\n in UNIX-based OSes, + \\r\\n under Windows). This is configurable. XSS Filtering ============= -- 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/changelog.rst | 2 ++ user_guide_src/source/installation/upgrade_300.rst | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 906c303a4..5b0187350 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -20,6 +20,7 @@ Release Date: Not Released - PHP 5.1.6 is no longer supported. CodeIgniter now requires PHP 5.2.4. - Changed filenaming convention (class file names now must be Ucfirst and everything else in lowercase). + - Changed the default database driver to 'mysqli' (the old 'mysql' driver is DEPRECATED). - ``$_SERVER['CI_ENV']`` can now be set to control the ``ENVIRONMENT`` constant. - Added an optional backtrace to php-error template. - Added Android to the list of user agents. @@ -139,6 +140,7 @@ Release Date: Not Released - Database + - DEPRECATED the 'mysql', 'sqlite', 'mssql' and 'pdo/dblib' (also known as 'pdo/mssql' or 'pdo/sybase') drivers. - Added **dsn** configuration setting for drivers that support DSN strings (PDO, PostgreSQL, Oracle, ODBC, CUBRID). - Added **schema** configuration setting (defaults to *public*) for drivers that might need it (currently used by PostgreSQL and ODBC). - Added subdrivers support (currently only used by PDO). 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 From 7977e1d4859d48be00bb11250446d9abeff6ac35 Mon Sep 17 00:00:00 2001 From: Marcos SF Filho Date: Wed, 8 Jan 2014 15:34:11 -0200 Subject: Update the Calendar Class --- user_guide_src/source/changelog.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3fa27ffa8..5da0330e5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -184,7 +184,7 @@ Release Date: Not Released - Server version checking is now done via ``mysqli::$server_info`` instead of running an SQL query. - Added persistent connections support for PHP >= 5.3. - Added support for ``backup()`` in :doc:`Database Utilities `. - - Changed methods ``trans_begin()``, ``trans_commit()`` and ``trans_rollback()`` to use the PHP API instead of sending queries. + - Changed methods ``trans_begin()``, ``trans_commit()`` and ``trans_rollback()`` to use the PHP API instead of sending queries. - Improved support of the PDO driver, including: @@ -278,6 +278,11 @@ Release Date: Not Released - Added **file_ext_tolower** config setting. - Added **mod_mime_fix** option to disable suffixing multiple file extensions with an underscore. + - :doc:`Calendar library ` changes include: + + - Add configuration to generate days of other months instead of blank cells + - Auto set the *next_prev_url* if is empty and the *show_prev_next* is set to TRUE + - :doc:`Cart library ` changes include: - ``insert()`` now auto-increments quantity for an item when inserted twice instead of resetting it, this is the default behaviour of large e-commerce sites. -- cgit v1.2.3-24-g4f1b From 42b40006fe8b740b416a8e8fd9acb0666349e222 Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 01:10:25 +0600 Subject: Added custom error messages functionality for individual fields. --- user_guide_src/source/changelog.rst | 1 + .../source/libraries/form_validation.rst | 27 ++++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5b0187350..9e7849643 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -314,6 +314,7 @@ Release Date: Not Released - Added support for named parameters in error messages. - :doc:`Language ` line keys must now be prefixed with **form_validation_**. - Added rule **alpha_numeric_spaces**. + - Added custom error messages for individual fields on any rules. - :doc:`Caching Library ` changes include: diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 8534175bb..f70877c02 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -200,6 +200,7 @@ The above method takes **three** parameters as input: message. For example, if your field is named "user" you might give it a human name of "Username". #. The validation rules for this form field. +#. (optional) Set custom error messages on any rules given for current field. If not provided will use the default one. .. note:: If you would like the field name to be stored in a language file, please see :ref:`translating-field-names`. @@ -225,7 +226,9 @@ Your controller should now look like this:: $this->load->library('form_validation'); $this->form_validation->set_rules('username', 'Username', 'required'); - $this->form_validation->set_rules('password', 'Password', 'required'); + $this->form_validation->set_rules('password', 'Password', 'required',array( + 'required'=>'You must provide a %s.' + )); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required'); $this->form_validation->set_rules('email', 'Email', 'required'); @@ -263,7 +266,10 @@ you use this approach, you must name your array keys as indicated:: array( 'field' => 'password', 'label' => 'Password', - 'rules' => 'required' + 'rules' => 'required', + 'error_msg' => array( + 'required' => 'You must provide a %s.', + ), ), array( 'field' => 'passconf', @@ -285,7 +291,10 @@ Cascading Rules CodeIgniter lets you pipe multiple rules together. Let's try it. Change your rules in the third parameter of rule setting method, like this:: - $this->form_validation->set_rules('username', 'Username', 'required|min_length[5]|max_length[12]|is_unique[users.username]'); + $this->form_validation->set_rules('username', 'Username', 'required|min_length[5]|max_length[12]|is_unique[users.username]',array( + 'required' => 'You have not provided %s.', + 'is_unique' => 'The %s is unavailable.', + )); $this->form_validation->set_rules('password', 'Password', 'required'); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required|matches[password]'); $this->form_validation->set_rules('email', 'Email', 'required|valid_email|is_unique[users.email]'); @@ -469,11 +478,18 @@ Setting Error Messages All of the native error messages are located in the following language file: **system/language/english/form_validation_lang.php** -To set your own custom message you can either edit that file, or use the -following method:: +To set your own global custom message for a rule, you can either +edit that file, or use the following method:: $this->form_validation->set_message('rule', 'Error Message'); +If you need to set a custom error message for a particular field on +some particular rule, use the set_rules() methos:: + + $this->form_validation->set_rules('field_name','Field Label','rule1|rule2|rule3',array( + 'rule2' => 'Error Message on rule2 for this field_name' + )); + Where rule corresponds to the name of a particular rule, and Error Message is the text you would like displayed. @@ -946,6 +962,7 @@ $this->form_validation->set_rules() :param string $field: The field name :param string $label: The field label :param mixed $rules: The rules, as a string with rules separated by a pipe "|", or an array or rules. + :param array $error_msg: Custom error message on any rules for the current field only. (optional) :rtype: Object Permits you to set validation rules, as described in the tutorial -- cgit v1.2.3-24-g4f1b From a593e3eb218002a630b7d0cf90002ec4a6fd1db3 Mon Sep 17 00:00:00 2001 From: Marcos SF Filho Date: Wed, 8 Jan 2014 18:22:12 -0200 Subject: Code Corrections for the Calendar Pull Request --- user_guide_src/source/changelog.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5da0330e5..ff7c09b48 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -280,8 +280,8 @@ Release Date: Not Released - :doc:`Calendar library ` changes include: - - Add configuration to generate days of other months instead of blank cells - - Auto set the *next_prev_url* if is empty and the *show_prev_next* is set to TRUE + - Added configuration to generate days of other months instead of blank cells. + - Auto set *next_prev_url* if it is empty and *show_prev_next* is set to TRUE. - :doc:`Cart library ` changes include: -- cgit v1.2.3-24-g4f1b From 0cd7c92ee59b4b03588e45229944d4b83eea3d8e Mon Sep 17 00:00:00 2001 From: Marcos SF Filho Date: Wed, 8 Jan 2014 19:38:00 -0200 Subject: Unnecessary rtrim and update docs for Calendar class --- user_guide_src/source/libraries/calendar.rst | 41 +++++++++++++++++----------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/calendar.rst b/user_guide_src/source/libraries/calendar.rst index 3964db25e..8b2f503b9 100644 --- a/user_guide_src/source/libraries/calendar.rst +++ b/user_guide_src/source/libraries/calendar.rst @@ -86,21 +86,23 @@ The above code would start the calendar on saturday, use the "long" month heading, and the "short" day names. More information regarding preferences below. -====================== =========== =============================================== =================================================================== -Preference Default Options Description -====================== =========== =============================================== =================================================================== -**template** None None A string containing your calendar template. - See the template section below. -**local_time** time() None A Unix timestamp corresponding to the current time. -**start_day** sunday Any week day (sunday, monday, tuesday, etc.) Sets the day of the week the calendar should start on. -**month_type** long long, short Determines what version of the month name to use in the header. - long = January, short = Jan. -**day_type** abr long, short, abr Determines what version of the weekday names to use in - the column headers. long = Sunday, short = Sun, abr = Su. -**show_next_prev** FALSE TRUE/FALSE (boolean) Determines whether to display links allowing you to toggle - to next/previous months. See information on this feature below. -**next_prev_url** None A URL Sets the basepath used in the next/previous calendar links. -====================== =========== =============================================== =================================================================== +====================== ============== =============================================== =================================================================== +Preference Default Options Description +====================== ============== =============================================== =================================================================== +**template** None None A string containing your calendar template. + See the template section below. +**local_time** time() None A Unix timestamp corresponding to the current time. +**start_day** sunday Any week day (sunday, monday, tuesday, etc.) Sets the day of the week the calendar should start on. +**month_type** long long, short Determines what version of the month name to use in the header. + long = January, short = Jan. +**day_type** abr long, short, abr Determines what version of the weekday names to use in + the column headers. long = Sunday, short = Sun, abr = Su. +**show_next_prev** FALSE TRUE/FALSE (boolean) Determines whether to display links allowing you to toggle + to next/previous months. See information on this feature below. +**next_prev_url** Controller URL A URL Sets the basepath used in the next/previous calendar links. +**show_other_days** FALSE TRUE/FALSE (boolean) Determines whether to display days of other months that shares the + first or last week of the calendar month. +====================== ============== =============================================== =================================================================== Showing Next/Previous Month Links @@ -123,7 +125,8 @@ You'll notice a few things about the above example: - You must set the "show_next_prev" to TRUE. - You must supply the URL to the controller containing your calendar in - the "next_prev_url" preference. + the "next_prev_url" preference. The Code Igniter will try to guess + the link for the current controller/method if you don't supply. - You must supply the "year" and "month" to the calendar generating function via the URI segments where they appear (Note: The calendar class automatically adds the year/month to the base URL you @@ -154,6 +157,8 @@ pair of pseudo-variables as shown here:: {cal_row_start}{/cal_row_start} {cal_cell_start}{/cal_cell_start} + {cal_cell_start_today}{/cal_cell_start_today} + {cal_cell_start_other}{/cal_cell_start_other} {cal_cell_content}{day}{/cal_cell_content} {cal_cell_content_today}{/cal_cell_content_today} @@ -163,7 +168,11 @@ pair of pseudo-variables as shown here:: {cal_cell_blank} {/cal_cell_blank} + {cal_cell_other}{day}{cal_cel_other} + {cal_cell_end}{/cal_cell_end} + {cal_cell_end_today}{/cal_cell_end_today} + {cal_cell_end_other}{/cal_cell_end_other} {cal_row_end}{/cal_row_end} {table_close}{/table_close} -- cgit v1.2.3-24-g4f1b From 10925d27adac84634cc527d7298b1add0d54ba7c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 9 Jan 2014 00:16:46 +0200 Subject: Remove preg_quote() call from CI_User_agent::_set_browser() and add another pattern for Opera Input comes from a configuration file that is barely touched by anyone and the default values only contain letters, so it is safe to not quote them. This enables us to add a more advanced pattern in config/user_agents.php for Opera 10+, which ... quote: Opera/9.80 is hard coded at the beginning of the user agent string because of broken browser sniffing scripts which detect 'Opera/10' and above as Opera 1. (reference: http://my.opera.com/community/openweb/idopera/) Instead, latests versions of Opera append ' Version/' to the end of the user agent string. Fixes issue #555 (incorrect browser detection for Opera) --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5b0187350..67a2685da 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -651,6 +651,7 @@ Bug fixes for 3.0 - Fixed a bug (#2762) - :doc:`Hooks Class ` didn't properly check if the called class/function exists. - Fixed a bug (#148) - while sanitizing input data, ``CI_Input::_clean_input_data()`` assumed that it is URL-encoded, stripping certain character sequences from it. - Fixed a bug (#346) - with ``$config['global_xss_filtering']`` turned on, the ``$_GET``, ``$_POST``, ``$_COOKIE`` and ``$_SERVER`` superglobals were overwritten during initialization time, resulting in XSS filtering being either performed twice or there was no possible way to get the original data, even though options for this do exist. +- Fixed an edge case (#555) - incorrect browser version was reported for Opera 10+ due to a non-standard user-agent string. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 27e91a07ed66308ba02833b104ca8ca6a05e7be8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 9 Jan 2014 01:00:48 +0200 Subject: Add CI_User_agent::parse() to allow parsing a custom user-agent string Based on PR #970 --- user_guide_src/source/changelog.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 67a2685da..cbc1c6656 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -369,7 +369,11 @@ Release Date: Not Released - Added the ability to use a proxy. - Added Basic HTTP authentication support. - - :doc:`User Agent Library ` will now check if robots are pretending to be mobile clients (helps with e.g. Google indexing mobile website versions). + - :doc:`User Agent Library ` changes include: + + - Added check to detect if robots are pretending to be mobile clients (helps with e.g. Google indexing mobile website versions). + - Added method ``parse()`` to allow parsing a custom user-agent string, different from the current visitor's. + - Added support for setting :doc:`Table ` class defaults in a config file. - :doc:`Zip Library ` method ``read_file()`` can now also alter the original file path/name while adding files to an archive. -- cgit v1.2.3-24-g4f1b From 0742fad5cb283693bf1ef0a63aa90bb6cb2927d8 Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 07:51:10 +0600 Subject: Changed $error_msg to $errors --- user_guide_src/source/libraries/form_validation.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index f70877c02..671f97992 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -957,12 +957,12 @@ The following methods are intended for use in your controller. $this->form_validation->set_rules() =================================== - .. php:method:: set_rules ($field, $label = '', $rules = '') + .. php:method:: set_rules ($field, $label = '', $rules = '', $errors = array()) :param string $field: The field name :param string $label: The field label :param mixed $rules: The rules, as a string with rules separated by a pipe "|", or an array or rules. - :param array $error_msg: Custom error message on any rules for the current field only. (optional) + :param array $errors: Custom error message :rtype: Object Permits you to set validation rules, as described in the tutorial -- cgit v1.2.3-24-g4f1b From a0bf8295b90302f498a9c1b94a80b50ec635f85c Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 07:55:52 +0600 Subject: Updated change log message for form validation custrom errors. --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9e7849643..37e568c4c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -314,7 +314,7 @@ Release Date: Not Released - Added support for named parameters in error messages. - :doc:`Language ` line keys must now be prefixed with **form_validation_**. - Added rule **alpha_numeric_spaces**. - - Added custom error messages for individual fields on any rules. + - Added **support** for custom error messages **per field rule**. - :doc:`Caching Library ` changes include: -- cgit v1.2.3-24-g4f1b From df3bda56796ae27f98cd6b9fe5c7d9d3bcb756ac Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 08:10:21 +0600 Subject: Added spaces between parameters and fixed the arrays to be more readable. --- .../source/libraries/form_validation.rst | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 671f97992..00f7c4125 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -226,9 +226,9 @@ Your controller should now look like this:: $this->load->library('form_validation'); $this->form_validation->set_rules('username', 'Username', 'required'); - $this->form_validation->set_rules('password', 'Password', 'required',array( - 'required'=>'You must provide a %s.' - )); + $this->form_validation->set_rules('password', 'Password', 'required', + array('required'=>'You must provide a %s.') + ); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required'); $this->form_validation->set_rules('email', 'Email', 'required'); @@ -291,10 +291,14 @@ Cascading Rules CodeIgniter lets you pipe multiple rules together. Let's try it. Change your rules in the third parameter of rule setting method, like this:: - $this->form_validation->set_rules('username', 'Username', 'required|min_length[5]|max_length[12]|is_unique[users.username]',array( - 'required' => 'You have not provided %s.', - 'is_unique' => 'The %s is unavailable.', - )); + $this->form_validation->set_rules( + 'username', 'Username', + 'required|min_length[5]|max_length[12]|is_unique[users.username]', + array( + 'required' => 'You have not provided %s.', + 'is_unique' => 'This %s already exists.' + ) + ); $this->form_validation->set_rules('password', 'Password', 'required'); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required|matches[password]'); $this->form_validation->set_rules('email', 'Email', 'required|valid_email|is_unique[users.email]'); @@ -484,11 +488,11 @@ edit that file, or use the following method:: $this->form_validation->set_message('rule', 'Error Message'); If you need to set a custom error message for a particular field on -some particular rule, use the set_rules() methos:: +some particular rule, use the set_rules() method:: - $this->form_validation->set_rules('field_name','Field Label','rule1|rule2|rule3',array( - 'rule2' => 'Error Message on rule2 for this field_name' - )); + $this->form_validation->set_rules('field_name', 'Field Label', 'rule1|rule2|rule3', + array('rule2' => 'Error Message on rule2 for this field_name') + ); Where rule corresponds to the name of a particular rule, and Error Message is the text you would like displayed. @@ -962,7 +966,7 @@ $this->form_validation->set_rules() :param string $field: The field name :param string $label: The field label :param mixed $rules: The rules, as a string with rules separated by a pipe "|", or an array or rules. - :param array $errors: Custom error message + :param array $errors: Custom error messages :rtype: Object Permits you to set validation rules, as described in the tutorial -- cgit v1.2.3-24-g4f1b From ea29488b99f28b32887f0cb1e939c5f34e418d0d Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 16:01:31 +0600 Subject: Changed the rest of 'error_msg' to 'errors' --- user_guide_src/source/libraries/form_validation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 00f7c4125..3efdc862b 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -267,7 +267,7 @@ you use this approach, you must name your array keys as indicated:: 'field' => 'password', 'label' => 'Password', 'rules' => 'required', - 'error_msg' => array( + 'errors' => array( 'required' => 'You must provide a %s.', ), ), -- cgit v1.2.3-24-g4f1b From e334118cef11e9565b9219587d1f45ab140c9bcd Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 16:10:10 +0600 Subject: Fixed coding styles in form_validation.rst --- user_guide_src/source/libraries/form_validation.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 3efdc862b..1076b1433 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -227,7 +227,7 @@ Your controller should now look like this:: $this->form_validation->set_rules('username', 'Username', 'required'); $this->form_validation->set_rules('password', 'Password', 'required', - array('required'=>'You must provide a %s.') + array('required' => 'You must provide a %s.') ); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required'); $this->form_validation->set_rules('email', 'Email', 'required'); @@ -295,8 +295,8 @@ your rules in the third parameter of rule setting method, like this:: 'username', 'Username', 'required|min_length[5]|max_length[12]|is_unique[users.username]', array( - 'required' => 'You have not provided %s.', - 'is_unique' => 'This %s already exists.' + 'required' => 'You have not provided %s.', + 'is_unique' => 'This %s already exists.' ) ); $this->form_validation->set_rules('password', 'Password', 'required'); -- cgit v1.2.3-24-g4f1b From 7945d30c0c936a553311e7418d388acb4d3fb1af Mon Sep 17 00:00:00 2001 From: Ahmedul Haque Abid Date: Thu, 9 Jan 2014 16:50:23 +0600 Subject: Fixed the comment and array alignment. --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 314ae8ab0..22c6d8f02 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -314,7 +314,7 @@ Release Date: Not Released - Added support for named parameters in error messages. - :doc:`Language ` line keys must now be prefixed with **form_validation_**. - Added rule **alpha_numeric_spaces**. - - Added **support** for custom error messages **per field rule**. + - Added support for custom error messages per field rule. - :doc:`Caching Library ` changes include: -- cgit v1.2.3-24-g4f1b From 2e914b7dc6acaf2938fac4c332ff682a033b93d7 Mon Sep 17 00:00:00 2001 From: Marcos SF Filho Date: Thu, 9 Jan 2014 09:20:55 -0200 Subject: Updates for the Calendar Pull Request --- user_guide_src/source/libraries/calendar.rst | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/calendar.rst b/user_guide_src/source/libraries/calendar.rst index 8b2f503b9..e24ee80b8 100644 --- a/user_guide_src/source/libraries/calendar.rst +++ b/user_guide_src/source/libraries/calendar.rst @@ -86,23 +86,23 @@ The above code would start the calendar on saturday, use the "long" month heading, and the "short" day names. More information regarding preferences below. -====================== ============== =============================================== =================================================================== -Preference Default Options Description -====================== ============== =============================================== =================================================================== -**template** None None A string containing your calendar template. +====================== ================= =============================================== =================================================================== +Preference Default Options Description +====================== ================= =============================================== =================================================================== +**template** None None A string containing your calendar template. See the template section below. -**local_time** time() None A Unix timestamp corresponding to the current time. -**start_day** sunday Any week day (sunday, monday, tuesday, etc.) Sets the day of the week the calendar should start on. -**month_type** long long, short Determines what version of the month name to use in the header. +**local_time** time() None A Unix timestamp corresponding to the current time. +**start_day** sunday Any week day (sunday, monday, tuesday, etc.) Sets the day of the week the calendar should start on. +**month_type** long long, short Determines what version of the month name to use in the header. long = January, short = Jan. -**day_type** abr long, short, abr Determines what version of the weekday names to use in +**day_type** abr long, short, abr Determines what version of the weekday names to use in the column headers. long = Sunday, short = Sun, abr = Su. -**show_next_prev** FALSE TRUE/FALSE (boolean) Determines whether to display links allowing you to toggle +**show_next_prev** FALSE TRUE/FALSE (boolean) Determines whether to display links allowing you to toggle to next/previous months. See information on this feature below. -**next_prev_url** Controller URL A URL Sets the basepath used in the next/previous calendar links. -**show_other_days** FALSE TRUE/FALSE (boolean) Determines whether to display days of other months that shares the +**next_prev_url** controller/method A URL Sets the basepath used in the next/previous calendar links. +**show_other_days** FALSE TRUE/FALSE (boolean) Determines whether to display days of other months that share the first or last week of the calendar month. -====================== ============== =============================================== =================================================================== +====================== ================= =============================================== =================================================================== Showing Next/Previous Month Links @@ -125,8 +125,8 @@ You'll notice a few things about the above example: - You must set the "show_next_prev" to TRUE. - You must supply the URL to the controller containing your calendar in - the "next_prev_url" preference. The Code Igniter will try to guess - the link for the current controller/method if you don't supply. + the "next_prev_url" preference. If you don't, it will be set to the current + *controller/method*. - You must supply the "year" and "month" to the calendar generating function via the URI segments where they appear (Note: The calendar class automatically adds the year/month to the base URL you -- cgit v1.2.3-24-g4f1b From 40235e6890650690afeaa451738bf7f8e586cfc3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 9 Jan 2014 14:20:57 +0200 Subject: Fix #133 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c186781d1..40855bc68 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -662,6 +662,7 @@ Bug fixes for 3.0 - Fixed a bug (#148) - while sanitizing input data, ``CI_Input::_clean_input_data()`` assumed that it is URL-encoded, stripping certain character sequences from it. - Fixed a bug (#346) - with ``$config['global_xss_filtering']`` turned on, the ``$_GET``, ``$_POST``, ``$_COOKIE`` and ``$_SERVER`` superglobals were overwritten during initialization time, resulting in XSS filtering being either performed twice or there was no possible way to get the original data, even though options for this do exist. - Fixed an edge case (#555) - incorrect browser version was reported for Opera 10+ due to a non-standard user-agent string. +- Fixed a bug (#133) - :doc:`Text Helper ` :func:`ascii_to_entities()` stripped the last character if it happens to be in the extended ASCII group. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 43d7fa73534c07d10a88ec120c0938d0d00a184e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 9 Jan 2014 17:29:45 +0200 Subject: Implement atomic increment/decrement in Cache library Requested via issue #109 Supersedes PR #241 --- user_guide_src/source/changelog.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 40855bc68..b49ce20ba 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -281,12 +281,12 @@ Release Date: Not Released - Added **file_ext_tolower** config setting. - Added **mod_mime_fix** option to disable suffixing multiple file extensions with an underscore. - - :doc:`Calendar library ` changes include: + - :doc:`Calendar Library ` changes include: - Added configuration to generate days of other months instead of blank cells. - Auto set *next_prev_url* if it is empty and *show_prev_next* is set to TRUE. - - :doc:`Cart library ` changes include: + - :doc:`Cart Library ` changes include: - ``insert()`` now auto-increments quantity for an item when inserted twice instead of resetting it, this is the default behaviour of large e-commerce sites. - *Product Name* strictness can be disabled by switching the ``$product_name_safe`` property to FALSE. @@ -294,7 +294,7 @@ Release Date: Not Released - Added method ``get_item()`` to enable retrieving data for a single cart item. - Added unicode support for product names. - - :doc:`Image Manipulation library ` changes include: + - :doc:`Image Manipulation Library ` changes include: - The ``initialize()`` method now only sets existing class properties. - Added support for 3-length hex color values for *wm_font_color* and *wm_shadow_color* properties, as well as validation for them. @@ -303,7 +303,7 @@ Release Date: Not Released - Property *maintain_ratio* is now taken into account when resizing images using ImageMagick library. - Added support for maintaining transparency for PNG images in method ``text_watermark()``. - - :doc:`Form Validation library ` changes include: + - :doc:`Form Validation Library ` changes include: - Added method ``error_array()`` to return all error messages as an array. - Added method ``set_data()`` to set an alternative data array to be validated instead of the default ``$_POST``. @@ -327,8 +327,10 @@ Release Date: Not Released - Added Redis driver. - Added a *key_prefix* option for cache IDs. - Updated driver ``is_supported()`` methods to log at the "debug" level. + - Added option to store raw values instead of CI-formatted ones (APC, Memcache). + - Added atomic increment/decrement feature via ``increment()``, ``decrement()``. - - :doc:`Email library ` changes include: + - :doc:`Email Library ` changes include: - Added custom filename to ``Email::attach()`` as ``$this->email->attach($filename, $disposition, $newname)``. - Added possibility to send attachment as buffer string in ``Email::attach()`` as ``$this->email->attach($buffer, $disposition, $newname, $mime)``. -- cgit v1.2.3-24-g4f1b From 528591deb8f3a1b9663b43c66d75ba1a4059e8fe Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Thu, 9 Jan 2014 10:04:43 -0600 Subject: fix doc warnings --- user_guide_src/source/changelog.rst | 4 ++-- user_guide_src/source/general/common_functions.rst | 6 +++--- user_guide_src/source/libraries/calendar.rst | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b49ce20ba..e83598cb4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -639,7 +639,7 @@ Bug fixes for 3.0 - Fixed a bug (#2380) - :doc:`URI Routing ` method ``fetch_method()`` returned 'index' if the requested method name matches its controller name. - Fixed a bug (#2388) - :doc:`Email Library ` used to ignore attachment errors, resulting in broken emails being sent. - Fixed a bug (#2498) - :doc:`Form Validation Library ` rule **valid_base64** only checked characters instead of actual validity. -- Fixed a bug (#2425) - OCI8 :doc:`database ` driver's method ``stored_procedure()`` didn't log an error unless **db_debug** was set to TRUE. +- Fixed a bug (#2425) - OCI8 :doc:`database ` driver's method ``stored_procedure()`` didn't log an error unless **db_debug** was set to TRUE. - Fixed a bug (#2490) - :doc:`Database Class ` method ``query()`` returning boolean instead of a result object when the PostgreSQL-specific *RETURNING* clause is used. - Fixed a bug (#249) - :doc:`Cache Library ` didn't properly handle Memcache(d) configurations with missing options. - Fixed a bug (#180) - :php:func:`config_item()` didn't take into account run-time configuration changes. @@ -656,7 +656,7 @@ Bug fixes for 3.0 - Fixed a bug (#2515) - ``_exception_handler()`` used to send the 200 "OK" HTTP status code and didn't stop script exection even on fatal errors. - Fixed a bug - Redis :doc:`Caching ` driver didn't handle connection failures properly. - Fixed a bug (#2756) - :doc:`Database Class ` executed the MySQL-specific `SET SESSION sql_mode` query for all drivers when the 'stricton' option is set. -- Fixed a bug (#2579) - :doc:`Query Builder `s "no escape" functionality didn't work properly with query cache. +- Fixed a bug (#2579) - :doc:`Query Builder ` "no escape" functionality didn't work properly with query cache. - Fixed a bug (#2237) - :doc:`Parser Library ` failed if the same tag pair is used more than once within a template. - Fixed a bug (#2268) - :doc:`Security Library ` didn't properly match JavaScript events. - Fixed a bug (#2143) - :doc:`Form Validation Library ` didn't check for rule groups named in a *controller/method* manner when trying to load from a config file. diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index 2dfec9cc0..e9259795f 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -71,7 +71,7 @@ documentation for more information. show_error() ============ -.. php:function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') +.. php:function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') :noindex: :param mixed $message: Error message :param int $status_code: HTTP Response status code @@ -84,7 +84,7 @@ please see the :doc:`Error Handling ` documentation. show_404() ========== -.. php:function:: show_404($page = '', $log_error = TRUE) +.. php:function:: show_404($page = '', $log_error = TRUE) :noindex: :param string $page: URI string :param bool $log_error: Whether to log the error @@ -96,7 +96,7 @@ please see the :doc:`Error Handling ` documentation. log_message() ============= -.. php:function:: log_message($level, $message) +.. php:function:: log_message($level, $message) :noindex: :param string $level: Log level: 'error', 'debug' or 'info' :param string $message: Message to log diff --git a/user_guide_src/source/libraries/calendar.rst b/user_guide_src/source/libraries/calendar.rst index e24ee80b8..ed2a14c8c 100644 --- a/user_guide_src/source/libraries/calendar.rst +++ b/user_guide_src/source/libraries/calendar.rst @@ -90,18 +90,18 @@ preferences below. Preference Default Options Description ====================== ================= =============================================== =================================================================== **template** None None A string containing your calendar template. - See the template section below. + See the template section below. **local_time** time() None A Unix timestamp corresponding to the current time. **start_day** sunday Any week day (sunday, monday, tuesday, etc.) Sets the day of the week the calendar should start on. **month_type** long long, short Determines what version of the month name to use in the header. - long = January, short = Jan. + long = January, short = Jan. **day_type** abr long, short, abr Determines what version of the weekday names to use in - the column headers. long = Sunday, short = Sun, abr = Su. + the column headers. long = Sunday, short = Sun, abr = Su. **show_next_prev** FALSE TRUE/FALSE (boolean) Determines whether to display links allowing you to toggle - to next/previous months. See information on this feature below. + to next/previous months. See information on this feature below. **next_prev_url** controller/method A URL Sets the basepath used in the next/previous calendar links. **show_other_days** FALSE TRUE/FALSE (boolean) Determines whether to display days of other months that share the - first or last week of the calendar month. + first or last week of the calendar month. ====================== ================= =============================================== =================================================================== -- cgit v1.2.3-24-g4f1b From 05be0879777021a73ca55548c6edd61d17012a4d Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Thu, 9 Jan 2014 10:10:30 -0600 Subject: d'oh - :noindex: in wrong place Signed-off-by: Connor Tumbleson --- user_guide_src/source/general/common_functions.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index e9259795f..a1007cb4b 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -71,7 +71,7 @@ documentation for more information. show_error() ============ -.. php:function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') :noindex: +.. :noindex: php:function:: show_error($message, $status_code, $heading = 'An Error Was Encountered') :param mixed $message: Error message :param int $status_code: HTTP Response status code @@ -84,7 +84,7 @@ please see the :doc:`Error Handling ` documentation. show_404() ========== -.. php:function:: show_404($page = '', $log_error = TRUE) :noindex: +.. :noindex: php:function:: show_404($page = '', $log_error = TRUE) :param string $page: URI string :param bool $log_error: Whether to log the error @@ -96,7 +96,7 @@ please see the :doc:`Error Handling ` documentation. log_message() ============= -.. php:function:: log_message($level, $message) :noindex: +.. :noindex: php:function:: log_message($level, $message) :param string $level: Log level: 'error', 'debug' or 'info' :param string $message: Message to log -- cgit v1.2.3-24-g4f1b From a0a73c977ce25911f56948d89de817b3ca83adcb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 9 Jan 2014 19:21:26 +0200 Subject: Add HTTP response code 307 support in URL helper redirect() --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e83598cb4..0488d9d4a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -77,7 +77,7 @@ Release Date: Not Released - :php:func:`url_title()` will now trim extra dashes from beginning and end. - :php:func:`anchor_popup()` will now fill the *href* attribute with the URL and its JS code will return FALSE instead. - Added JS window name support to the :php:func:`anchor_popup()` function. - - Added support (auto-detection) for HTTP/1.1 response code 303 in :php:func:`redirect()`. + - Added support (auto-detection) for HTTP/1.1 response codes 303, 307 in :php:func:`redirect()`. - Changed :php:func:`redirect()` to choose the **refresh** method only on IIS servers, instead of all servers on Windows (when **auto** is used). - Changed :php:func:`anchor()`, :php:func:`anchor_popup()`, and :php:func:`redirect()` to support protocol-relative URLs (e.g. *//ellislab.com/codeigniter*). -- cgit v1.2.3-24-g4f1b From 300e3f04404e771de89351e410699e447759175a Mon Sep 17 00:00:00 2001 From: Petr Heralecky Date: Fri, 10 Jan 2014 11:49:11 +0100 Subject: Added Email::attach_cid() returning CID --- user_guide_src/source/changelog.rst | 2 ++ user_guide_src/source/libraries/email.rst | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0488d9d4a..e8dc880e8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -334,6 +334,8 @@ Release Date: Not Released - Added custom filename to ``Email::attach()`` as ``$this->email->attach($filename, $disposition, $newname)``. - Added possibility to send attachment as buffer string in ``Email::attach()`` as ``$this->email->attach($buffer, $disposition, $newname, $mime)``. + - Email attachments are creating in function Email::attach() - it's faster for sending many emails with same attachments + - Added method Email::attach_cid() returning CID which enables to embed an attachment to html. - Added dsn (delivery status notification) option. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Successfully sent emails will automatically clear the parameters. diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index 39629ece1..90b71142b 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -247,8 +247,8 @@ $this->email->attach() ---------------------- Enables you to send an attachment. Put the file path/name in the first -parameter. Note: Use a file path, not a URL. For multiple attachments -use the method multiple times. For example:: +parameter. For multiple attachments use the method multiple times. +For example:: $this->email->attach('/path/to/photo1.jpg'); $this->email->attach('/path/to/photo2.jpg'); @@ -269,6 +269,26 @@ parameter as mime-type:: $this->email->attach($buffer, 'attachment', 'report.pdf', 'application/pdf'); +$this->email->attach_cid() + -------------------------- + + Returns CID which enables to embed an attachment to html. First parameter + must be attached file. + + :: + + $filename = '/img/photo1.jpg'; + $this->email->attach($filename); + foreach ($list as $address) + { + $this->email->to($address); + $cid = $this->email->attach_cid($filename); + $this->email->message('photo1'); + $this->email->send(); + } + + CID for each Email have to be create again to be unique. + $this->email->print_debugger() ------------------------------ -- cgit v1.2.3-24-g4f1b From de88615b7245f00d086d97a9fb5ea8b307d34c4f Mon Sep 17 00:00:00 2001 From: Petr Heralecky Date: Fri, 10 Jan 2014 12:52:56 +0100 Subject: styleguided --- user_guide_src/source/changelog.rst | 3 +-- user_guide_src/source/libraries/email.rst | 18 +++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e8dc880e8..34eff5d57 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -334,8 +334,7 @@ Release Date: Not Released - Added custom filename to ``Email::attach()`` as ``$this->email->attach($filename, $disposition, $newname)``. - Added possibility to send attachment as buffer string in ``Email::attach()`` as ``$this->email->attach($buffer, $disposition, $newname, $mime)``. - - Email attachments are creating in function Email::attach() - it's faster for sending many emails with same attachments - - Added method Email::attach_cid() returning CID which enables to embed an attachment to html. + - Added method ``Email::attach_cid()`` returning CID which enables to embed an attachment to html. - Added dsn (delivery status notification) option. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Successfully sent emails will automatically clear the parameters. diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index 90b71142b..274d88d46 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -277,15 +277,15 @@ $this->email->attach_cid() :: - $filename = '/img/photo1.jpg'; - $this->email->attach($filename); - foreach ($list as $address) - { - $this->email->to($address); - $cid = $this->email->attach_cid($filename); - $this->email->message('photo1'); - $this->email->send(); - } + $filename = '/img/photo1.jpg'; + $this->email->attach($filename); + foreach ($list as $address) + { + $this->email->to($address); + $cid = $this->email->attach_cid($filename); + $this->email->message('photo1'); + $this->email->send(); + } CID for each Email have to be create again to be unique. -- cgit v1.2.3-24-g4f1b From c809726558cc5364713e49c7404e43989203c4af Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 10 Jan 2014 14:45:31 +0200 Subject: Further changes related to PR #2807 --- user_guide_src/source/changelog.rst | 10 +++++----- user_guide_src/source/libraries/email.rst | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 34eff5d57..b112da5b4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -332,11 +332,11 @@ Release Date: Not Released - :doc:`Email Library ` changes include: - - Added custom filename to ``Email::attach()`` as ``$this->email->attach($filename, $disposition, $newname)``. - - Added possibility to send attachment as buffer string in ``Email::attach()`` as ``$this->email->attach($buffer, $disposition, $newname, $mime)``. - - Added method ``Email::attach_cid()`` returning CID which enables to embed an attachment to html. + - Added a custom filename parameter to ``attach()`` as ``$this->email->attach($filename, $disposition, $newname)``. + - Added possibility to send attachment as buffer string in ``attach()`` as ``$this->email->attach($buffer, $disposition, $newname, $mime)``. + - Added method ``attachment_cid()`` to enable embedding inline attachments into HTML. - Added dsn (delivery status notification) option. - - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. + - Renamed method ``_set_header()`` to ``set_header()`` and made it public to enable adding custom headers. - Successfully sent emails will automatically clear the parameters. - Added a *return_path* parameter to the ``from()`` method. - Removed the second parameter (character limit) from internal method ``_prep_quoted_printable()`` as it is never used. @@ -345,7 +345,7 @@ Release Date: Not Released - Removed unused protected method ``_get_ip()`` (:doc:`Input Library `'s ``ip_address()`` should be used anyway). - Internal method ``_prep_q_encoding()`` now utilizes PHP's *mbstring* and *iconv* extensions (when available) and no longer has a second (``$from``) argument. - Added an optional parameter to ``print_debugger()`` to allow specifying which parts of the message should be printed ('headers', 'subject', 'body'). - - Added SMTP keepalive option to avoid opening the connection for each ``Email::send()``. Accessible as ``$smtp_keepalive``. + - Added SMTP keepalive option to avoid opening the connection for each ``send()`` call. Accessible as ``$smtp_keepalive``. - Public method ``set_header()`` now filters the input by removing all "\\r" and "\\n" characters. - :doc:`Pagination Library ` changes include: diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index 274d88d46..8e3800306 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -269,13 +269,13 @@ parameter as mime-type:: $this->email->attach($buffer, 'attachment', 'report.pdf', 'application/pdf'); -$this->email->attach_cid() - -------------------------- +$this->email->attachment_cid() +------------------------------ - Returns CID which enables to embed an attachment to html. First parameter - must be attached file. +Sets and returns an attachment's Content-ID, which enables your to embed an inline +(picture) attachment into HTML. First parameter must be attached file. - :: +:: $filename = '/img/photo1.jpg'; $this->email->attach($filename); @@ -286,8 +286,8 @@ $this->email->attach_cid() $this->email->message('photo1'); $this->email->send(); } - - CID for each Email have to be create again to be unique. + +CID for each Email have to be create again to be unique. $this->email->print_debugger() ------------------------------ -- cgit v1.2.3-24-g4f1b From 155ee7231c0ef72dc362c7d6423b2e4600024d3c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 10 Jan 2014 15:50:54 +0200 Subject: Compress output before storing it to cache, if output compression is enabled Based on PR #964 --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/general/caching.rst | 3 +++ 2 files changed, 4 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0488d9d4a..0e656a10d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -439,6 +439,7 @@ Release Date: Not Released - Added a second argument to method ``set_content_type()`` that allows setting the document charset as well. - Added methods ``get_content_type()`` and ``get_header()``. - Added method ``delete_cache()``. + - Changed caching behavior to compress the output before storing it, if ``$config['compress_output']`` is enabled. - :doc:`Config Library ` changes include: diff --git a/user_guide_src/source/general/caching.rst b/user_guide_src/source/general/caching.rst index 48385d6c9..f499f6e93 100644 --- a/user_guide_src/source/general/caching.rst +++ b/user_guide_src/source/general/caching.rst @@ -45,6 +45,9 @@ you. Once the tag is in place, your pages will begin being cached. caching will only work if you are generating display for your controller with a :doc:`view <./views>`. +.. important:: If you change configuration options that might affect + your output, you have to manually delete your cache files. + .. note:: Before the cache files can be written you must set the file permissions on your *application/cache/* directory such that it is writable. -- cgit v1.2.3-24-g4f1b From 232ea658e1f31d6c82a9ed9dae1bb3b292b6eb24 Mon Sep 17 00:00:00 2001 From: Petr Heralecky Date: Fri, 10 Jan 2014 15:21:18 +0100 Subject: attach files by absolute url --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/libraries/email.rst | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b112da5b4..cb70627d4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -334,6 +334,7 @@ Release Date: Not Released - Added a custom filename parameter to ``attach()`` as ``$this->email->attach($filename, $disposition, $newname)``. - Added possibility to send attachment as buffer string in ``attach()`` as ``$this->email->attach($buffer, $disposition, $newname, $mime)``. + - Added possibility attach remote file by absolute url - Added method ``attachment_cid()`` to enable embedding inline attachments into HTML. - Added dsn (delivery status notification) option. - Renamed method ``_set_header()`` to ``set_header()`` and made it public to enable adding custom headers. diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index 8e3800306..476f1131d 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -259,6 +259,10 @@ otherwise use a custom disposition:: $this->email->attach('image.jpg', 'inline'); +You can use absolute url:: + + $this->email->attach('http://example.com/filename.pdf'); + If you'd like to use a custom file name, you can use the third paramater:: $this->email->attach('filename.pdf', 'attachment', 'report.pdf'); -- cgit v1.2.3-24-g4f1b From 63f07cbd62ba885f003995dc7ad74bbdb28942c9 Mon Sep 17 00:00:00 2001 From: Petr Heralecky Date: Fri, 10 Jan 2014 16:50:49 +0100 Subject: documentation repairs --- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/libraries/email.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cb70627d4..07dee5dbd 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -334,7 +334,7 @@ Release Date: Not Released - Added a custom filename parameter to ``attach()`` as ``$this->email->attach($filename, $disposition, $newname)``. - Added possibility to send attachment as buffer string in ``attach()`` as ``$this->email->attach($buffer, $disposition, $newname, $mime)``. - - Added possibility attach remote file by absolute url + - Added possibility to attach remote files by passing a URL. - Added method ``attachment_cid()`` to enable embedding inline attachments into HTML. - Added dsn (delivery status notification) option. - Renamed method ``_set_header()`` to ``set_header()`` and made it public to enable adding custom headers. diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index 476f1131d..86f440a74 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -259,7 +259,7 @@ otherwise use a custom disposition:: $this->email->attach('image.jpg', 'inline'); -You can use absolute url:: +You can use URL:: $this->email->attach('http://example.com/filename.pdf'); -- cgit v1.2.3-24-g4f1b From 4e6c5281a3258b3ff530a43580d1b8dc8e34dd59 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 10 Jan 2014 19:29:49 +0200 Subject: Finally get rid of the CI_Router::_set_overrides() calls --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b112da5b4..5da707086 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -461,6 +461,7 @@ Release Date: Not Released - Added possibility to route requests using callbacks. - Added a new reserved route (*translate_uri_dashes*) to allow usage of dashes in the controller and method URI segments. - Deprecated methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` in favor of their respective public properties. + - Removed method ``_set_overrides()`` and moved its logic to the class constructor. - :doc:`Language Library ` changes include: -- cgit v1.2.3-24-g4f1b From de14aa5a29b1b122bfd536f979dfda7f2fd9f53d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 15 Jan 2014 15:51:08 +0200 Subject: CI_URI changes related to the 'permitted_uri_chars' setting - Initialize and cache the value in the class constructor instead of searching for it every time - Removed the preg_quote() call from _filter_uri() to allow more fine-tuning from configuration - Renamed _filter_uri() to filter_uri() - it was public anyway and using it cannot break anything Related: issue #2799 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 43e7be41f..77378521b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -391,6 +391,7 @@ Release Date: Not Released - :doc:`URI Library ` changes include: + - Renamed method ``_filter_uri()`` to ``filter_uri()`` and removed the ``preg_quote()`` call from it. - Changed private methods to protected so that MY_URI can override them. - Renamed internal method ``_parse_cli_args()`` to ``_parse_argv()``. - Renamed internal method ``_detect_uri()`` to ``_parse_request_uri()``. -- cgit v1.2.3-24-g4f1b From d8b1ad31cf7ee205ddf3cf396b1d1bfa45af49fa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 15 Jan 2014 17:42:52 +0200 Subject: Fix #2822: Incorrect usage of fwrite() We only used to check (and not always) if the return value of fwrite() is boolean FALSE, while it is possible that the otherwise returned bytecount is less than the length of data that we're trying to write. This allowed incomplete writes over network streams and possibly a few other edge cases. --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 77378521b..a1dc3c1d1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -669,6 +669,7 @@ Bug fixes for 3.0 - Fixed a bug (#346) - with ``$config['global_xss_filtering']`` turned on, the ``$_GET``, ``$_POST``, ``$_COOKIE`` and ``$_SERVER`` superglobals were overwritten during initialization time, resulting in XSS filtering being either performed twice or there was no possible way to get the original data, even though options for this do exist. - Fixed an edge case (#555) - incorrect browser version was reported for Opera 10+ due to a non-standard user-agent string. - Fixed a bug (#133) - :doc:`Text Helper ` :func:`ascii_to_entities()` stripped the last character if it happens to be in the extended ASCII group. +- Fixed a bug (#2822) - ``fwrite()`` was used incorrectly throughout the whole framework, allowing incomplete writes when writing to a network stream and possibly a few other edge cases. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 08fef7de41cb06785cdb1024769892d9510e6e6b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 15 Jan 2014 18:37:01 +0200 Subject: Fix #2799 by adding conditional PCRE UTF-8 support to CI_URI::filter_uri() Also did a tiny micro-optimization in the Utf8 class. --- user_guide_src/source/changelog.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a1dc3c1d1..4712ed87d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -391,7 +391,8 @@ Release Date: Not Released - :doc:`URI Library ` changes include: - - Renamed method ``_filter_uri()`` to ``filter_uri()`` and removed the ``preg_quote()`` call from it. + - Added conditional PCRE UTF-8 support to the "invalid URI characters" check and removed the ``preg_quote()`` call from it to allow more flexibility. + - Renamed method ``_filter_uri()`` to ``filter_uri()``. - Changed private methods to protected so that MY_URI can override them. - Renamed internal method ``_parse_cli_args()`` to ``_parse_argv()``. - Renamed internal method ``_detect_uri()`` to ``_parse_request_uri()``. -- cgit v1.2.3-24-g4f1b From 30d5324617ae136c7a91badb6ed8f7de418fd7f5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 16 Jan 2014 14:41:46 +0200 Subject: URI Routing overhaul - Allow multiple levels of controller directories (supersedes PRs #390, #2439) - Add support for per-directory 'defaul_controller' and '404_override' (resolves issue #2611; supersedes PR #939) - Fixed a bug where default_controller was called instead of triggering 404 if the current route is inside a directory - Removed a few calls from CI_Router to CI_URI that made a necessity for otherwise internal CI_URI methods to be public: - Removed CI_URI::_fetch_uri_string() and moved its logic into CI_URI::__construct() - Removed CI_URI::_remove_url_suffix, CI_URI::_explode_segments() and moved their logic into CI_URI::_set_uri_string() - Removed CI_URI::_reindex_segments() altogether ( doesn't need further manipulation, while is public anyway and can be properly (and more effectively) replaced on the spot) --- user_guide_src/source/changelog.rst | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4712ed87d..388bc28ce 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -389,6 +389,16 @@ Release Date: Not Released - Core + - :doc:`Routing ` changes include: + + - Added support for multiple levels of controller directories. + - Added support for per-directory *default_controller* and *404_override* classes. + - Added possibility to route requests using HTTP verbs. + - Added possibility to route requests using callbacks. + - Added a new reserved route (*translate_uri_dashes*) to allow usage of dashes in the controller and method URI segments. + - Deprecated methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` in favor of their respective public properties. + - Removed method ``_set_overrides()`` and moved its logic to the class constructor. + - :doc:`URI Library ` changes include: - Added conditional PCRE UTF-8 support to the "invalid URI characters" check and removed the ``preg_quote()`` call from it to allow more flexibility. @@ -399,6 +409,9 @@ Release Date: Not Released - Changed ``_parse_request_uri()`` to accept absolute URIs for compatibility with HTTP/1.1 as per `RFC2616 `. - Added protected method ``_parse_query_string()`` to URI paths in the the **QUERY_STRING** value, like ``_parse_request_uri()`` does. - Changed ``_fetch_uri_string()`` to try the **PATH_INFO** variable first when auto-detecting. + - Removed methods ``_remove_url_suffix()``, ``_explode_segments()`` and moved their logic into ``_set_uri_string()``. + - Removed method ``_fetch_uri_string()`` and moved its logic into the class constructor. + - Removed method ``_reindex_segments()``. - :doc:`Loader Library ` changes include: @@ -458,14 +471,6 @@ Release Date: Not Released - Added ``$config['csrf_exclude_uris']``, which allows you list URIs which will not have the CSRF validation methods run. - Modified method ``sanitize_filename()`` to read a public ``$filename_bad_chars`` property for getting the invalid characters list. - - :doc:`URI Routing ` changes include: - - - Added possibility to route requests using HTTP verbs. - - Added possibility to route requests using callbacks. - - Added a new reserved route (*translate_uri_dashes*) to allow usage of dashes in the controller and method URI segments. - - Deprecated methods ``fetch_directory()``, ``fetch_class()`` and ``fetch_method()`` in favor of their respective public properties. - - Removed method ``_set_overrides()`` and moved its logic to the class constructor. - - :doc:`Language Library ` changes include: - Changed method ``load()`` to filter the language name with ``ctype_alpha()``. @@ -671,6 +676,7 @@ Bug fixes for 3.0 - Fixed an edge case (#555) - incorrect browser version was reported for Opera 10+ due to a non-standard user-agent string. - Fixed a bug (#133) - :doc:`Text Helper ` :func:`ascii_to_entities()` stripped the last character if it happens to be in the extended ASCII group. - Fixed a bug (#2822) - ``fwrite()`` was used incorrectly throughout the whole framework, allowing incomplete writes when writing to a network stream and possibly a few other edge cases. +- Fixed a bug where *default_controller* was called instad of triggering a 404 error if the current route is in a controller directory. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From a9938a09e8214b778b8ab11f60501661bb2ac623 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 17 Jan 2014 14:55:56 +0200 Subject: Minor changes related to CI_User_agent Fixed a bug where both accept_charset() and accept_lang() improperly parsed headers if they contained spaces between data separators (which is valid). Also made is_referral() testable by replacing its static cache var with a class property and added some more unit tests for the library as a whole. --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4712ed87d..8618e5efe 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -671,6 +671,7 @@ Bug fixes for 3.0 - Fixed an edge case (#555) - incorrect browser version was reported for Opera 10+ due to a non-standard user-agent string. - Fixed a bug (#133) - :doc:`Text Helper ` :func:`ascii_to_entities()` stripped the last character if it happens to be in the extended ASCII group. - Fixed a bug (#2822) - ``fwrite()`` was used incorrectly throughout the whole framework, allowing incomplete writes when writing to a network stream and possibly a few other edge cases. +- Fixed a bug where :doc:`User Agent Library ` methods ``accept_charset()`` and ``accept_lang()`` didn't properly parse HTTP headers that contain spaces. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 88cf55bd294e74c71e70406e3a48e722db224f7f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 17 Jan 2014 15:38:30 +0200 Subject: Add autoloading library aliasing support (supersedes PR #2824) --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8618e5efe..539c61367 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -408,7 +408,7 @@ Release Date: Not Released - Added autoloading of drivers with ``$autoload['drivers']``. - ``$config['rewrite_short_tags']`` now has no effect when using PHP 5.4 as `` Date: Sun, 19 Jan 2014 13:23:16 +0600 Subject: Added save_queries config setting in config/database.php --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 237e237e2..2662b451d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -160,6 +160,7 @@ Release Date: Not Released - Added support for SQLite3 database driver. - Added Interbase/Firebird database support via the *ibase* driver. - Added ODBC support for ``create_database()``, ``drop_database()`` and ``drop_table()`` in :doc:`Database Forge `. + - Added **save_queries** config setting in *config/database.php*. Default is ``TRUE``. - :doc:`Query Builder ` changes include: -- cgit v1.2.3-24-g4f1b From 1c8245a22874051f5342824d5299d6ad55f4995c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 20 Jan 2014 10:28:20 +0200 Subject: Polish changes from PR #2830 --- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/database/helpers.rst | 27 ++++++++++++++------------- user_guide_src/source/general/profiling.rst | 6 +++++- 3 files changed, 20 insertions(+), 15 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2662b451d..7cc98f40c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -160,7 +160,7 @@ Release Date: Not Released - Added support for SQLite3 database driver. - Added Interbase/Firebird database support via the *ibase* driver. - Added ODBC support for ``create_database()``, ``drop_database()`` and ``drop_table()`` in :doc:`Database Forge `. - - Added **save_queries** config setting in *config/database.php*. Default is ``TRUE``. + - Added **save_queries** configuration setting to *application/config/database.php* (defaults to ``TRUE``). - :doc:`Query Builder ` changes include: diff --git a/user_guide_src/source/database/helpers.rst b/user_guide_src/source/database/helpers.rst index e8a5ac801..77bf1b5d2 100644 --- a/user_guide_src/source/database/helpers.rst +++ b/user_guide_src/source/database/helpers.rst @@ -3,7 +3,7 @@ Query Helper Functions ###################### $this->db->insert_id() -======================= +====================== The insert ID number when performing database inserts. @@ -12,7 +12,7 @@ The insert ID number when performing database inserts. appropriate sequence to check for the insert id. $this->db->affected_rows() -=========================== +========================== Displays the number of affected rows, when doing "write" type queries (insert, update, etc.). @@ -22,8 +22,8 @@ Displays the number of affected rows, when doing "write" type queries affected rows. By default this hack is enabled but it can be turned off in the database driver file. -$this->db->count_all(); -======================== +$this->db->count_all() +====================== Permits you to determine the number of rows in a particular table. Submit the table name in the first parameter. Example:: @@ -47,8 +47,8 @@ Outputs the database version you are running:: echo $this->db->version(); -$this->db->last_query(); -========================= +$this->db->last_query() +======================= Returns the last query that was run (the query string, not the result). Example:: @@ -57,11 +57,12 @@ Example:: // Produces: SELECT * FROM sometable.... -The following two functions help simplify the process of writing -database INSERTs and UPDATEs. -$this->db->insert_string(); -============================ +.. note:: Disabling the **save_queries** setting in your database + configuration will render this function useless. + +$this->db->insert_string() +========================== This function simplifies the process of writing database inserts. It returns a correctly formatted SQL insert string. Example:: @@ -77,8 +78,8 @@ array with the data to be inserted. The above example produces:: .. note:: Values are automatically escaped, producing safer queries. -$this->db->update_string(); -============================ +$this->db->update_string() +========================== This function simplifies the process of writing database updates. It returns a correctly formatted SQL update string. Example:: @@ -95,4 +96,4 @@ array with the data to be updated, and the third parameter is the UPDATE table_name SET name = 'Rick', email = 'rick@example.com', url = 'example.com' WHERE author_id = 1 AND status = 'active' -.. note:: Values are automatically escaped, producing safer queries. +.. note:: Values are automatically escaped, producing safer queries. \ No newline at end of file diff --git a/user_guide_src/source/general/profiling.rst b/user_guide_src/source/general/profiling.rst index 6dbd0be16..f29af8102 100644 --- a/user_guide_src/source/general/profiling.rst +++ b/user_guide_src/source/general/profiling.rst @@ -80,4 +80,8 @@ Key Description **session_data** Data stored in the current session TRUE **query_toggle_count** The number of queries after which the query block will default to 25 hidden. -======================= =================================================================== ======== \ No newline at end of file +======================= =================================================================== ======== + +.. note:: Disabling the **save_queries** setting in your database configuration + will also effectively disable profiling for database queries and render + the 'queries' setting above useless. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 3aecedbbb017567925f76ae68b726bd22b4cc80c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 20 Jan 2014 10:39:08 +0200 Subject: Fix #2737 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d5e560f5b..4d93091f1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -680,6 +680,7 @@ Bug fixes for 3.0 - Fixed a bug (#2822) - ``fwrite()`` was used incorrectly throughout the whole framework, allowing incomplete writes when writing to a network stream and possibly a few other edge cases. - Fixed a bug where :doc:`User Agent Library ` methods ``accept_charset()`` and ``accept_lang()`` didn't properly parse HTTP headers that contain spaces. - Fixed a bug where *default_controller* was called instad of triggering a 404 error if the current route is in a controller directory. +- Fixed a bug (#2737) - :doc:`XML-RPC Library ` used objects as array keys, which triggered E_NOTICE messages. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b From 4d0571666d03511ac5b4a1f2a6882ccb1509a209 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 20 Jan 2014 11:17:34 +0200 Subject: Fix #2729 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4d93091f1..c68258e1c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -681,6 +681,7 @@ Bug fixes for 3.0 - Fixed a bug where :doc:`User Agent Library ` methods ``accept_charset()`` and ``accept_lang()`` didn't properly parse HTTP headers that contain spaces. - Fixed a bug where *default_controller* was called instad of triggering a 404 error if the current route is in a controller directory. - Fixed a bug (#2737) - :doc:`XML-RPC Library ` used objects as array keys, which triggered E_NOTICE messages. +- Fixed a bug (#2729) - ``CI_Securty::_validate_entities()`` used overly-intrusive ``preg_replace()`` patterns that produced false-positives. Version 2.1.4 ============= -- cgit v1.2.3-24-g4f1b