summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/changelog.rst34
-rw-r--r--user_guide_src/source/database/active_record.rst15
-rw-r--r--user_guide_src/source/database/configuration.rst43
-rw-r--r--user_guide_src/source/general/urls.rst9
-rw-r--r--user_guide_src/source/helpers/inflector_helper.rst6
-rw-r--r--user_guide_src/source/helpers/string_helper.rst2
-rw-r--r--user_guide_src/source/helpers/text_helper.rst5
-rw-r--r--user_guide_src/source/libraries/cart.rst20
-rw-r--r--user_guide_src/source/libraries/email.rst6
-rw-r--r--user_guide_src/source/libraries/encryption.rst15
-rw-r--r--user_guide_src/source/libraries/image_lib.rst2
-rw-r--r--user_guide_src/source/libraries/migration.rst5
-rw-r--r--user_guide_src/source/tutorial/create_news_items.rst2
13 files changed, 122 insertions, 42 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 49468e015..be83f09e4 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -27,23 +27,35 @@ Release Date: Not Released
- Added support pgp and gpg to mimes.php.
- Added support 3gp, 3g2, mp4, wmv, f4v, vlc Video files to mimes.php.
- Added support m4a, aac, m4u, xspf, au, ac3, flac, ogg Audio files to mimes.php.
+ - Changed logger to only chmod when file is first created.
+ - Removed previously deprecated SHA1 Library.
- Helpers
- url_title() will now trim extra dashes from beginning and end.
- Added XHTML Basic 1.1 doctype to :doc:`HTML Helper <helpers/html_helper>`.
+ - Changed humanize to include a second param for the separator.
- Database
- - Added new :doc:`Active Record <database/active_record>` methods that return
- the SQL string of queries without executing them: get_compiled_select(),
+ - Added new :doc:`Active Record <database/active_record>` methods that return
+ the SQL string of queries without executing them: get_compiled_select(),
get_compiled_insert(), get_compiled_update(), get_compiled_delete().
+ - Taking care of LIKE condition when used with MySQL UPDATE statement.
+ - Adding $escape parameter to the order_by function, this enables ordering by custom fields.
- Libraries
- Added max_filename_increment config setting for Upload library.
- CI_Loader::_ci_autoloader() is now a protected method.
- Modified valid_ip() to use PHP's filter_var() when possible (>= PHP 5.2) in the :doc:`Form Validation library <libraries/form_validation>`.
+ - Added custom filename to Email::attach() as $this->email->attach($filename, $disposition, $newname)
+ - Cart library changes include:
+ - It now auto-increments quantity's instead of just resetting it, this is the default behaviour of large e-commerce sites.
+ - Product Name strictness can be disabled via the Cart Library by switching "$product_name_safe"
+ - Added function remove() to remove a cart item, updating with quantity of 0 seemed like a hack but has remained to retain compatability
+ - Minor speed optimizations and method & property visibility declarations in the Calendar Library.
+ - Removed SHA1 function in the :doc:`Encryption Library <libraries/encryption>`.
- Core
@@ -58,7 +70,19 @@ Bug fixes for 3.0
- Unlink raised an error if cache file did not exist when you try to delete it.
- Fixed a bug (#181) where a mis-spelling was in the form validation
language file.
-
+- Fixed a bug (#159, #163) that mishandled Active Record nested transactions because _trans_depth was not getting incremented.
+- Fixed a bug (#737, #75) where pagination anchor class was not set properly when using initialize method.
+- Fixed a bug (#419) - auto_link() now recognizes URLs that come after a word boundary.
+- Fixed a bug (#724) - is_unique in form validation now checks that you are connected to a database.
+- Fixed a bug (#647) - _get_mod_time() in Zip library no longer generates stat failed errors
+- Fixed a bug (#608) - Fixes an issue with the Image_lib class not clearing properties completely
+- Fixed bugs (#157 and #174) - the Image_lib clear() function now resets all variables to their default values.
+- Fixed a bug where using $this->dbforge->create_table() with PostgreSQL database could lead to fetching whole table.
+- Fixed a bug (#795) - Fixed form method and accept-charset when passing an empty array.
+- Fixed a bug (#797) - timespan was using incorrect seconds for year and month.
+- Fixed a bug in CI_Cart::contents() where if called without a TRUE (or equal) parameter, it would fail due to a typo.
+- Fixed a bug (#696) - make oci_execute calls inside num_rows non-committing, since they are only there to reset which row is next in line for oci_fetch calls and thus don't need to be committed.
+- Fixed a bug (#406) - sqlsrv DB driver not reuturning resource on <samp>db_pconnect()</samp>.
Version 2.1.0
=============
@@ -96,6 +120,7 @@ Release Date: Not Released
$this->db->like() in the :doc:`Database
Driver <database/active_record>`.
- Added $this->db->insert_batch() support to the OCI8 (Oracle) driver.
+ - Added failover if the main connections in the config should fail
- Libraries
@@ -155,7 +180,8 @@ Bug fixes for 2.1.0
- Fixed a bug (#60) - Added _file_mime_type() method to the :doc:`File Uploading Library <libraries/file_uploading>` in order to fix a possible MIME-type injection.
- Fixed a bug (#537) - Support for all wav type in browser.
- Fixed a bug (#576) - Using ini_get() function to detect if apc is enabled or not.
-<li>Fixed invalid date time format in <a href="helpers/date_helper.html">Date helper</a> and <a href="libraries/xmlrpc.html">XMLRPC library</a>.</li>
+- Fixed invalid date time format in :doc:`Date helper <helpers/date_helper>` and :doc:`XMLRPC library <libraries/xmlrpc>`.
+- Fixed a bug (#200) - MySQL queries would be malformed after calling count_all() then db->get().
Version 2.0.3
=============
diff --git a/user_guide_src/source/database/active_record.rst b/user_guide_src/source/database/active_record.rst
index 228d1d509..1600f0bd9 100644
--- a/user_guide_src/source/database/active_record.rst
+++ b/user_guide_src/source/database/active_record.rst
@@ -82,7 +82,7 @@ The key thing to notice in the above example is that the second query did not
utilize `$this->db->from()`_ and did not pass a table name into the first
parameter. The reason for this outcome is because the query has not been
executed using `$this->db->get()`_ which resets values or reset directly
-using `$this-db->reset_query()`_.
+using `$this->db->reset_query()`_.
$this->db->get_where()
@@ -96,8 +96,7 @@ function::
Please read the about the where function below for more information.
-.. note:: get_where() was formerly known as getwhere(), which has been
-removed
+.. note:: get_where() was formerly known as getwhere(), which has been removed
$this->db->select()
===================
@@ -789,7 +788,7 @@ $this->db->get_compiled_update()
This works exactly the same way as ``$this->db->get_compiled_insert()`` except
that it produces an UPDATE SQL string instead of an INSERT SQL string.
-For more information view documentation for `$this->get_compiled_insert()`_.
+For more information view documentation for `$this->db->get_compiled_insert()`_.
*************
@@ -864,7 +863,7 @@ $this->db->get_compiled_delete()
This works exactly the same way as ``$this->db->get_compiled_insert()`` except
that it produces a DELETE SQL string instead of an INSERT SQL string.
-For more information view documentation for `$this->get_compiled_insert()`_.
+For more information view documentation for `$this->db->get_compiled_insert()`_.
***************
Method Chaining
@@ -933,10 +932,8 @@ Here's a usage example::
where, like, group_by, having, order_by, set
-
-*******************
-Reset Active Record
-*******************
+$this->db->reset_query()
+========================
Resetting Active Record allows you to start fresh with your query without
executing it first using a method like $this->db->get() or $this->db->insert().
diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst
index 687f0d920..4f88c25ab 100644
--- a/user_guide_src/source/database/configuration.rst
+++ b/user_guide_src/source/database/configuration.rst
@@ -28,6 +28,48 @@ prototype::
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
+You can also specify failovers for the situation when the main connection cannot connect for some reason.
+These failovers can be specified by setting the failover for a connection like this::
+
+ $db['default']['failover'] = array(
+ array(
+ 'hostname' => 'localhost1',
+ 'username' => '',
+ 'password' => '',
+ 'database' => '',
+ 'dbdriver' => 'mysql',
+ 'dbprefix' => '',
+ 'pconnect' => TRUE,
+ 'db_debug' => TRUE,
+ 'cache_on' => FALSE,
+ 'cachedir' => '',
+ 'char_set' => 'utf8',
+ 'dbcollat' => 'utf8_general_ci',
+ 'swap_pre' => '',
+ 'autoinit' => TRUE,
+ 'stricton' => FALSE
+ ),
+ array(
+ 'hostname' => 'localhost2',
+ 'username' => '',
+ 'password' => '',
+ 'database' => '',
+ 'dbdriver' => 'mysql',
+ 'dbprefix' => '',
+ 'pconnect' => TRUE,
+ 'db_debug' => TRUE,
+ 'cache_on' => FALSE,
+ 'cachedir' => '',
+ 'char_set' => 'utf8',
+ 'dbcollat' => 'utf8_general_ci',
+ 'swap_pre' => '',
+ 'autoinit' => TRUE,
+ 'stricton' => FALSE
+ )
+ );
+
+You can specify as many failovers as you like.
+
The reason we use a multi-dimensional array rather than a more simple
one is to permit you to optionally store multiple sets of connection
values. If, for example, you run multiple environments (development,
@@ -116,6 +158,7 @@ Explanation of Values:
while developing an application.
**port** The database port number. To use this value you have to add a line to the database config array.
::
+
$db['default']['port'] = 5432;
====================== ==================================================================================================
diff --git a/user_guide_src/source/general/urls.rst b/user_guide_src/source/general/urls.rst
index 211537675..3126fcf36 100644
--- a/user_guide_src/source/general/urls.rst
+++ b/user_guide_src/source/general/urls.rst
@@ -45,12 +45,13 @@ method in which everything is redirected except the specified items:
::
- RewriteEngine on
- RewriteCond $1 !^(index\.php|images|robots\.txt)
+ RewriteEngine On
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
-In the above example, any HTTP request other than those for index.php,
-images, and robots.txt is treated as a request for your index.php file.
+In the above example, any HTTP request other than those for existing
+directories and existing files is treated as a request for your index.php file.
Adding a URL Suffix
===================
diff --git a/user_guide_src/source/helpers/inflector_helper.rst b/user_guide_src/source/helpers/inflector_helper.rst
index cf246b9de..cc46a1851 100644
--- a/user_guide_src/source/helpers/inflector_helper.rst
+++ b/user_guide_src/source/helpers/inflector_helper.rst
@@ -77,3 +77,9 @@ them. Each word is capitalized. Example
$word = "my_dog_spot";
echo humanize($word); // Returns "My Dog Spot"
+To use dashes instead of underscores
+
+::
+
+ $word = "my-dog-spot";
+ echo humanize($word, '-'); // Returns "My Dog Spot" \ No newline at end of file
diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst
index b8a69e036..dc70e461a 100644
--- a/user_guide_src/source/helpers/string_helper.rst
+++ b/user_guide_src/source/helpers/string_helper.rst
@@ -58,7 +58,7 @@ Usage example
echo increment_string('file', '_'); // "file_1"
echo increment_string('file', '-', 2); // "file-2"
- echo increment_string('file-4'); // "file-5"
+ echo increment_string('file_4'); // "file_5"
alternator()
============
diff --git a/user_guide_src/source/helpers/text_helper.rst b/user_guide_src/source/helpers/text_helper.rst
index e97643275..8cb2d6f96 100644
--- a/user_guide_src/source/helpers/text_helper.rst
+++ b/user_guide_src/source/helpers/text_helper.rst
@@ -46,6 +46,9 @@ more or less then what you specify. Example
The third parameter is an optional suffix added to the string, if
undeclared this helper uses an ellipsis.
+**Note:** If you need to truncate to an exact number of characters please see
+the :ref:`ellipsize` function below.
+
ascii_to_entities()
===================
@@ -136,6 +139,8 @@ complete words. Example
// Would produce: Here is a simple string of text that will help us demonstrate this function
+.. _ellipsize:
+
ellipsize()
===========
diff --git a/user_guide_src/source/libraries/cart.rst b/user_guide_src/source/libraries/cart.rst
index 850d7e9a8..6594b3b9a 100644
--- a/user_guide_src/source/libraries/cart.rst
+++ b/user_guide_src/source/libraries/cart.rst
@@ -256,23 +256,31 @@ $this->cart->update();
Permits you to update items in the shopping cart, as outlined above.
+$this->cart->remove(rowid);
+***************************
+
+Allows you to remove an item from the shopping cart by passing it the rowid.
+
$this->cart->total();
*********************
Displays the total amount in the cart.
$this->cart->total_items();
-****************************
+***************************
Displays the total number of items in the cart.
-$this->cart->contents();
-************************
+$this->cart->contents(boolean);
+*******************************
-Returns an array containing everything in the cart.
+Returns an array containing everything in the cart. You can sort the order,
+by which this is returned by passing it "true" where the contents will be sorted
+from newest to oldest, by leaving this function blank, you'll automatically just get
+first added to the basket to last added to the basket.
$this->cart->has_options(rowid);
-*********************************
+********************************
Returns TRUE (boolean) if a particular row in the cart contains options.
This function is designed to be used in a loop with
@@ -280,7 +288,7 @@ $this->cart->contents(), since you must pass the rowid to this function,
as shown in the Displaying the Cart example above.
$this->cart->product_options(rowid);
-*************************************
+************************************
Returns an array of options for a particular product. This function is
designed to be used in a loop with $this->cart->contents(), since you
diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst
index 759899242..27b704dae 100644
--- a/user_guide_src/source/libraries/email.rst
+++ b/user_guide_src/source/libraries/email.rst
@@ -228,7 +228,11 @@ use the function multiple times. For example::
$this->email->attach('/path/to/photo2.jpg');
$this->email->attach('/path/to/photo3.jpg');
- $this->email->send();
+If you'd like to change the disposition or add a custom file name, you can use the second and third paramaters. To use the default disposition (attachment), leave the second parameter blank. Here's an example::
+
+ $this->email->attach('/path/to/photo1.jpg', 'inline');
+ $this->email->attach('/path/to/photo1.jpg', '', 'birthday.jpg');
+
$this->email->print_debugger()
-------------------------------
diff --git a/user_guide_src/source/libraries/encryption.rst b/user_guide_src/source/libraries/encryption.rst
index 80b45e4d7..28bdca203 100644
--- a/user_guide_src/source/libraries/encryption.rst
+++ b/user_guide_src/source/libraries/encryption.rst
@@ -126,21 +126,6 @@ Example::
Please visit php.net for a list of `available
modes <http://php.net/mcrypt>`_.
-$this->encrypt->sha1();
-=======================
-
-SHA1 encoding function. Provide a string and it will return a 160 bit
-one way hash. Note: SHA1, just like MD5 is non-decodable. Example::
-
- $hash = $this->encrypt->sha1('Some string');
-
-Many PHP installations have SHA1 support by default so if all you need
-is to encode a hash it's simpler to use the native function::
-
- $hash = sha1('Some string');
-
-If your server does not support SHA1 you can use the provided function.
-
$this->encrypt->encode_from_legacy($orig_data, $legacy_mode = MCRYPT_MODE_ECB, $key = '');
==========================================================================================
diff --git a/user_guide_src/source/libraries/image_lib.rst b/user_guide_src/source/libraries/image_lib.rst
index 300cbef31..14bd128a6 100644
--- a/user_guide_src/source/libraries/image_lib.rst
+++ b/user_guide_src/source/libraries/image_lib.rst
@@ -360,7 +360,7 @@ Preference Default Value Options Description
image headers.
**quality** 90% 1 - 100% Sets the quality of the image. The higher the quality the larger the
file size.
-**padding** None A number The amount of padding, set in pixels, that will be applied to the
+**wm_padding** None A number The amount of padding, set in pixels, that will be applied to the
watermark to set it away from the edge of your images.
**wm_vrt_alignment** bottom top, middle, bottom Sets the vertical alignment for the watermark image.
**wm_hor_alignment** center left, center, right Sets the horizontal alignment for the watermark image.
diff --git a/user_guide_src/source/libraries/migration.rst b/user_guide_src/source/libraries/migration.rst
new file mode 100644
index 000000000..5192f1f29
--- /dev/null
+++ b/user_guide_src/source/libraries/migration.rst
@@ -0,0 +1,5 @@
+################
+Migrations Class
+################
+
+Coming soon. \ No newline at end of file
diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst
index 003b94bd8..794b67eed 100644
--- a/user_guide_src/source/tutorial/create_news_items.rst
+++ b/user_guide_src/source/tutorial/create_news_items.rst
@@ -2,7 +2,7 @@
Create news items
#################
-You now know how you can read data from a database using CodeIgnite, but
+You now know how you can read data from a database using CodeIgniter, but
you haven't written any information to the database yet. In this section
you'll expand your news controller and model created earlier to include
this functionality.