diff options
author | Greg Aker <greg@gregaker.net> | 2011-12-25 08:44:33 +0100 |
---|---|---|
committer | Greg Aker <greg@gregaker.net> | 2011-12-25 08:44:33 +0100 |
commit | ef38f0a6d83025fbd99ace5ec60311acfe9121c4 (patch) | |
tree | 1728bc5df9412d8eccc2919bf3cd3f6bbe6a52d0 /user_guide_src | |
parent | d90e1a0fb541ee94459a20cf8b0726aebaec9692 (diff) | |
parent | a96ade374f28cdae97036fc253fd8b2a0e8dc81a (diff) |
Merge branch 'develop' into feature/unit-tests
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/changelog.rst | 24 | ||||
-rw-r--r-- | user_guide_src/source/database/configuration.rst | 42 | ||||
-rw-r--r-- | user_guide_src/source/general/urls.rst | 9 | ||||
-rw-r--r-- | user_guide_src/source/helpers/inflector_helper.rst | 6 | ||||
-rw-r--r-- | user_guide_src/source/helpers/text_helper.rst | 5 | ||||
-rw-r--r-- | user_guide_src/source/libraries/cart.rst | 12 | ||||
-rw-r--r-- | user_guide_src/source/libraries/migration.rst | 5 | ||||
-rw-r--r-- | user_guide_src/source/tutorial/create_news_items.rst | 2 |
8 files changed, 97 insertions, 8 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 979755c06..54237e3c7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,17 +27,21 @@ 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. - 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(), 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 @@ -45,6 +49,11 @@ Release Date: Not Released - 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. - Core @@ -59,7 +68,18 @@ Bug fixes for 3.0 - 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. -- Bug #419 - auto_link() now recognizes URLs that come after a word boundary. +- 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 ============= @@ -97,6 +117,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 @@ -157,6 +178,7 @@ Bug fixes for 2.1.0 - Fixed a bug (#537) - Support for all wav type in browser. - Fixed a bug (#576) - Using ini_get() function to detect if apc is enabled or not. - Fixed invalid date time format in :doc:`Date helper <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/configuration.rst b/user_guide_src/source/database/configuration.rst index 687f0d920..433c67152 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, 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/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..fbf777884 100644 --- a/user_guide_src/source/libraries/cart.rst +++ b/user_guide_src/source/libraries/cart.rst @@ -256,6 +256,11 @@ $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(); ********************* @@ -266,10 +271,13 @@ $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); ********************************* 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. |