summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/libraries')
-rw-r--r--user_guide_src/source/libraries/caching.rst2
-rw-r--r--user_guide_src/source/libraries/calendar.rst12
-rw-r--r--user_guide_src/source/libraries/cart.rst398
-rw-r--r--user_guide_src/source/libraries/config.rst13
-rw-r--r--user_guide_src/source/libraries/email.rst10
-rw-r--r--user_guide_src/source/libraries/encryption.rst6
-rw-r--r--user_guide_src/source/libraries/form_validation.rst34
-rw-r--r--user_guide_src/source/libraries/ftp.rst2
-rw-r--r--user_guide_src/source/libraries/image_lib.rst9
-rw-r--r--user_guide_src/source/libraries/input.rst100
-rw-r--r--user_guide_src/source/libraries/javascript.rst322
-rw-r--r--user_guide_src/source/libraries/output.rst4
-rw-r--r--user_guide_src/source/libraries/pagination.rst2
-rw-r--r--user_guide_src/source/libraries/security.rst19
-rw-r--r--user_guide_src/source/libraries/sessions.rst29
-rw-r--r--user_guide_src/source/libraries/table.rst10
-rw-r--r--user_guide_src/source/libraries/trackback.rst4
-rw-r--r--user_guide_src/source/libraries/xmlrpc.rst6
-rw-r--r--user_guide_src/source/libraries/zip.rst2
19 files changed, 100 insertions, 884 deletions
diff --git a/user_guide_src/source/libraries/caching.rst b/user_guide_src/source/libraries/caching.rst
index a7081ec6b..81019c015 100644
--- a/user_guide_src/source/libraries/caching.rst
+++ b/user_guide_src/source/libraries/caching.rst
@@ -255,8 +255,6 @@ To use it, you need `Redis server and phpredis PHP extension <https://github.com
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;
diff --git a/user_guide_src/source/libraries/calendar.rst b/user_guide_src/source/libraries/calendar.rst
index 52883d297..8fdacf1d7 100644
--- a/user_guide_src/source/libraries/calendar.rst
+++ b/user_guide_src/source/libraries/calendar.rst
@@ -60,10 +60,10 @@ parameter of the calendar generating function. Consider this example::
$this->load->library('calendar');
$data = array(
- 3 => 'http://example.com/news/article/2006/03/',
- 7 => 'http://example.com/news/article/2006/07/',
- 13 => 'http://example.com/news/article/2006/13/',
- 26 => 'http://example.com/news/article/2006/26/'
+ 3 => 'http://example.com/news/article/2006/06/03/',
+ 7 => 'http://example.com/news/article/2006/06/07/',
+ 13 => 'http://example.com/news/article/2006/06/13/',
+ 26 => 'http://example.com/news/article/2006/06/26/'
);
echo $this->calendar->generate(2006, 6, $data);
@@ -179,7 +179,7 @@ will be placed within a pair of pseudo-variables as shown here::
{cal_cell_blank}&nbsp;{/cal_cell_blank}
- {cal_cell_other}{day}{cal_cel_other}
+ {cal_cell_other}{day}{/cal_cel_other}
{cal_cell_end}</td>{/cal_cell_end}
{cal_cell_end_today}</td>{/cal_cell_end_today}
@@ -304,4 +304,4 @@ Class Reference
:rtype: CI_Calendar
Harvests the data within the template ``{pseudo-variables}`` used to
- display the calendar. \ No newline at end of file
+ display the calendar.
diff --git a/user_guide_src/source/libraries/cart.rst b/user_guide_src/source/libraries/cart.rst
deleted file mode 100644
index be343320d..000000000
--- a/user_guide_src/source/libraries/cart.rst
+++ /dev/null
@@ -1,398 +0,0 @@
-###################
-Shopping Cart Class
-###################
-
-The Cart Class permits items to be added to a session that stays active
-while a user is browsing your site. These items can be retrieved and
-displayed in a standard "shopping cart" format, allowing the user to
-update the quantity or remove items from the cart.
-
-.. important:: The Cart library is DEPRECATED and should not be used.
- It is currently only kept for backwards compatibility.
-
-Please note that the Cart Class ONLY provides the core "cart"
-functionality. It does not provide shipping, credit card authorization,
-or other processing components.
-
-.. contents::
- :local:
-
-.. raw:: html
-
- <div class="custom-index container"></div>
-
-********************
-Using the Cart Class
-********************
-
-Initializing the Shopping Cart Class
-====================================
-
-.. important:: The Cart class utilizes CodeIgniter's :doc:`Session
- Class <sessions>` to save the cart information to a database, so
- before using the Cart class you must set up a database table as
- indicated in the :doc:`Session Documentation <sessions>`, and set the
- session preferences in your application/config/config.php file to
- utilize a database.
-
-To initialize the Shopping Cart Class in your controller constructor,
-use the ``$this->load->library()`` method::
-
- $this->load->library('cart');
-
-Once loaded, the Cart object will be available using::
-
- $this->cart
-
-.. note:: The Cart Class will load and initialize the Session Class
- automatically, so unless you are using sessions elsewhere in your
- application, you do not need to load the Session class.
-
-Adding an Item to The Cart
-==========================
-
-To add an item to the shopping cart, simply pass an array with the
-product information to the ``$this->cart->insert()`` method, as shown
-below::
-
- $data = array(
- 'id' => 'sku_123ABC',
- 'qty' => 1,
- 'price' => 39.95,
- 'name' => 'T-Shirt',
- 'options' => array('Size' => 'L', 'Color' => 'Red')
- );
-
- $this->cart->insert($data);
-
-.. important:: The first four array indexes above (id, qty, price, and
- name) are **required**. If you omit any of them the data will not be
- saved to the cart. The fifth index (options) is optional. It is intended
- to be used in cases where your product has options associated with it.
- Use an array for options, as shown above.
-
-The five reserved indexes are:
-
-- **id** - Each product in your store must have a unique identifier.
- Typically this will be an "sku" or other such identifier.
-- **qty** - The quantity being purchased.
-- **price** - The price of the item.
-- **name** - The name of the item.
-- **options** - Any additional attributes that are needed to identify
- the product. These must be passed via an array.
-
-In addition to the five indexes above, there are two reserved words:
-rowid and subtotal. These are used internally by the Cart class, so
-please do NOT use those words as index names when inserting data into
-the cart.
-
-Your array may contain additional data. Anything you include in your
-array will be stored in the session. However, it is best to standardize
-your data among all your products in order to make displaying the
-information in a table easier.
-
-::
-
- $data = array(
- 'id' => 'sku_123ABC',
- 'qty' => 1,
- 'price' => 39.95,
- 'name' => 'T-Shirt',
- 'coupon' => 'XMAS-50OFF'
- );
-
- $this->cart->insert($data);
-
-The ``insert()`` method will return the $rowid if you successfully insert a
-single item.
-
-Adding Multiple Items to The Cart
-=================================
-
-By using a multi-dimensional array, as shown below, it is possible to
-add multiple products to the cart in one action. This is useful in cases
-where you wish to allow people to select from among several items on the
-same page.
-
-::
-
- $data = array(
- array(
- 'id' => 'sku_123ABC',
- 'qty' => 1,
- 'price' => 39.95,
- 'name' => 'T-Shirt',
- 'options' => array('Size' => 'L', 'Color' => 'Red')
- ),
- array(
- 'id' => 'sku_567ZYX',
- 'qty' => 1,
- 'price' => 9.95,
- 'name' => 'Coffee Mug'
- ),
- array(
- 'id' => 'sku_965QRS',
- 'qty' => 1,
- 'price' => 29.95,
- 'name' => 'Shot Glass'
- )
- );
-
- $this->cart->insert($data);
-
-Displaying the Cart
-===================
-
-To display the cart you will create a :doc:`view
-file </general/views>` with code similar to the one shown below.
-
-Please note that this example uses the :doc:`form
-helper </helpers/form_helper>`.
-
-::
-
- <?php echo form_open('path/to/controller/update/method'); ?>
-
- <table cellpadding="6" cellspacing="1" style="width:100%" border="0">
-
- <tr>
- <th>QTY</th>
- <th>Item Description</th>
- <th style="text-align:right">Item Price</th>
- <th style="text-align:right">Sub-Total</th>
- </tr>
-
- <?php $i = 1; ?>
-
- <?php foreach ($this->cart->contents() as $items): ?>
-
- <?php echo form_hidden($i.'[rowid]', $items['rowid']); ?>
-
- <tr>
- <td><?php echo form_input(array('name' => $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5')); ?></td>
- <td>
- <?php echo $items['name']; ?>
-
- <?php if ($this->cart->has_options($items['rowid']) == TRUE): ?>
-
- <p>
- <?php foreach ($this->cart->product_options($items['rowid']) as $option_name => $option_value): ?>
-
- <strong><?php echo $option_name; ?>:</strong> <?php echo $option_value; ?><br />
-
- <?php endforeach; ?>
- </p>
-
- <?php endif; ?>
-
- </td>
- <td style="text-align:right"><?php echo $this->cart->format_number($items['price']); ?></td>
- <td style="text-align:right">$<?php echo $this->cart->format_number($items['subtotal']); ?></td>
- </tr>
-
- <?php $i++; ?>
-
- <?php endforeach; ?>
-
- <tr>
- <td colspan="2"> </td>
- <td class="right"><strong>Total</strong></td>
- <td class="right">$<?php echo $this->cart->format_number($this->cart->total()); ?></td>
- </tr>
-
- </table>
-
- <p><?php echo form_submit('', 'Update your Cart'); ?></p>
-
-Updating The Cart
-=================
-
-To update the information in your cart, you must pass an array
-containing the Row ID and one or more pre-defined properties to the
-``$this->cart->update()`` method.
-
-.. note:: If the quantity is set to zero, the item will be removed from
- the cart.
-
-::
-
- $data = array(
- 'rowid' => 'b99ccdf16028f015540f341130b6d8ec',
- 'qty' => 3
- );
-
- $this->cart->update($data);
-
- // Or a multi-dimensional array
-
- $data = array(
- array(
- 'rowid' => 'b99ccdf16028f015540f341130b6d8ec',
- 'qty' => 3
- ),
- array(
- 'rowid' => 'xw82g9q3r495893iajdh473990rikw23',
- 'qty' => 4
- ),
- array(
- 'rowid' => 'fh4kdkkkaoe30njgoe92rkdkkobec333',
- 'qty' => 2
- )
- );
-
- $this->cart->update($data);
-
-You may also update any property you have previously defined when
-inserting the item such as options, price or other custom fields.
-
-::
-
- $data = array(
- 'rowid' => 'b99ccdf16028f015540f341130b6d8ec',
- 'qty' => 1,
- 'price' => 49.95,
- 'coupon' => NULL
- );
-
- $this->cart->update($data);
-
-What is a Row ID?
-*****************
-
-The row ID is a unique identifier that is generated by the cart code
-when an item is added to the cart. The reason a unique ID is created
-is so that identical products with different options can be managed
-by the cart.
-
-For example, let's say someone buys two identical t-shirts (same product
-ID), but in different sizes. The product ID (and other attributes) will
-be identical for both sizes because it's the same shirt. The only
-difference will be the size. The cart must therefore have a means of
-identifying this difference so that the two sizes of shirts can be
-managed independently. It does so by creating a unique "row ID" based on
-the product ID and any options associated with it.
-
-In nearly all cases, updating the cart will be something the user does
-via the "view cart" page, so as a developer, it is unlikely that you
-will ever have to concern yourself with the "row ID", other than making
-sure your "view cart" page contains this information in a hidden form
-field, and making sure it gets passed to the ``update()`` method when
-the update form is submitted. Please examine the construction of the
-"view cart" page above for more information.
-
-
-***************
-Class Reference
-***************
-
-.. php:class:: CI_Cart
-
- .. attribute:: $product_id_rules = '\.a-z0-9_-'
-
- These are the regular expression rules that we use to validate the product
- ID - alpha-numeric, dashes, underscores, or periods by default
-
- .. attribute:: $product_name_rules = '\w \-\.\:'
-
- These are the regular expression rules that we use to validate the product ID and product name - alpha-numeric, dashes, underscores, colons or periods by
- default
-
- .. attribute:: $product_name_safe = TRUE
-
- Whether or not to only allow safe product names. Default TRUE.
-
-
- .. php:method:: insert([$items = array()])
-
- :param array $items: Items to insert into the cart
- :returns: TRUE on success, FALSE on failure
- :rtype: bool
-
- Insert items into the cart and save it to the session table. Returns TRUE
- on success and FALSE on failure.
-
-
- .. php:method:: update([$items = array()])
-
- :param array $items: Items to update in the cart
- :returns: TRUE on success, FALSE on failure
- :rtype: bool
-
- This method permits changing the properties of a given item.
- Typically it is called from the "view cart" page if a user makes changes
- to the quantity before checkout. That array must contain the rowid
- for each item.
-
- .. php:method:: remove($rowid)
-
- :param int $rowid: ID of the item to remove from the cart
- :returns: TRUE on success, FALSE on failure
- :rtype: bool
-
- Allows you to remove an item from the shopping cart by passing it the
- ``$rowid``.
-
- .. php:method:: total()
-
- :returns: Total amount
- :rtype: int
-
- Displays the total amount in the cart.
-
-
- .. php:method:: total_items()
-
- :returns: Total amount of items in the cart
- :rtype: int
-
- Displays the total number of items in the cart.
-
-
- .. php:method:: contents([$newest_first = FALSE])
-
- :param bool $newest_first: Whether to order the array with newest items first
- :returns: An array of cart contents
- :rtype: array
-
- Returns an array containing everything in the cart. You can sort the
- order by which the array is returned by passing it TRUE where the contents
- will be sorted from newest to oldest, otherwise it is sorted from oldest
- to newest.
-
- .. php:method:: get_item($row_id)
-
- :param int $row_id: Row ID to retrieve
- :returns: Array of item data
- :rtype: array
-
- Returns an array containing data for the item matching the specified row
- ID, or FALSE if no such item exists.
-
- .. php:method:: has_options($row_id = '')
-
- :param int $row_id: Row ID to inspect
- :returns: TRUE if options exist, FALSE otherwise
- :rtype: bool
-
- Returns TRUE (boolean) if a particular row in the cart contains options.
- This method is designed to be used in a loop with ``contents()``, since
- you must pass the rowid to this method, as shown in the Displaying
- the Cart example above.
-
- .. php:method:: product_options([$row_id = ''])
-
- :param int $row_id: Row ID
- :returns: Array of product options
- :rtype: array
-
- Returns an array of options for a particular product. This method is
- designed to be used in a loop with ``contents()``, since you
- must pass the rowid to this method, as shown in the Displaying the
- Cart example above.
-
- .. php:method:: destroy()
-
- :rtype: void
-
- Permits you to destroy the cart. This method will likely be called
- when you are finished processing the customer's order. \ No newline at end of file
diff --git a/user_guide_src/source/libraries/config.rst b/user_guide_src/source/libraries/config.rst
index a45cacdf5..2431abf93 100644
--- a/user_guide_src/source/libraries/config.rst
+++ b/user_guide_src/source/libraries/config.rst
@@ -211,7 +211,7 @@ Class Reference
.. php:method:: load([$file = ''[, $use_sections = FALSE[, $fail_gracefully = FALSE]]])
:param string $file: Configuration file name
- :param bool $use_sections: Whether config values shoud be loaded into their own section (index of the main config array)
+ :param bool $use_sections: Whether config values should be loaded into their own section (index of the main config array)
:param bool $fail_gracefully: Whether to return FALSE or to display an error message
:returns: TRUE on success, FALSE on failure
:rtype: bool
@@ -239,14 +239,3 @@ Class Reference
This method is normally accessed via the corresponding functions in the
:doc:`URL Helper </helpers/url_helper>`.
-
- .. php:method:: system_url()
-
- :returns: URL pointing at your CI system/ directory
- :rtype: string
-
- This method retrieves the URL to your CodeIgniter system/ directory.
-
- .. note:: This method is DEPRECATED because it encourages usage of
- insecure coding practices. Your *system/* directory shouldn't
- be publicly accessible. \ No newline at end of file
diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst
index eadfcfd5c..bd416ba3b 100644
--- a/user_guide_src/source/libraries/email.rst
+++ b/user_guide_src/source/libraries/email.rst
@@ -108,7 +108,7 @@ Preference Default Value Options Descript
page. Make sure you don't have any relative links or relative image
paths otherwise they will not work.
**charset** ``$config['charset']`` Character set (utf-8, iso-8859-1, etc.).
-**validate** FALSE TRUE or FALSE (boolean) Whether to validate the email address.
+**validate** TRUE TRUE or FALSE (boolean) Whether to validate the email address.
**priority** 3 1, 2, 3, 4, 5 Email Priority. 1 = highest. 5 = lowest. 3 = normal.
**crlf** \\n "\\r\\n" or "\\n" or "\\r" Newline character. (Use "\\r\\n" to comply with RFC 822).
**newline** \\n "\\r\\n" or "\\n" or "\\r" Newline character. (Use "\\r\\n" to comply with RFC 822).
@@ -348,7 +348,7 @@ Class Reference
$this->email->attach('http://example.com/filename.pdf');
- If you'd like to use a custom file name, you can use the third paramater::
+ If you'd like to use a custom file name, you can use the third parameter::
$this->email->attach('filename.pdf', 'attachment', 'report.pdf');
@@ -374,7 +374,7 @@ Class Reference
{
$this->email->to($address);
$cid = $this->email->attachment_cid($filename);
- $this->email->message('<img src='cid:". $cid ."' alt="photo1" />');
+ $this->email->message('<img src="cid:'. $cid .'" alt="photo1" />');
$this->email->send();
}
@@ -387,7 +387,7 @@ Class Reference
:rtype: string
Returns a string containing any server messages, the email headers, and
- the email messsage. Useful for debugging.
+ the email message. Useful for debugging.
You can optionally specify which parts of the message should be printed.
Valid options are: **headers**, **subject**, **body**.
@@ -402,4 +402,4 @@ Class Reference
// Will only print the email headers, excluding the message subject and body
$this->email->print_debugger(array('headers'));
- .. note:: By default, all of the raw data will be printed. \ No newline at end of file
+ .. note:: By default, all of the raw data will be printed.
diff --git a/user_guide_src/source/libraries/encryption.rst b/user_guide_src/source/libraries/encryption.rst
index 599be4df0..b16511d4d 100644
--- a/user_guide_src/source/libraries/encryption.rst
+++ b/user_guide_src/source/libraries/encryption.rst
@@ -13,7 +13,7 @@ unfortunately not always available on all systems.
You must meet one of the following dependencies in order to use this
library:
-- `OpenSSL <http://php.net/openssl>`_ (and PHP 5.3.3)
+- `OpenSSL <http://php.net/openssl>`_
- `MCrypt <http://php.net/mcrypt>`_ (and `MCRYPT_DEV_URANDOM` availability)
If neither of the above dependencies is met, we simply cannot offer
@@ -75,7 +75,7 @@ process that allows you to be the only one who is able to decrypt data
that you've decided to hide from the eyes of the public.
After one key is used to encrypt data, that same key provides the **only**
means to decrypt it, so not only must you chose one carefully, but you
-must not lose it or you will also use the encrypted data.
+must not lose it or you will also lose access to the data.
It must be noted that to ensure maximum security, such key *should* not
only be as strong as possible, but also often changed. Such behavior
@@ -382,7 +382,7 @@ the hood:
#. Check if the string is long enough, separate the HMAC out of
it and validate if it is correct (this is done in a way that
- prevents timing attacks agains it). Return FALSE if either of
+ prevents timing attacks against it). Return FALSE if either of
the checks fails.
#. Base64-decode the string.
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index be6d1f233..6a92cc983 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -116,7 +116,7 @@ this code and save it to your application/views/ folder::
The Controller
==============
-Using a text editor, create a controller called form.php. In it, place
+Using a text editor, create a controller called Form.php. In it, place
this code and save it to your application/controllers/ folder::
<?php
@@ -175,7 +175,7 @@ The form (myform.php) is a standard web form with a couple exceptions:
This function will return any error messages sent back by the
validator. If there are no messages it returns an empty string.
-The controller (form.php) has one method: ``index()``. This method
+The controller (Form.php) has one method: ``index()``. This method
initializes the validation class and loads the form helper and URL
helper used by your view files. It also runs the validation routine.
Based on whether the validation was successful it either presents the
@@ -205,7 +205,7 @@ The above method takes **three** parameters as input:
.. note:: If you would like the field name to be stored in a language
file, please see :ref:`translating-field-names`.
-Here is an example. In your controller (form.php), add this code just
+Here is an example. In your controller (Form.php), add this code just
below the validation initialization method::
$this->form_validation->set_rules('username', 'Username', 'required');
@@ -465,7 +465,7 @@ for you to process.
To invoke a callback just put the method name in a rule, with
"callback\_" as the rule **prefix**. If you need to receive an extra
parameter in your callback method, just add it normally after the
-method name between square brackets, as in: "callback_foo**[bar]**",
+method name between square brackets, as in: ``callback_foo[bar]``,
then it will be passed as the second argument of your callback method.
.. note:: You can also process the form data that is passed to your
@@ -495,8 +495,7 @@ The above code would use the ``valid_username()`` method from your
This is just an example of course, and callbacks aren't limited to models.
You can use any object/method that accepts the field value as its' first
-parameter. Or if you're running PHP 5.3+, you can also use an anonymous
-function::
+parameter. You can also use an anonymous function::
$this->form_validation->set_rules(
'username', 'Username',
@@ -522,7 +521,7 @@ the second element of an array, with the first one being the rule name::
)
);
-Anonymous function (PHP 5.3+) version::
+Anonymous function version::
$this->form_validation->set_rules(
'username', 'Username',
@@ -547,7 +546,10 @@ All of the native error messages are located in the following language
file: **system/language/english/form_validation_lang.php**
To set your own global custom message for a rule, you can either
-edit that file, or use the following method::
+extend/override the language file by creating your own in
+**application/language/english/form_validation_lang.php** (read more
+about this in the :doc:`Language Class <language>` documentation),
+or use the following method::
$this->form_validation->set_message('rule', 'Error Message');
@@ -983,8 +985,9 @@ Rule Parameter Description
**valid_url** No Returns FALSE if the form element does not contain a valid URL.
**valid_email** No Returns FALSE if the form element does not contain a valid email address.
**valid_emails** No Returns FALSE if any value provided in a comma separated list is not a valid email.
-**valid_ip** No Returns FALSE if the supplied IP is not valid.
+**valid_ip** Yes Returns FALSE if the supplied IP address is not valid.
Accepts an optional parameter of 'ipv4' or 'ipv6' to specify an IP format.
+**valid_mac** No Returns FALSE if the supplied MAC address is not valid.
**valid_base64** No Returns FALSE if the supplied string contains anything other than valid Base64 characters.
========================= ========== ============================================================================================= =======================
@@ -1004,14 +1007,13 @@ Prepping Reference
The following is a list of all the prepping methods that are available
to use:
-==================== ========= =======================================================================================================
+==================== ========= ==============================================================================================================
Name Parameter Description
-==================== ========= =======================================================================================================
-**prep_for_form** No Converts special characters so that HTML data can be shown in a form field without breaking it.
+==================== ========= ==============================================================================================================
**prep_url** No Adds "\http://" to URLs if missing.
**strip_image_tags** No Strips the HTML from image tags leaving the raw URL.
**encode_php_tags** No Converts PHP tags to entities.
-==================== ========= =======================================================================================================
+==================== ========= ==============================================================================================================
.. note:: You can also use any native PHP functions that permits one
parameter, like ``trim()``, ``htmlspecialchars()``, ``urldecode()``,
@@ -1025,12 +1027,14 @@ Class Reference
.. php:class:: CI_Form_validation
- .. php:method:: set_rules($field[, $label = ''[, $rules = '']])
+ .. php:method:: set_rules($field[, $label = null[, $rules = null[, $errors = array()]]])
:param string $field: Field name
:param string $label: Field label
:param mixed $rules: Validation rules, as a string list separated by a pipe "|", or as an array or rules
+ :param array $errors: A list of custom error messages
:returns: CI_Form_validation instance (method chaining)
+ :throws: BadMethodCallException If $field is not an array and $rules was not used
:rtype: CI_Form_validation
Permits you to set validation rules, as described in the tutorial
@@ -1137,4 +1141,4 @@ the following functions:
- :php:func:`set_radio()`
Note that these are procedural functions, so they **do not** require you
-to prepend them with ``$this->form_validation``. \ No newline at end of file
+to prepend them with ``$this->form_validation``.
diff --git a/user_guide_src/source/libraries/ftp.rst b/user_guide_src/source/libraries/ftp.rst
index ddd4442fd..2a015256d 100644
--- a/user_guide_src/source/libraries/ftp.rst
+++ b/user_guide_src/source/libraries/ftp.rst
@@ -2,7 +2,7 @@
FTP Class
#########
-CodeIgniter's FTP Class permits files to be transfered to a remote
+CodeIgniter's FTP Class permits files to be transferred to a remote
server. Remote files can also be moved, renamed, and deleted. The FTP
class also includes a "mirroring" function that permits an entire local
directory to be recreated remotely via FTP.
diff --git a/user_guide_src/source/libraries/image_lib.rst b/user_guide_src/source/libraries/image_lib.rst
index e5f7c000f..442541bf6 100644
--- a/user_guide_src/source/libraries/image_lib.rst
+++ b/user_guide_src/source/libraries/image_lib.rst
@@ -63,7 +63,8 @@ called *mypic.jpg* located in the source_image folder, then create a
thumbnail that is 75 X 50 pixels using the GD2 image_library. Since the
maintain_ratio option is enabled, the thumb will be as close to the
target width and height as possible while preserving the original aspect
-ratio. The thumbnail will be called *mypic_thumb.jpg*
+ratio. The thumbnail will be called *mypic_thumb.jpg* and located at
+the same level as *source_image*.
.. note:: In order for the image class to be allowed to do any
processing, the folder containing the image files must have write
@@ -282,7 +283,7 @@ Preference Default Value Options Description
**wm_shadow_color** None None The color of the drop shadow, specified in hex. If you leave this blank
a drop shadow will not be used. Both the full 6-length (ie, 993300) and
the short three character abbreviated version (ie, fff) are supported.
-**wm_shadow_distance** 3 None The distance (in pixels) from the font that the drop shadow should
+**wm_shadow_distance** 2 None The distance (in pixels) from the font that the drop shadow should
appear.
======================= =================== =================== ==========================================================================
@@ -407,7 +408,7 @@ Class Reference
method is not very useful unless you intend to build such an
interface. That's exactly what we did using for the photo gallery module
in ExpressionEngine, the CMS we develop. We added a JavaScript UI that
- lets the cropping area be selected.
+ lets the cropping area be selected. (from EllisLab)
.. php:method:: rotate()
@@ -471,4 +472,4 @@ Class Reference
Returns all detected errors formatted as a string.
::
- echo $this->image_lib->diplay_errors(); \ No newline at end of file
+ echo $this->image_lib->display_errors();
diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst
index d9c6c2dd1..8a0b5f286 100644
--- a/user_guide_src/source/libraries/input.rst
+++ b/user_guide_src/source/libraries/input.rst
@@ -2,10 +2,8 @@
Input Class
###########
-The Input Class serves two purposes:
-
-#. It pre-processes global input data for security.
-#. It provides some helper methods for fetching input data and pre-processing it.
+The Input Class provides some helper methods for accessing input data
+and pre-processing it.
.. note:: This class is initialized automatically by the system so there
is no need to do it manually.
@@ -17,49 +15,9 @@ The Input Class serves two purposes:
<div class="custom-index container"></div>
-***************
-Input Filtering
-***************
-
-Security Filtering
-==================
-
-The security filtering method is called automatically when a new
-:doc:`controller <../general/controllers>` is invoked. It does the
-following:
-
-- If ``$config['allow_get_array']`` is FALSE (default is TRUE), destroys
- the global GET array.
-- Destroys all global variables in the event register_globals is
- turned on.
-- Filters the GET/POST/COOKIE array keys, permitting only alpha-numeric
- (and a few other) characters.
-- Provides XSS (Cross-site Scripting Hacks) filtering. This can be
- enabled globally, or upon request.
-- Standardizes newline characters to ``PHP_EOL`` (\\n in UNIX-based OSes,
- \\r\\n under Windows). This is configurable.
-
-XSS Filtering
-=============
-
-The Input class has the ability to filter input automatically to prevent
-cross-site scripting attacks. 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;
-
-Please refer to the :doc:`Security class <security>` documentation for
-information on using XSS Filtering in your application.
-
-.. important:: The 'global_xss_filtering' setting is DEPRECATED and kept
- solely for backwards-compatibility purposes. XSS escaping should
- be performed on *output*, not *input*!
-
-*******************
-Accessing form data
-*******************
+********************
+Accessing input data
+********************
Using POST, GET, COOKIE, or SERVER Data
=======================================
@@ -130,7 +88,7 @@ Class Reference
The property can be read multiple times.
- .. php:method:: post([$index = NULL[, $xss_clean = NULL]])
+ .. php:method:: post([$index = NULL[, $xss_clean = FALSE]])
:param mixed $index: POST parameter name
:param bool $xss_clean: Whether to apply XSS filtering
@@ -147,7 +105,6 @@ Class Reference
The second optional parameter lets you run the data through the XSS
filter. It's enabled by setting the second parameter to boolean TRUE
- or by setting your ``$config['global_xss_filtering']`` to TRUE.
::
$this->input->post('some_data', TRUE);
@@ -167,13 +124,13 @@ Class Reference
$this->input->post(array('field1', 'field2'));
- Same rule applied here, to retrive the parameters with XSS filtering enabled, set the
+ Same rule applied here, to retrieve the parameters with XSS filtering enabled, set the
second parameter to boolean TRUE.
::
$this->input->post(array('field1', 'field2'), TRUE);
- .. php:method:: get([$index = NULL[, $xss_clean = NULL]])
+ .. php:method:: get([$index = NULL[, $xss_clean = FALSE]])
:param mixed $index: GET parameter name
:param bool $xss_clean: Whether to apply XSS filtering
@@ -200,13 +157,13 @@ Class Reference
$this->input->get(array('field1', 'field2'));
- Same rule applied here, to retrive the parameters with XSS filtering enabled, set the
+ Same rule applied here, to retrieve the parameters with XSS filtering enabled, set the
second parameter to boolean TRUE.
::
$this->input->get(array('field1', 'field2'), TRUE);
- .. php:method:: post_get($index[, $xss_clean = NULL])
+ .. php:method:: post_get($index[, $xss_clean = FALSE])
:param string $index: POST/GET parameter name
:param bool $xss_clean: Whether to apply XSS filtering
@@ -219,7 +176,7 @@ Class Reference
$this->input->post_get('some_data', TRUE);
- .. php:method:: get_post($index[, $xss_clean = NULL])
+ .. php:method:: get_post($index[, $xss_clean = FALSE])
:param string $index: GET/POST parameter name
:param bool $xss_clean: Whether to apply XSS filtering
@@ -234,7 +191,7 @@ Class Reference
.. note:: This method used to act EXACTLY like ``post_get()``, but it's
behavior has changed in CodeIgniter 3.0.
- .. php:method:: cookie([$index = NULL[, $xss_clean = NULL]])
+ .. php:method:: cookie([$index = NULL[, $xss_clean = FALSE]])
:param mixed $index: COOKIE name
:param bool $xss_clean: Whether to apply XSS filtering
@@ -257,7 +214,7 @@ Class Reference
function :php:func:`get_cookie()`, this method does NOT prepend
your configured ``$config['cookie_prefix']`` value.
- .. php:method:: server($index[, $xss_clean = NULL])
+ .. php:method:: server($index[, $xss_clean = FALSE])
:param mixed $index: Value name
:param bool $xss_clean: Whether to apply XSS filtering
@@ -275,7 +232,7 @@ Class Reference
$this->input->server(array('SERVER_PROTOCOL', 'REQUEST_URI'));
- .. php:method:: input_stream([$index = NULL[, $xss_clean = NULL]])
+ .. php:method:: input_stream([$index = NULL[, $xss_clean = FALSE]])
:param mixed $index: Key name
:param bool $xss_clean: Whether to apply XSS filtering
@@ -285,7 +242,7 @@ Class Reference
This method is identical to ``get()``, ``post()`` and ``cookie()``,
only it fetches the *php://input* stream data.
- .. php:method:: set_cookie($name = ''[, $value = ''[, $expire = ''[, $domain = ''[, $path = '/'[, $prefix = ''[, $secure = FALSE[, $httponly = FALSE]]]]]]])
+ .. php:method:: set_cookie($name = ''[, $value = ''[, $expire = 0[, $domain = ''[, $path = '/'[, $prefix = ''[, $secure = FALSE[, $httponly = FALSE]]]]]]])
:param mixed $name: Cookie name or an array of parameters
:param string $value: Cookie value
@@ -310,7 +267,7 @@ Class Reference
$cookie = array(
'name' => 'The Cookie Name',
'value' => 'The Value',
- 'expire' => '86500',
+ 'expire' => 86500,
'domain' => '.some-domain.com',
'path' => '/',
'prefix' => 'myprefix_',
@@ -321,8 +278,8 @@ Class Reference
**Notes**
- Only the name and value are required. To delete a cookie set it with the
- expiration blank.
+ Only the name and value are required. To delete a cookie set the expiry
+ time to a negative, or non-numeric value.
The expiration is set in **seconds**, which will be added to the current
time. Do not include the time, but rather only the number of seconds
@@ -390,7 +347,7 @@ Class Reference
Accepts an optional second string parameter of 'ipv4' or 'ipv6' to specify
an IP format. The default checks for both formats.
- .. php:method:: user_agent([$xss_clean = NULL])
+ .. php:method:: user_agent([$xss_clean = FALSE])
:returns: User agent string or NULL if not set
:param bool $xss_clean: Whether to apply XSS filtering
@@ -440,25 +397,6 @@ Class Reference
Checks to see if the HTTP_X_REQUESTED_WITH server header has been
set, and returns boolean TRUE if it is or FALSE if not.
- .. php:method:: is_cli_request()
-
- :returns: TRUE if it is a CLI request, FALSE if not
- :rtype: bool
-
- Checks to see if the application was run from the command-line
- interface.
-
- .. note:: This method checks both the PHP SAPI name currently in use
- and if the ``STDIN`` constant is defined, which is usually a
- failsafe way to see if PHP is being run via the command line.
-
- ::
-
- $this->input->is_cli_request()
-
- .. note:: This method is DEPRECATED and is now just an alias for the
- :func:`is_cli()` function.
-
.. php:method:: method([$upper = FALSE])
:param bool $upper: Whether to return the request method name in upper or lower case
diff --git a/user_guide_src/source/libraries/javascript.rst b/user_guide_src/source/libraries/javascript.rst
deleted file mode 100644
index e91b9ad78..000000000
--- a/user_guide_src/source/libraries/javascript.rst
+++ /dev/null
@@ -1,322 +0,0 @@
-################
-Javascript Class
-################
-
-CodeIgniter provides a library to help you with certain common functions
-that you may want to use with Javascript. Please note that CodeIgniter
-does not require the jQuery library to run, and that any scripting
-library will work equally well. The jQuery library is simply presented
-as a convenience if you choose to use it.
-
-.. important:: This library is DEPRECATED and should not be used. It has always
- been with an 'experimental' status and is now no longer supported.
- Currently only kept for backwards compatibility.
-
-.. contents::
- :local:
-
-.. raw:: html
-
- <div class="custom-index container"></div>
-
-**************************
-Using the Javascript Class
-**************************
-
-Initializing the Class
-======================
-
-To initialize the Javascript class manually in your controller
-constructor, use the ``$this->load->library()`` method. Currently,
-the only available library is jQuery, which will automatically be
-loaded like this::
-
- $this->load->library('javascript');
-
-The Javascript class also accepts parameters:
-
-- js_library_driver (string) *default: 'jquery'*
-- autoload (bool) *default: TRUE*
-
-You may override the defaults by sending an associative array::
-
- $this->load->library(
- 'javascript',
- array(
- 'js_library_driver' => 'scripto',
- 'autoload' => FALSE
- )
- );
-
-Again, presently only 'jquery' is available. You may wish to set
-autoload to FALSE, though, if you do not want the jQuery library to
-automatically include a script tag for the main jQuery script file. This
-is useful if you are loading it from a location outside of CodeIgniter,
-or already have the script tag in your markup.
-
-Once loaded, the jQuery library object will be available using:
-
- $this->javascript
-
-Setup and Configuration
-=======================
-
-Set these variables in your view
---------------------------------
-
-As a Javascript library, your files must be available to your
-application.
-
-As Javascript is a client side language, the library must be able to
-write content into your final output. This generally means a view.
-You'll need to include the following variables in the ``<head>``
-sections of your output.
-
-::
-
- <?php echo $library_src;?>
- <?php echo $script_head;?>
-
-
-``$library_src``, is where the actual library file will be loaded, as
-well as any subsequent plugin script calls; $script_head is where
-specific events, functions and other commands will be rendered.
-
-Set the path to the librarys with config items
-----------------------------------------------
-
-There are some configuration items in Javascript library. These can
-either be set in *application/config.php*, within its own
-*config/javascript.php* file, or within any controller usings the
-``set_item()`` function.
-
-An image to be used as an "ajax loader", or progress indicator. Without
-one, the simple text message of "loading" will appear when Ajax calls
-need to be made.
-
-::
-
- $config['javascript_location'] = 'http://localhost/codeigniter/themes/js/jquery/';
- $config['javascript_ajax_img'] = 'images/ajax-loader.gif';
-
-If you keep your files in the same directories they were downloaded
-from, then you need not set this configuration items.
-
-The jQuery Class
-================
-
-To initialize the jQuery class manually in your controller constructor,
-use the ``$this->load->library()`` method::
-
- $this->load->library('javascript/jquery');
-
-You may send an optional parameter to determine whether or not a script
-tag for the main jQuery file will be automatically included when loading
-the library. It will be created by default. To prevent this, load the
-library as follows::
-
- $this->load->library('javascript/jquery', FALSE);
-
-Once loaded, the jQuery library object will be available using:
-
- $this->jquery
-
-jQuery Events
-=============
-
-Events are set using the following syntax.
-::
-
- $this->jquery->event('element_path', code_to_run());
-
-In the above example:
-
-- "event" is any of blur, change, click, dblclick, error, focus, hover,
- keydown, keyup, load, mousedown, mouseup, mouseover, mouseup, resize,
- scroll, or unload.
-- "element_path" is any valid `jQuery selector
- <http://api.jquery.com/category/selectors/>`_. Due to jQuery's unique
- selector syntax, this is usually an element id, or CSS selector. For
- example "#notice_area" would effect ``<div id="notice_area">``, and
- "#content a.notice" would effect all anchors with a class of "notice"
- in the div with id "content".
-- "``code_to_run()``" is script your write yourself, or an action such as
- an effect from the jQuery library below.
-
-Effects
-=======
-
-The query library supports a powerful
-`Effects <http://api.jquery.com/category/effects/>`_ repertoire. Before an effect
-can be used, it must be loaded::
-
- $this->jquery->effect([optional path] plugin name); // for example $this->jquery->effect('bounce');
-
-
-hide() / show()
----------------
-
-Each of this functions will affect the visibility of an item on your
-page. hide() will set an item invisible, show() will reveal it.
-
-::
-
- $this->jquery->hide(target, optional speed, optional extra information);
- $this->jquery->show(target, optional speed, optional extra information);
-
-
-- "target" will be any valid jQuery selector or selectors.
-- "speed" is optional, and is set to either slow, normal, fast, or
- alternatively a number of milliseconds.
-- "extra information" is optional, and could include a callback, or
- other additional information.
-
-toggle()
---------
-
-toggle() will change the visibility of an item to the opposite of its
-current state, hiding visible elements, and revealing hidden ones.
-
-::
-
- $this->jquery->toggle(target);
-
-
-- "target" will be any valid jQuery selector or selectors.
-
-animate()
----------
-
-::
-
- $this->jquery->animate(target, parameters, optional speed, optional extra information);
-
-
-- "target" will be any valid jQuery selector or selectors.
-- "parameters" in jQuery would generally include a series of CSS
- properties that you wish to change.
-- "speed" is optional, and is set to either slow, normal, fast, or
- alternatively a number of milliseconds.
-- "extra information" is optional, and could include a callback, or
- other additional information.
-
-For a full summary, see
-`http://api.jquery.com/animate/ <http://api.jquery.com/animate/>`_
-
-Here is an example of an animate() called on a div with an id of "note",
-and triggered by a click using the jQuery library's click() event.
-
-::
-
- $params = array(
- 'height' => 80,
- 'width' => '50%',
- 'marginLeft' => 125
- );
- $this->jquery->click('#trigger', $this->jquery->animate('#note', $params, 'normal'));
-
-fadeIn() / fadeOut()
---------------------
-
-::
-
- $this->jquery->fadeIn(target, optional speed, optional extra information);
- $this->jquery->fadeOut(target, optional speed, optional extra information);
-
-
-- "target" will be any valid jQuery selector or selectors.
-- "speed" is optional, and is set to either slow, normal, fast, or
- alternatively a number of milliseconds.
-- "extra information" is optional, and could include a callback, or
- other additional information.
-
-toggleClass()
--------------
-
-This function will add or remove a CSS class to its target.
-
-::
-
- $this->jquery->toggleClass(target, class)
-
-
-- "target" will be any valid jQuery selector or selectors.
-- "class" is any CSS classname. Note that this class must be defined
- and available in a CSS that is already loaded.
-
-fadeIn() / fadeOut()
---------------------
-
-These effects cause an element(s) to disappear or reappear over time.
-
-::
-
- $this->jquery->fadeIn(target, optional speed, optional extra information);
- $this->jquery->fadeOut(target, optional speed, optional extra information);
-
-
-- "target" will be any valid jQuery selector or selectors.
-- "speed" is optional, and is set to either slow, normal, fast, or
- alternatively a number of milliseconds.
-- "extra information" is optional, and could include a callback, or
- other additional information.
-
-slideUp() / slideDown() / slideToggle()
----------------------------------------
-
-These effects cause an element(s) to slide.
-
-::
-
- $this->jquery->slideUp(target, optional speed, optional extra information);
- $this->jquery->slideDown(target, optional speed, optional extra information);
- $this->jquery->slideToggle(target, optional speed, optional extra information);
-
-
-- "target" will be any valid jQuery selector or selectors.
-- "speed" is optional, and is set to either slow, normal, fast, or
- alternatively a number of milliseconds.
-- "extra information" is optional, and could include a callback, or
- other additional information.
-
-Plugins
-=======
-
-Some select jQuery plugins are made available using this library.
-
-corner()
---------
-
-Used to add distinct corners to page elements. For full details see
-`http://malsup.com/jquery/corner/ <http://malsup.com/jquery/corner/>`_
-
-::
-
- $this->jquery->corner(target, corner_style);
-
-
-- "target" will be any valid jQuery selector or selectors.
-- "corner_style" is optional, and can be set to any valid style such
- as round, sharp, bevel, bite, dog, etc. Individual corners can be set
- by following the style with a space and using "tl" (top left), "tr"
- (top right), "bl" (bottom left), or "br" (bottom right).
-
-::
-
- $this->jquery->corner("#note", "cool tl br");
-
-
-tablesorter()
--------------
-
-description to come
-
-modal()
--------
-
-description to come
-
-calendar()
-----------
-
-description to come \ No newline at end of file
diff --git a/user_guide_src/source/libraries/output.rst b/user_guide_src/source/libraries/output.rst
index 84529f766..92060f66a 100644
--- a/user_guide_src/source/libraries/output.rst
+++ b/user_guide_src/source/libraries/output.rst
@@ -199,11 +199,11 @@ Class Reference
.. php:method:: cache($time)
- :param int $time: Cache expiration time in seconds
+ :param int $time: Cache expiration time in minutes
:returns: CI_Output instance (method chaining)
:rtype: CI_Output
- Caches the current page for the specified amount of seconds.
+ Caches the current page for the specified amount of minutes.
For more information, please see the :doc:`caching documentation <../general/caching>`.
diff --git a/user_guide_src/source/libraries/pagination.rst b/user_guide_src/source/libraries/pagination.rst
index 913717c67..99b5a80a2 100644
--- a/user_guide_src/source/libraries/pagination.rst
+++ b/user_guide_src/source/libraries/pagination.rst
@@ -101,7 +101,7 @@ like::
If you have ``$config['enable_query_strings']`` set to TRUE your links
will automatically be re-written using Query Strings. This option can
-also be explictly set. Using ``$config['page_query_string']`` set to TRUE,
+also be explicitly set. Using ``$config['page_query_string']`` set to TRUE,
the pagination link will become::
http://example.com/index.php?c=test&m=page&per_page=20
diff --git a/user_guide_src/source/libraries/security.rst b/user_guide_src/source/libraries/security.rst
index 305a8e57c..f7604ef00 100644
--- a/user_guide_src/source/libraries/security.rst
+++ b/user_guide_src/source/libraries/security.rst
@@ -16,20 +16,11 @@ application, processing input data for security.
XSS Filtering
*************
-CodeIgniter comes with a Cross Site Scripting Hack prevention filter
-which can either run automatically to filter all POST and COOKIE data
-that is encountered, or you can run it on a per item basis. By default
-it does **not** run globally since it requires a bit of processing
-overhead, and since you may not need it in all cases.
-
-The XSS filter looks for commonly used techniques to trigger Javascript
-or other types of code that attempt to hijack cookies or do other
-malicious things. If anything disallowed is encountered it is rendered
-safe by converting the data to character entities.
-
-Note: This function should only be used to deal with data upon
-submission. It's not something that should be used for general runtime
-processing since it requires a fair amount of processing overhead.
+CodeIgniter comes with a Cross Site Scripting prevention filter, which
+looks for commonly used techniques to trigger JavaScript or other types
+of code that attempt to hijack cookies or do other malicious things.
+If anything disallowed is encountered it is rendered safe by converting
+the data to character entities.
To filter data through the XSS filter use the ``xss_clean()`` method::
diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst
index 2034ed2b0..b1f658d8f 100644
--- a/user_guide_src/source/libraries/sessions.rst
+++ b/user_guide_src/source/libraries/sessions.rst
@@ -471,7 +471,7 @@ Preference Default Description
.. note:: The 'cookie_httponly' setting doesn't have an effect on sessions.
Instead the HttpOnly parameter is always enabled, for security
- reasons. Additionaly, the 'cookie_prefix' setting is completely
+ reasons. Additionally, the 'cookie_prefix' setting is completely
ignored.
Session Drivers
@@ -594,31 +594,36 @@ And then of course, create the database table ...
For MySQL::
CREATE TABLE IF NOT EXISTS `ci_sessions` (
- `id` varchar(40) NOT NULL,
+ `id` varchar(128) NOT NULL,
`ip_address` varchar(45) NOT NULL,
`timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
`data` blob NOT NULL,
- PRIMARY KEY (id),
KEY `ci_sessions_timestamp` (`timestamp`)
);
For PostgreSQL::
CREATE TABLE "ci_sessions" (
- "id" varchar(40) NOT NULL,
+ "id" varchar(128) NOT NULL,
"ip_address" varchar(45) NOT NULL,
"timestamp" bigint DEFAULT 0 NOT NULL,
- "data" text DEFAULT '' NOT NULL,
- PRIMARY KEY ("id")
+ "data" text DEFAULT '' NOT NULL
);
CREATE INDEX "ci_sessions_timestamp" ON "ci_sessions" ("timestamp");
-However, if you want to turn on the *sess_match_ip* setting, you should
-also do the following, after creating the table::
+You will also need to add a PRIMARY KEY **depending on your 'sess_match_ip'
+setting**. The examples below work both on MySQL and PostgreSQL::
+
+ // When sess_match_ip = TRUE
+ ALTER TABLE ci_sessions ADD PRIMARY KEY (id, ip_address);
+
+ // When sess_match_ip = FALSE
+ ALTER TABLE ci_sessions ADD PRIMARY KEY (id);
+
+ // To drop a previously created primary key (use when changing the setting)
+ ALTER TABLE ci_sessions DROP PRIMARY KEY;
- // Works both on MySQL and PostgreSQL
- ALTER TABLE ci_sessions ADD CONSTRAINT ci_sessions_id_ip UNIQUE (id, ip_address);
.. important:: Only MySQL and PostgreSQL databases are officially
supported, due to lack of advisory locking mechanisms on other
@@ -901,7 +906,7 @@ Class Reference
Gets a list of all ``$_SESSION`` that have been marked as
"flashdata".
- .. php:method:: umark_flash($key)
+ .. php:method:: unmark_flash($key)
:param mixed $key: Key to be un-marked as flashdata, or an array of multiple keys
:rtype: void
@@ -966,7 +971,7 @@ Class Reference
Gets a list of all ``$_SESSION`` that have been marked as
"tempdata".
- .. php:method:: umark_temp($key)
+ .. php:method:: unmark_temp($key)
:param mixed $key: Key to be un-marked as tempdata, or an array of multiple keys
:rtype: void
diff --git a/user_guide_src/source/libraries/table.rst b/user_guide_src/source/libraries/table.rst
index 91ae1ae8d..06dfe59de 100644
--- a/user_guide_src/source/libraries/table.rst
+++ b/user_guide_src/source/libraries/table.rst
@@ -275,11 +275,16 @@ Class Reference
:returns: CI_Table instance (method chaining)
:rtype: CI_Table
- Lets you clear the table heading and row data. If you need to show multiple tables with different data you should to call this method
- after each table has been generated to clear the previous table information. Example::
+ Lets you clear the table heading, row data and caption. If
+ you need to show multiple tables with different data you
+ should to call this method after each table has been
+ generated to clear the previous table information.
+
+ Example ::
$this->load->library('table');
+ $this->table->set_caption('Preferences');
$this->table->set_heading('Name', 'Color', 'Size');
$this->table->add_row('Fred', 'Blue', 'Small');
$this->table->add_row('Mary', 'Red', 'Large');
@@ -289,6 +294,7 @@ Class Reference
$this->table->clear();
+ $this->table->set_caption('Shipping');
$this->table->set_heading('Name', 'Day', 'Delivery');
$this->table->add_row('Fred', 'Wednesday', 'Express');
$this->table->add_row('Mary', 'Monday', 'Air');
diff --git a/user_guide_src/source/libraries/trackback.rst b/user_guide_src/source/libraries/trackback.rst
index 4e0cb5541..dc4477e9f 100644
--- a/user_guide_src/source/libraries/trackback.rst
+++ b/user_guide_src/source/libraries/trackback.rst
@@ -239,7 +239,7 @@ Class Reference
This method simply validates the incoming TB data, returning TRUE on success and FALSE on failure.
If the data is valid it is set to the ``$this->data`` array so that it can be inserted into a database.
- .. php:method:: send_error([$message = 'Incomplete information')
+ .. php:method:: send_error([$message = 'Incomplete information'])
:param string $message: Error message
:rtype: void
@@ -262,7 +262,7 @@ Class Reference
:returns: Data value or empty string if not found
:rtype: string
- Returns a single item from the reponse data array.
+ Returns a single item from the response data array.
.. php:method:: process($url, $data)
diff --git a/user_guide_src/source/libraries/xmlrpc.rst b/user_guide_src/source/libraries/xmlrpc.rst
index 4d7ed66d5..2fe07c49d 100644
--- a/user_guide_src/source/libraries/xmlrpc.rst
+++ b/user_guide_src/source/libraries/xmlrpc.rst
@@ -490,6 +490,10 @@ Class Reference
$this->xmlrpc->timeout(6);
+ This timeout period will be used both for an initial connection to
+ the remote server, as well as for getting a response from it.
+ Make sure you set the timeout before calling ``send_request()``.
+
.. php:method:: method($function)
:param string $function: Method name
@@ -575,4 +579,4 @@ Class Reference
'struct'
);
- return $this->xmlrpc->send_response($response); \ No newline at end of file
+ return $this->xmlrpc->send_response($response);
diff --git a/user_guide_src/source/libraries/zip.rst b/user_guide_src/source/libraries/zip.rst
index 816f49ca1..9704d5b1d 100644
--- a/user_guide_src/source/libraries/zip.rst
+++ b/user_guide_src/source/libraries/zip.rst
@@ -24,7 +24,7 @@ your controller using the $this->load->library function::
$this->load->library('zip');
-Once loaded, the Zip library object will be available using:
+Once loaded, the Zip library object will be available using::
$this->zip