From 1089a862fc8cd6fdd6bb2a5f88e1446d37912ace Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 27 Jan 2016 16:15:01 +0200 Subject: Fix #4401 --- 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 1623341ea..8e76f1d01 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -14,6 +14,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4384) - :doc:`Pagination Library ` ignored (possible) *cur_page* configuration value. - Fixed a bug (#4395) - :doc:`Query Builder ` method ``count_all_results()`` still fails if an ``ORDER BY`` condition is used. - Fixed a bug (#4399) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` produced confusing error messages when called with no data and *db_debug* is enabled. +- Fixed a bug (#4401) - :doc:`Query Builder ` breaks ``WHERE`` and ``HAVING`` conditions that use ``IN()`` with strings containing a closing parenthesis. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 168c7212a2b458bf27460e790b63066d24f2296d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jan 2016 00:56:27 +0200 Subject: Merge pull request #4408 from ShrmnK/develop [ci skip] Fixed minor typographical error in DCO doc --- user_guide_src/source/contributing/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/contributing/index.rst b/user_guide_src/source/contributing/index.rst index 9551fbeb7..739d436a0 100644 --- a/user_guide_src/source/contributing/index.rst +++ b/user_guide_src/source/contributing/index.rst @@ -155,5 +155,5 @@ could even alias git commit to use the -s flag so you don’t have to think abou it. By signing your work in this manner, you certify to a "Developer's Certificate -or Origin". The current version of this certificate is in the :doc:`/DCO` file +of Origin". The current version of this certificate is in the :doc:`/DCO` file in the root of this documentation. -- cgit v1.2.3-24-g4f1b From 0b59bdd3cd647b44c83e746a5d3d3aa179325df4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jan 2016 01:18:08 +0200 Subject: Fix a regression in Form helper caused by 0139e6a4a99cbe9b0cc06f394fa12d5691193b72 --- 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 8e76f1d01..372261efd 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -15,6 +15,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4395) - :doc:`Query Builder ` method ``count_all_results()`` still fails if an ``ORDER BY`` condition is used. - Fixed a bug (#4399) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` produced confusing error messages when called with no data and *db_debug* is enabled. - Fixed a bug (#4401) - :doc:`Query Builder ` breaks ``WHERE`` and ``HAVING`` conditions that use ``IN()`` with strings containing a closing parenthesis. +- Fixed a regression in :doc:`Form Helper ` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` where "checked" inputs aren't recognized after a form submit. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 6a802289522abc85309527855d9dc2faa34f54e0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jan 2016 12:12:57 +0200 Subject: Merge pull request #4411 from kenjis/fix-upgrade_300-1 [ci skip] Fix formatting of paths in 3.0.0 upgrade instructions --- user_guide_src/source/installation/upgrade_300.rst | 8 ++++---- 1 file changed, 4 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 45ce21320..9a40f2b60 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -65,7 +65,7 @@ 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*. +it to *application/config/mimes.php*. ************************************************************** Step 4: Remove $autoload['core'] from your config/autoload.php @@ -206,13 +206,13 @@ Step 8: Replace your error templates ************************************ In CodeIgniter 3.0, the error templates are now considered as views and have been moved to the -_application/views/errors* directory. +*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. +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 file -- cgit v1.2.3-24-g4f1b From 6af9dd6e24687b6a7b9d14a058a47edcac761e61 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jan 2016 13:29:57 +0200 Subject: Fix #4407 --- 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 372261efd..a3fed6af3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,6 +16,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4399) - :doc:`Query Builder ` methods ``insert_batch()``, ``update_batch()`` produced confusing error messages when called with no data and *db_debug* is enabled. - Fixed a bug (#4401) - :doc:`Query Builder ` breaks ``WHERE`` and ``HAVING`` conditions that use ``IN()`` with strings containing a closing parenthesis. - Fixed a regression in :doc:`Form Helper ` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` where "checked" inputs aren't recognized after a form submit. +- Fixed a bug (#4407) - :doc:`Text Helper ` function :php:func:`word_censor()` doesn't work under PHP 7 if there's no custom replacement provided. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 391d339b921623ce921bdb5520fb93f9cf62fac5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 30 Jan 2016 22:43:41 +0200 Subject: Fix #4415 and add unit tests for https://bugs.php.net/bug.php?id=51192 --- 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 a3fed6af3..a8cb3f5c3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -17,6 +17,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4401) - :doc:`Query Builder ` breaks ``WHERE`` and ``HAVING`` conditions that use ``IN()`` with strings containing a closing parenthesis. - Fixed a regression in :doc:`Form Helper ` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` where "checked" inputs aren't recognized after a form submit. - Fixed a bug (#4407) - :doc:`Text Helper ` function :php:func:`word_censor()` doesn't work under PHP 7 if there's no custom replacement provided. +- Fixed a bug (#4415) - :doc:`Form Validation Library ` rule **valid_url** didn't accept URLs with IPv6 addresses enclosed in square brackets under PHP 5 (upstream bug). Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From e8bcc9eeb4ccbbea78442275c646de21aaaa6594 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 2 Feb 2016 14:01:50 +0200 Subject: Merge pull request #4419 from EpicKris/hotfix/database-forge-unique-doc [ci skip] Added docs for UNIQUE keys in DBForge --- user_guide_src/source/database/forge.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/database/forge.rst b/user_guide_src/source/database/forge.rst index 646e3a56e..5af4f2248 100644 --- a/user_guide_src/source/database/forge.rst +++ b/user_guide_src/source/database/forge.rst @@ -97,6 +97,7 @@ Additionally, the following key/values can be used: - auto_increment/true : generates an auto_increment flag on the field. Note that the field type must be a type that supports this, such as integer. +- unique/true : to generate a unique key for the field definition. :: @@ -110,6 +111,7 @@ Additionally, the following key/values can be used: 'blog_title' => array( 'type' => 'VARCHAR', 'constraint' => '100', + 'unique' => TRUE, ), 'blog_author' => array( 'type' =>'VARCHAR', @@ -175,14 +177,14 @@ below is for MySQL. $this->dbforge->add_key('blog_id', TRUE); // gives PRIMARY KEY `blog_id` (`blog_id`) - + $this->dbforge->add_key('blog_id', TRUE); $this->dbforge->add_key('site_id', TRUE); // gives PRIMARY KEY `blog_id_site_id` (`blog_id`, `site_id`) - + $this->dbforge->add_key('blog_name'); // gives KEY `blog_name` (`blog_name`) - + $this->dbforge->add_key(array('blog_name', 'blog_label')); // gives KEY `blog_name_blog_label` (`blog_name`, `blog_label`) @@ -261,7 +263,7 @@ number of additional fields. $fields = array( 'preferences' => array('type' => 'TEXT') ); - $this->dbforge->add_column('table_name', $fields); + $this->dbforge->add_column('table_name', $fields); // Executes: ALTER TABLE table_name ADD preferences TEXT If you are using MySQL or CUBIRD, then you can take advantage of their -- cgit v1.2.3-24-g4f1b From ec9e96eb09caa9d024c89a8bdb1b00bf6540278a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Feb 2016 14:43:46 +0200 Subject: Fix #4427 --- 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 a8cb3f5c3..cde4b8b4e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -18,6 +18,7 @@ Bug fixes for 3.0.5 - Fixed a regression in :doc:`Form Helper ` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` where "checked" inputs aren't recognized after a form submit. - Fixed a bug (#4407) - :doc:`Text Helper ` function :php:func:`word_censor()` doesn't work under PHP 7 if there's no custom replacement provided. - Fixed a bug (#4415) - :doc:`Form Validation Library ` rule **valid_url** didn't accept URLs with IPv6 addresses enclosed in square brackets under PHP 5 (upstream bug). +- Fixed a bug (#4427) - :doc:`CAPTCHA Helper ` triggers an error if the provided character pool is too small. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 71d64cbcfde625606ffb55867e0bb547123ef22f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Feb 2016 15:04:35 +0200 Subject: Fix #4430 --- 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 cde4b8b4e..1a06bd5ae 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -19,6 +19,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4407) - :doc:`Text Helper ` function :php:func:`word_censor()` doesn't work under PHP 7 if there's no custom replacement provided. - Fixed a bug (#4415) - :doc:`Form Validation Library ` rule **valid_url** didn't accept URLs with IPv6 addresses enclosed in square brackets under PHP 5 (upstream bug). - Fixed a bug (#4427) - :doc:`CAPTCHA Helper ` triggers an error if the provided character pool is too small. +- Fixed a bug (#4430) - :doc:`File Uploading Library ` option **file_ext_tolower** didn't work. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From 105a48bbfc97be5902dbe80f90f8936fe174c9cf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Feb 2016 15:45:10 +0200 Subject: Add batch_size param to insert_batch(), update_batch() This should resolve #42 --- user_guide_src/source/changelog.rst | 5 +++++ user_guide_src/source/database/query_builder.rst | 18 ++++++++++++++---- 2 files changed, 19 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 1a06bd5ae..7e72c230f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,11 @@ Version 3.0.5 Release Date: Not Released +- :doc:`Query Builder ` + + - Added a ``$batch_size`` parameter to the ``insert_batch()`` method (defaults to 100). + - Added a ``$batch_size`` parameter to the ``update_batch()`` method (defaults to 100). + Bug fixes for 3.0.5 ------------------- diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 5d9ae4592..3135f76da 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -1433,15 +1433,20 @@ Class Reference Compiles and executes an INSERT statement. - .. php:method:: insert_batch([$table = ''[, $set = NULL[, $escape = NULL]]]) + .. php:method:: insert_batch($table[, $set = NULL[, $escape = NULL[, $batch_size = 100]]]) :param string $table: Table name :param array $set: Data to insert :param bool $escape: Whether to escape values and identifiers + :param int $batch_size: Count of rows to insert at once :returns: Number of rows inserted or FALSE on failure :rtype: mixed - Compiles and executes batch INSERT statements. + Compiles and executes batch ``INSERT`` statements. + + .. note:: When more than ``$batch_size`` rows are provided, multiple + ``INSERT`` queries will be executed, each trying to insert + up to ``$batch_size`` rows. .. php:method:: set_insert_batch($key[, $value = ''[, $escape = NULL]]) @@ -1464,15 +1469,20 @@ Class Reference Compiles and executes an UPDATE statement. - .. php:method:: update_batch([$table = ''[, $set = NULL[, $value = NULL]]]) + .. php:method:: update_batch($table[, $set = NULL[, $value = NULL[, $batch_size = 100]]]) :param string $table: Table name :param array $set: Field name, or an associative array of field/value pairs :param string $value: Field value, if $set is a single field + :param int $batch_size: Count of conditions to group in a single query :returns: Number of rows updated or FALSE on failure :rtype: mixed - Compiles and executes batch UPDATE statements. + Compiles and executes batch ``UPDATE`` statements. + + .. note:: When more than ``$batch_size`` field/value pairs are provided, + multiple queries will be executed, each handling up to + ``$batch_size`` field/value pairs. .. php:method:: set_update_batch($key[, $value = ''[, $escape = NULL]]) -- cgit v1.2.3-24-g4f1b From 805eddaefd9503b5dbbd924bd6da66e29c4768f3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Feb 2016 12:44:19 +0200 Subject: Fix #4431 --- 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 7e72c230f..e993a862a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -25,6 +25,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4415) - :doc:`Form Validation Library ` rule **valid_url** didn't accept URLs with IPv6 addresses enclosed in square brackets under PHP 5 (upstream bug). - Fixed a bug (#4427) - :doc:`CAPTCHA Helper ` triggers an error if the provided character pool is too small. - Fixed a bug (#4430) - :doc:`File Uploading Library ` option **file_ext_tolower** didn't work. +- Fixed a bug (#4431) - :doc:`Query Builder ` method ``join()`` discarded opening parentheses. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From acc2f249315f70bfb9c236389627869d4b247930 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Feb 2016 14:39:40 +0200 Subject: [ci skip] Add changelog entry for PR #4424 --- 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 e993a862a..6176875c7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -26,6 +26,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4427) - :doc:`CAPTCHA Helper ` triggers an error if the provided character pool is too small. - Fixed a bug (#4430) - :doc:`File Uploading Library ` option **file_ext_tolower** didn't work. - Fixed a bug (#4431) - :doc:`Query Builder ` method ``join()`` discarded opening parentheses. +- Fixed a bug (#4424) - :doc:`Session Library ` triggered a PHP warning when writing a newly created session with the 'redis' driver. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b From b37036a48a7639b82050d9aba24d92a48f50de75 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 6 Feb 2016 15:25:40 +0200 Subject: Merge pull request #4410 from ShrmnK/develop [ci skip] Consistent formatting of file paths and inline code in docs --- user_guide_src/source/installation/index.rst | 18 +++++++++--------- user_guide_src/source/installation/troubleshooting.rst | 4 ++-- user_guide_src/source/overview/at_a_glance.rst | 4 ++-- user_guide_src/source/tutorial/create_news_items.rst | 16 ++++++++-------- user_guide_src/source/tutorial/static_pages.rst | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/index.rst b/user_guide_src/source/installation/index.rst index 50493bbbd..fbf6ecee1 100644 --- a/user_guide_src/source/installation/index.rst +++ b/user_guide_src/source/installation/index.rst @@ -6,37 +6,37 @@ CodeIgniter is installed in four steps: #. Unzip the package. #. Upload the CodeIgniter folders and files to your server. Normally the - index.php file will be at your root. -#. Open the application/config/config.php file with a text editor and + *index.php* file will be at your root. +#. Open the *application/config/config.php* file with a text editor and set your base URL. If you intend to use encryption or sessions, set your encryption key. #. If you intend to use a database, open the - application/config/database.php file with a text editor and set your + *application/config/database.php* file with a text editor and set your database settings. If you wish to increase security by hiding the location of your CodeIgniter files you can rename the system and application folders to something more private. If you do rename them, you must open your main -index.php file and set the $system_path and $application_folder +*index.php* file and set the ``$system_path`` and ``$application_folder`` variables at the top of the file with the new name you've chosen. For the best security, both the system and any application folders should be placed above web root so that they are not directly accessible -via a browser. By default, .htaccess files are included in each folder +via a browser. By default, *.htaccess* files are included in each folder to help prevent direct access, but it is best to remove them from public access entirely in case the web server configuration changes or doesn't -abide by the .htaccess. +abide by the *.htaccess*. If you would like to keep your views public it is also possible to move the views folder out of your application folder. After moving them, open your main index.php file and set the -$system_path, $application_folder and $view_folder variables, -preferably with a full path, e.g. '/www/MyUser/system'. +``$system_path``, ``$application_folder`` and ``$view_folder`` variables, +preferably with a full path, e.g. '*/www/MyUser/system*'. One additional measure to take in production environments is to disable PHP error reporting and any other development-only functionality. In -CodeIgniter, this can be done by setting the ENVIRONMENT constant, which +CodeIgniter, this can be done by setting the ``ENVIRONMENT`` constant, which is more fully described on the :doc:`security page <../general/security>`. diff --git a/user_guide_src/source/installation/troubleshooting.rst b/user_guide_src/source/installation/troubleshooting.rst index e874bb0ec..cca290763 100644 --- a/user_guide_src/source/installation/troubleshooting.rst +++ b/user_guide_src/source/installation/troubleshooting.rst @@ -5,11 +5,11 @@ Troubleshooting If you find that no matter what you put in your URL only your default page is loading, it might be that your server does not support the REQUEST_URI variable needed to serve search-engine friendly URLs. As a -first step, open your application/config/config.php file and look for +first step, open your *application/config/config.php* file and look for the URI Protocol information. It will recommend that you try a couple alternate settings. If it still doesn't work after you've tried this you'll need to force CodeIgniter to add a question mark to your URLs. To -do this open your **application/config/config.php** file and change this:: +do this open your *application/config/config.php* file and change this:: $config['index_page'] = "index.php"; diff --git a/user_guide_src/source/overview/at_a_glance.rst b/user_guide_src/source/overview/at_a_glance.rst index ce195c211..b4db6b18b 100644 --- a/user_guide_src/source/overview/at_a_glance.rst +++ b/user_guide_src/source/overview/at_a_glance.rst @@ -54,8 +54,8 @@ approach:: example.com/news/article/345 -Note: By default the index.php file is included in the URL but it can be -removed using a simple .htaccess file. +Note: By default the *index.php* file is included in the URL but it can be +removed using a simple *.htaccess* file. CodeIgniter Packs a Punch ========================= diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst index bc0ce7612..e10eebd3b 100644 --- a/user_guide_src/source/tutorial/create_news_items.rst +++ b/user_guide_src/source/tutorial/create_news_items.rst @@ -14,7 +14,7 @@ To input data into the database you need to create a form where you can input the information to be stored. This means you'll be needing a form with two fields, one for the title and one for the text. You'll derive the slug from our title in the model. Create the new view at -application/views/news/create.php. +*application/views/news/create.php*. :: @@ -35,7 +35,7 @@ application/views/news/create.php. There are only two things here that probably look unfamiliar to you: the -form_open() function and the validation_errors() function. +``form_open()`` function and the ``validation_errors()`` function. The first function is provided by the :doc:`form helper <../helpers/form_helper>` and renders the form element and @@ -76,7 +76,7 @@ validation <../libraries/form_validation>` library to do this. The code above adds a lot of functionality. The first few lines load the form helper and the form validation library. After that, rules for the -form validation are set. The set\_rules() method takes three arguments; +form validation are set. The ``set\_rules()`` method takes three arguments; the name of the input field, the name to be used in error messages, and the rule. In this case the title and text fields are required. @@ -88,7 +88,7 @@ Continuing down, you can see a condition that checks whether the form validation ran successfully. If it did not, the form is displayed, if it was submitted **and** passed all the rules, the model is called. After this, a view is loaded to display a success message. Create a view at -application/views/news/success.php and write a success message. +*application/views/news/success.php* and write a success message. Model ----- @@ -123,19 +123,19 @@ sure everything is in lowercase characters. This leaves you with a nice slug, perfect for creating URIs. Let's continue with preparing the record that is going to be inserted -later, inside the $data array. Each element corresponds with a column in +later, inside the ``$data`` array. Each element corresponds with a column in the database table created earlier. You might notice a new method here, -namely the post() method from the :doc:`input +namely the ``post()`` method from the :doc:`input library <../libraries/input>`. This method makes sure the data is sanitized, protecting you from nasty attacks from others. The input -library is loaded by default. At last, you insert our $data array into +library is loaded by default. At last, you insert our ``$data`` array into our database. Routing ------- Before you can start adding news items into your CodeIgniter application -you have to add an extra rule to config/routes.php file. Make sure your +you have to add an extra rule to *config/routes.php* file. Make sure your file contains the following. This makes sure CodeIgniter sees 'create' as a method instead of a news item's slug. diff --git a/user_guide_src/source/tutorial/static_pages.rst b/user_guide_src/source/tutorial/static_pages.rst index 66621471e..569287c98 100644 --- a/user_guide_src/source/tutorial/static_pages.rst +++ b/user_guide_src/source/tutorial/static_pages.rst @@ -24,7 +24,7 @@ you'll see URL patterns that 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 c52ff48f7449b25719fde942757f6043a2d14dde Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 6 Feb 2016 15:27:15 +0200 Subject: [ci skip] Note adjustment in docs --- user_guide_src/source/overview/at_a_glance.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/overview/at_a_glance.rst b/user_guide_src/source/overview/at_a_glance.rst index b4db6b18b..742d7bd0e 100644 --- a/user_guide_src/source/overview/at_a_glance.rst +++ b/user_guide_src/source/overview/at_a_glance.rst @@ -54,8 +54,8 @@ approach:: example.com/news/article/345 -Note: By default the *index.php* file is included in the URL but it can be -removed using a simple *.htaccess* file. +.. note:: By default the *index.php* file is included in the URL but it can + be removed using a simple *.htaccess* file. CodeIgniter Packs a Punch ========================= -- cgit v1.2.3-24-g4f1b From c65a37e21d87a27ac7dc397eac16b5f70aec064f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 8 Feb 2016 12:29:14 +0200 Subject: [ci skip] Add a changelog entry for PR #4437 --- 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 6176875c7..a64a6c75a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,6 +27,7 @@ Bug fixes for 3.0.5 - Fixed a bug (#4430) - :doc:`File Uploading Library ` option **file_ext_tolower** didn't work. - Fixed a bug (#4431) - :doc:`Query Builder ` method ``join()`` discarded opening parentheses. - Fixed a bug (#4424) - :doc:`Session Library ` triggered a PHP warning when writing a newly created session with the 'redis' driver. +- Fixed a bug (#4437) - :doc:`Inflector Helper ` function :php:func:`humanize()` didn't escape its ``$separator`` parameter while using it in a regular expression. Version 3.0.4 ============= -- cgit v1.2.3-24-g4f1b