summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries
diff options
context:
space:
mode:
authorTim Nolte <noltet@sekisui-spi.com>2015-06-08 18:25:34 +0200
committerTim Nolte <noltet@sekisui-spi.com>2015-06-08 18:25:34 +0200
commit89ed9fafd75e3b65a7691f1b13440bdedadf5eda (patch)
tree5dfa69c55ff48502527fcb6f4f532fb5ad6651ca /user_guide_src/source/libraries
parent2ac4177b4b6afc63d594523416c3991d23dddf20 (diff)
parentb76394834a3e36e8c376913cd9666a8d7a4cea45 (diff)
Merge branch 'develop' into feature/mysqli-ssl
Diffstat (limited to 'user_guide_src/source/libraries')
-rw-r--r--user_guide_src/source/libraries/caching.rst4
-rw-r--r--user_guide_src/source/libraries/config.rst4
-rw-r--r--user_guide_src/source/libraries/file_uploading.rst4
-rw-r--r--user_guide_src/source/libraries/form_validation.rst7
-rw-r--r--user_guide_src/source/libraries/image_lib.rst10
-rw-r--r--user_guide_src/source/libraries/migration.rst6
-rw-r--r--user_guide_src/source/libraries/security.rst8
7 files changed, 19 insertions, 24 deletions
diff --git a/user_guide_src/source/libraries/caching.rst b/user_guide_src/source/libraries/caching.rst
index f54de5faf..a7081ec6b 100644
--- a/user_guide_src/source/libraries/caching.rst
+++ b/user_guide_src/source/libraries/caching.rst
@@ -18,7 +18,7 @@ requirements are not met.
Example Usage
*************
-The following example will load the cache driver, specify `APC <#apc>`_
+The following example will load the cache driver, specify `APC <#alternative-php-cache-apc-caching>`_
as the driver to use, and fall back to file-based caching if APC is not
available in the hosting environment.
@@ -66,7 +66,7 @@ Class Reference
hosting environment.
::
- if ($this->cache->apc->is_supported()
+ if ($this->cache->apc->is_supported())
{
if ($data = $this->cache->apc->get('my_cache'))
{
diff --git a/user_guide_src/source/libraries/config.rst b/user_guide_src/source/libraries/config.rst
index 3138e3403..a45cacdf5 100644
--- a/user_guide_src/source/libraries/config.rst
+++ b/user_guide_src/source/libraries/config.rst
@@ -92,9 +92,9 @@ Fetching Config Items
To retrieve an item from your config file, use the following function::
- $this->config->item('item name');
+ $this->config->item('item_name');
-Where item name is the $config array index you want to retrieve. For
+Where item_name is the $config array index you want to retrieve. For
example, to fetch your language choice you'll do this::
$lang = $this->config->item('language');
diff --git a/user_guide_src/source/libraries/file_uploading.rst b/user_guide_src/source/libraries/file_uploading.rst
index ea2fef7f2..6d2106be8 100644
--- a/user_guide_src/source/libraries/file_uploading.rst
+++ b/user_guide_src/source/libraries/file_uploading.rst
@@ -118,7 +118,7 @@ this code and save it to your **application/controllers/** directory::
$this->load->library('upload', $config);
- if ( ! $this->upload->do_upload())
+ if ( ! $this->upload->do_upload('userfile'))
{
$error = array('error' => $this->upload->display_errors());
@@ -352,4 +352,4 @@ Class Reference
image_height Image height
image_type Image type (usually the file name extension without the period)
image_size_str A string containing the width and height (useful to put into an image tag)
- ================ ==================================================================================================== \ No newline at end of file
+ ================ ====================================================================================================
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index da43a4bec..fa50c6dcf 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -327,15 +327,15 @@ can also prep your data in various ways. For example, you can set up
rules like this::
$this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]');
- $this->form_validation->set_rules('password', 'Password', 'trim|required|md5');
+ $this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[8]');
$this->form_validation->set_rules('passconf', 'Password Confirmation', 'trim|required|matches[password]');
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');
In the above example, we are "trimming" the fields, checking for length
-where necessary and converting the password to MD5.
+where necessary and making sure that both password fields match.
**Any native PHP function that accepts one parameter can be used as a
-rule, like htmlspecialchars, trim, md5, etc.**
+rule, like ``htmlspecialchars()``, ``trim()``, etc.**
.. note:: You will generally want to use the prepping functions
**after** the validation rules so if there is an error, the
@@ -946,6 +946,7 @@ Rule Parameter Description
========================= ========== ============================================================================================= =======================
**required** No Returns FALSE if the form element is empty.
**matches** Yes Returns FALSE if the form element does not match the one in the parameter. matches[form_item]
+**regex_match** Yes Returns FALSE if the form element does not match the regular expression. regex_match[/regex/]
**differs** Yes Returns FALSE if the form element does not differ from the one in the parameter. differs[form_item]
**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
diff --git a/user_guide_src/source/libraries/image_lib.rst b/user_guide_src/source/libraries/image_lib.rst
index ae2c8478e..e5f7c000f 100644
--- a/user_guide_src/source/libraries/image_lib.rst
+++ b/user_guide_src/source/libraries/image_lib.rst
@@ -89,7 +89,7 @@ If they fail you can retrieve the error message using this function::
echo $this->image_lib->display_errors();
-A good practice is use the processing function conditionally, showing an
+A good practice is to use the processing function conditionally, showing an
error upon failure, like this::
if ( ! $this->image_lib->resize())
@@ -187,7 +187,7 @@ Two Types of Watermarking
There are two types of watermarking that you can use:
-- **Text**: The watermark message will be generating using text, either
+- **Text**: The watermark message will be generated using text, either
with a True Type font that you specify, or using the native text
output that the GD library supports. If you use the True Type version
your GD installation must be compiled with True Type support (most
@@ -231,7 +231,7 @@ bottom/center of the image, 20 pixels from the bottom of the image.
Watermarking Preferences
========================
-This table shown the preferences that are available for both types of
+This table shows the preferences that are available for both types of
watermarking (text or overlay)
======================= =================== ======================= ==========================================================================
@@ -264,7 +264,7 @@ Preference Default Value Options Description
Text Preferences
----------------
-This table shown the preferences that are available for the text type of
+This table shows the preferences that are available for the text type of
watermarking.
======================= =================== =================== ==========================================================================
@@ -289,7 +289,7 @@ Preference Default Value Options Description
Overlay Preferences
-------------------
-This table shown the preferences that are available for the overlay type
+This table shows the preferences that are available for the overlay type
of watermarking.
======================= =================== =================== ==========================================================================
diff --git a/user_guide_src/source/libraries/migration.rst b/user_guide_src/source/libraries/migration.rst
index 25be0c93c..97c72303c 100644
--- a/user_guide_src/source/libraries/migration.rst
+++ b/user_guide_src/source/libraries/migration.rst
@@ -88,7 +88,7 @@ as *20121031100537_add_blog.php*.
}
}
-Then in **application/config/migration.php** set ``$config['migration_version'] = 1;``.
+Then in **application/config/migration.php** set ``$config['migration_version'] = 20121031100537;``.
*************
Usage Example
@@ -164,7 +164,7 @@ Class Reference
.. php:method:: latest()
- :returns: TRUE if no migrations are found, current version string on success, FALSE on failure
+ :returns: Current version string on success, FALSE on failure
:rtype: mixed
This works much the same way as ``current()`` but instead of looking for
@@ -181,4 +181,4 @@ Class Reference
specific versions. It works just like ``current()`` but ignores ``$config['migration_version']``.
::
- $this->migration->version(5); \ No newline at end of file
+ $this->migration->version(5);
diff --git a/user_guide_src/source/libraries/security.rst b/user_guide_src/source/libraries/security.rst
index ac56fc589..305a8e57c 100644
--- a/user_guide_src/source/libraries/security.rst
+++ b/user_guide_src/source/libraries/security.rst
@@ -35,12 +35,6 @@ To filter data through the XSS filter use the ``xss_clean()`` method::
$data = $this->security->xss_clean($data);
-If you want the filter to run automatically every time it encounters
-POST or COOKIE data you can enable it by opening your
-application/config/config.php file and setting this::
-
- $config['global_xss_filtering'] = TRUE;
-
An optional second parameter, *is_image*, allows this function to be used
to test images for potential XSS attacks, useful for file upload
security. When this second parameter is set to TRUE, instead of
@@ -88,7 +82,7 @@ may alter this behavior by editing the following config parameter
::
- $config['csrf_regeneration'] = TRUE;
+ $config['csrf_regenerate'] = TRUE;
Select URIs can be whitelisted from csrf protection (for example API
endpoints expecting externally POSTed content). You can add these URIs