From 2a97c7db940e94a115dea863708f587e58d26be4 Mon Sep 17 00:00:00 2001 From: John Wright Date: Mon, 16 Jan 2012 15:09:19 -0800 Subject: It appears the Security class has been added to the system/core folder and is loaded automatically as well. Using $this->load->library('security'); in controllers currently returns FALSE, yet you might not notice because the Security class is already loaded. I discovered this because of a custom Loader class I was using returned an error when loading the Security class. --- user_guide_src/source/general/core_classes.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/general/core_classes.rst b/user_guide_src/source/general/core_classes.rst index ac41407f7..4aa6693f7 100644 --- a/user_guide_src/source/general/core_classes.rst +++ b/user_guide_src/source/general/core_classes.rst @@ -31,6 +31,7 @@ time CodeIgniter runs: - Log - Output - Router +- Security - URI - Utf8 -- cgit v1.2.3-24-g4f1b From 7bf0a4ff35efc758ef43b3a848e655285946b8b6 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Tue, 27 Mar 2012 18:36:15 +0200 Subject: Added doccumentation for the new date helper. --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/helpers/date_helper.rst | 22 ++++++++++++++-------- user_guide_src/source/installation/upgrade_300.rst | 6 ++++++ 3 files changed, 21 insertions(+), 8 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b4bf0cfaa..e5b6eea47 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -40,6 +40,7 @@ Release Date: Not Released - Helpers + - Date helper will now return now() based on the timezone you specify. - url_title() will now trim extra dashes from beginning and end. - Added XHTML Basic 1.1 doctype to :doc:`HTML Helper `. - Changed humanize to include a second param for the separator. diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index b21d147bd..b8c3dd076 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -20,14 +20,20 @@ The following functions are available: now() ===== -Returns the current time as a Unix timestamp, referenced either to your -server's local time or GMT, based on the "time reference" setting in -your config file. If you do not intend to set your master time reference -to GMT (which you'll typically do if you run a site that lets each user -set their own timezone settings) there is no benefit to using this -function over PHP's time() function. - -.. php:method:: now() +Returns the current time as a Unix timestamp, based on the "timezone" parameter. +All PHP available timezones are supported. + +.. php:method:: now($timezone = NULL) + + :param string $timezone: The timezone you want to be returned + :returns: integer + +:: + + $tz = "Australia/Victoria"; + echo now($tz); + +If a timezone is not provided, it will return time() based on "timezone" setting. mdate() ======= diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 4c594ab17..b6f52080a 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -31,3 +31,9 @@ Step 3: Remove $autoload['core'] from your config/autoload.php Use of the `$autoload['core']` config array has been deprecated as of CodeIgniter 1.4.1 and is now removed. Move any entries that you might have listed there to `$autoload['libraries']` instead. + +Step 4: Change your use of the Date heper's now() function +========================================================== + +Function now() has been modified. You can see the changes in :doc:`Date Helper <../helpers/date_helper>` +You must replace $config['time_reference'] with $config['timezone']. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 0ed4f63f4268b0c98f549ffd711702fd45a761d0 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Tue, 27 Mar 2012 22:07:44 +0200 Subject: Fixed a typo and added the route for the config file. --- user_guide_src/source/installation/upgrade_300.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index b6f52080a..5d6450ee6 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -32,8 +32,8 @@ Step 3: Remove $autoload['core'] from your config/autoload.php Use of the `$autoload['core']` config array has been deprecated as of CodeIgniter 1.4.1 and is now removed. Move any entries that you might have listed there to `$autoload['libraries']` instead. -Step 4: Change your use of the Date heper's now() function +Step 4: Change your use of the Date helper's now() function ========================================================== Function now() has been modified. You can see the changes in :doc:`Date Helper <../helpers/date_helper>` -You must replace $config['time_reference'] with $config['timezone']. \ No newline at end of file +You must replace $config['time_reference'] with $config['timezone'] in your config.php file. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 2ed226bd5ed19754c2fb28d4b98ac5423741f039 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 16 May 2012 08:37:32 -0400 Subject: Add note in the upgrade guide to move errors folder --- user_guide_src/source/installation/upgrade_300.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index e434e8d45..63c4227dc 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -40,4 +40,9 @@ need to rename the `$active_record` variable to `$query_builder`. $active_group = 'default'; // $active_record = TRUE; - $query_builder = TRUE; \ No newline at end of file + $query_builder = TRUE; + +Step 5: Move your errors folder +=============================== + +In version 3.0.0, the errors folder has been moved from "application/errors" to "application/views/errors". \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 16642c71403f4463dfe6e83c13a0e3120474cd1d Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Thu, 17 May 2012 08:20:16 -0400 Subject: Update inflector docblocks, add changelog entry --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d33a6a635..0066af9ad 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -52,6 +52,7 @@ Release Date: Not Released - set_realpath() can now also handle file paths as opposed to just directories. - do_hash() now uses PHP's native hash() function, supporting more algorithms. - Added an optional paramater to ``delete_files()`` to enable it to skip deleting files such as .htaccess and index.html. + - Removed deprecated helper function ``js_insert_smiley`` from smiley helper. - Database -- cgit v1.2.3-24-g4f1b From 98fde46fb938694feb1f36e590c4cfa5c97c3261 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Thu, 17 May 2012 08:33:05 -0400 Subject: Add parens to changelog entry --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0066af9ad..7fc5ee5a0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -52,7 +52,7 @@ Release Date: Not Released - set_realpath() can now also handle file paths as opposed to just directories. - do_hash() now uses PHP's native hash() function, supporting more algorithms. - Added an optional paramater to ``delete_files()`` to enable it to skip deleting files such as .htaccess and index.html. - - Removed deprecated helper function ``js_insert_smiley`` from smiley helper. + - Removed deprecated helper function ``js_insert_smiley()`` from smiley helper. - Database -- cgit v1.2.3-24-g4f1b From 97aefa5cd41475d5b404ced56052008beebf8f40 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Thu, 17 May 2012 08:55:55 -0400 Subject: Added changelog entry --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7fc5ee5a0..933743c38 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -38,6 +38,7 @@ Release Date: Not Released Only entries in ``$autoload['libraries']`` are auto-loaded now. - Added some more doctypes. - Updated all classes to be written in PHP 5 style, with visibility declarations and no ``var`` usage for properties. + - Moved error templates to "application/views/errors" - Helpers -- cgit v1.2.3-24-g4f1b From d981e2915cbd37f866e6f74c3a86a41e8a43e02e Mon Sep 17 00:00:00 2001 From: Juan Ignacio Borda Date: Fri, 18 May 2012 18:29:24 -0300 Subject: Added doc notes for unbuffered_row() function --- user_guide_src/source/database/results.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/database/results.rst b/user_guide_src/source/database/results.rst index 865345762..6a0dbf92a 100644 --- a/user_guide_src/source/database/results.rst +++ b/user_guide_src/source/database/results.rst @@ -136,6 +136,26 @@ parameter: | **$row = $query->next_row('array')** | **$row = $query->previous_row('array')** +.. note:: all the functions above will load the whole result into memory (prefetching) use unbuffered_row() for processing large result sets. + +unbuffered_row($type) +===== + +This function returns a single result row without prefetching the whole result in memory as row() does. +If your query has more than one row, it returns the current row and moves the internal data pointer ahead. +The result is returned as $type could be 'object' (default) or 'array' that will return an associative array. + + + + $query = $this->db->query("YOUR QUERY"); + + while ($row=$query->unbuffered_rows()) + { + echo $row->title; + echo $row->name; + echo $row->body; + } + *********************** Result Helper Functions *********************** -- cgit v1.2.3-24-g4f1b From 67a08ed578350d3a25c77855dc3467320be9e6f6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 19 May 2012 13:35:40 +0300 Subject: Add missing changelog entries from 2.1-stable --- user_guide_src/source/changelog.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7fc5ee5a0..6192fecfd 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -241,7 +241,9 @@ Bug fixes for 2.1.1 - Fixed a bug - form_open() compared $action against site_url() instead of base_url(). - Fixed a bug - CI_Upload::_file_mime_type() could've failed if mime_content_type() is used for the detection and returns FALSE. - Fixed a bug (#538) - Windows paths were ignored when using the :doc:`Image Manipulation Library ` to create a new file. -- Fixed a bug - When database caching was enabled, $this->db->query() checked the cache before binding variables which resulted in cached queries never being found +- Fixed a bug - When database caching was enabled, $this->db->query() checked the cache before binding variables which resulted in cached queries never being found. +- Fixed a bug - CSRF cookie value was allowed to be any (non-empty) string before being written to the output, making code injection a risk. +- Fixed a bug (#726) - PDO put a 'dbname' argument in it's connection string regardless of the database platform in use, which made it impossible to use SQLite. Version 2.1.0 ============= -- cgit v1.2.3-24-g4f1b From 49cbec5870612c30b6e5bd0582616d519d1ea515 Mon Sep 17 00:00:00 2001 From: Juan Ignacio Borda Date: Sat, 19 May 2012 09:34:53 -0300 Subject: Fixed some spaces --- user_guide_src/source/database/results.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/database/results.rst b/user_guide_src/source/database/results.rst index 6a0dbf92a..2158c6df6 100644 --- a/user_guide_src/source/database/results.rst +++ b/user_guide_src/source/database/results.rst @@ -149,7 +149,7 @@ The result is returned as $type could be 'object' (default) or 'array' that will $query = $this->db->query("YOUR QUERY"); - while ($row=$query->unbuffered_rows()) + while ($row = $query->unbuffered_rows()) { echo $row->title; echo $row->name; -- cgit v1.2.3-24-g4f1b From da7c9e033bd33ba27b549dface68e17177115963 Mon Sep 17 00:00:00 2001 From: Juan Ignacio Borda Date: Sat, 19 May 2012 09:42:40 -0300 Subject: Fixed typo --- user_guide_src/source/database/results.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/database/results.rst b/user_guide_src/source/database/results.rst index 2158c6df6..ac4fc3733 100644 --- a/user_guide_src/source/database/results.rst +++ b/user_guide_src/source/database/results.rst @@ -149,7 +149,7 @@ The result is returned as $type could be 'object' (default) or 'array' that will $query = $this->db->query("YOUR QUERY"); - while ($row = $query->unbuffered_rows()) + while ($row = $query->unbuffered_row()) { echo $row->title; echo $row->name; -- cgit v1.2.3-24-g4f1b From 441dfc3a17f48c741a930cfc8a6d667bf0c352ba Mon Sep 17 00:00:00 2001 From: Juan Ignacio Borda Date: Sun, 20 May 2012 21:46:32 -0300 Subject: added a comment for unbuffered_row --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7fc5ee5a0..defac54a2 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -102,6 +102,7 @@ Release Date: Not Released - Added PDO support for create_database(), drop_database and drop_table() in :doc:`Database Forge `. - Added MSSQL, SQLSRV support for optimize_table() in :doc:`Database Utility `. - Improved CUBRID support for list_databases() in :doc:`Database Utility ` (until now only the currently used database was returned). + - Added unbuffered_row() function for getting a row without prefetching whole result (consume less memory) - Libraries -- cgit v1.2.3-24-g4f1b From 4337771961de19f7cffb444aa2bd2866e9dad18a Mon Sep 17 00:00:00 2001 From: Brent Ashley Date: Tue, 22 May 2012 12:45:10 -0300 Subject: Add step to move existing core extensions to new folder --- user_guide_src/source/installation/upgrade_200.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/upgrade_200.rst b/user_guide_src/source/installation/upgrade_200.rst index b39f4fd23..74b7443d8 100644 --- a/user_guide_src/source/installation/upgrade_200.rst +++ b/user_guide_src/source/installation/upgrade_200.rst @@ -87,7 +87,14 @@ All native CodeIgniter classes now use the PHP 5 \__construct() convention. Please update extended libraries to call parent::\__construct(). -Step 8: Update your user guide +Step 8: Move any core extensions to application/core +==================================================== + +Any extensions to core classes (e.g. MY_Controller.php) in your +application/liblraries folder must be moved to the new +application/core folder. + +Step 9: Update your user guide ============================== Please replace your local copy of the user guide with the new version, -- cgit v1.2.3-24-g4f1b From 0b427951859e393b5c6b31699fe0f1c1ae89b403 Mon Sep 17 00:00:00 2001 From: Brent Ashley Date: Tue, 22 May 2012 16:24:04 -0300 Subject: fix typo in step 8 --- user_guide_src/source/installation/upgrade_200.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/upgrade_200.rst b/user_guide_src/source/installation/upgrade_200.rst index 74b7443d8..29f44bd9e 100644 --- a/user_guide_src/source/installation/upgrade_200.rst +++ b/user_guide_src/source/installation/upgrade_200.rst @@ -91,7 +91,7 @@ Step 8: Move any core extensions to application/core ==================================================== Any extensions to core classes (e.g. MY_Controller.php) in your -application/liblraries folder must be moved to the new +application/libraries folder must be moved to the new application/core folder. Step 9: Update your user guide -- cgit v1.2.3-24-g4f1b From 79922c0d963de9728315db02deaf4d2516c94d5b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 23 May 2012 12:27:17 +0300 Subject: Removed the parameter use in database drivers' _close() and added a default _close() method in CI_DB_driver + some changelog fixes --- user_guide_src/source/changelog.rst | 53 ++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 30 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 45e6ebc07..a65a658ed 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -9,8 +9,7 @@ Release Date: Not Released - License - - CodeIgniter has been relicensed with the Open Software License (3.0), - eliminating its old proprietary licensing. + - CodeIgniter has been relicensed with the Open Software License (3.0), eliminating its old proprietary licensing. - All system files are licensed with OSL 3.0. - Config, error, and sample files shipped in the application folder are @@ -43,7 +42,7 @@ Release Date: Not Released - url_title() will now trim extra dashes from beginning and end. - Added XHTML Basic 1.1 doctype to :doc:`HTML Helper `. - - Changed humanize to include a second param for the separator. + - Changed humanize() to include a second param for the separator. - Refactored ``plural()`` and ``singular()`` to avoid double pluralization and support more words. - Added an optional third parameter to ``force_download()`` that enables/disables sending the actual file MIME type in the Content-Type header (disabled by default). - Added an optional third parameter to ``timespan()`` that constrains the number of time units displayed. @@ -56,21 +55,17 @@ Release Date: Not Released - Database - - Renamed the Active Record class to Query Builder to remove confusion with - the Active Record design pattern - - Added new :doc:`Query Builder ` methods that return + - Renamed the Active Record class to Query Builder to remove confusion with the Active Record design pattern. - Added the ability to insert objects with insert_batch() in :doc:`Query Builder `. - - Added new :doc:`Query Builder ` methods that return - the SQL string of queries without executing them: get_compiled_select(), - get_compiled_insert(), get_compiled_update(), get_compiled_delete(). - - Adding $escape parameter to the order_by function, this enables ordering by custom fields. + - Added new :doc:`Query Builder ` methods that return the SQL string of queries without executing them: get_compiled_select(), get_compiled_insert(), get_compiled_update(), get_compiled_delete(). + - Adding $escape parameter to the order_by() method, this enables ordering by custom fields. - Improved support for the MySQLi driver, including: - OOP style of the PHP extension is now used, instead of the procedural aliases. - Server version checking is now done via ``mysqli::$server_info`` instead of running an SQL query. - Added persistent connections support for PHP >= 5.3. - Added 'dsn' configuration setting for drivers that support DSN strings (PDO, PostgreSQL, Oracle, ODBC, CUBRID). - Improved PDO database support. - - Added Interbase/Firebird database support via the "interbase" driver + - Added Interbase/Firebird database support via the "interbase" driver. - Added an optional database name parameter to db_select(). - Replaced the _error_message() and _error_number() methods with error(), that returns an array containing the last database error code and message. - Improved version() implementation so that drivers that have a native function to get the version number don't have to be defined in the core DB_driver class. @@ -102,7 +97,7 @@ Release Date: Not Released - Added PDO support for create_database(), drop_database and drop_table() in :doc:`Database Forge `. - Added MSSQL, SQLSRV support for optimize_table() in :doc:`Database Utility `. - Improved CUBRID support for list_databases() in :doc:`Database Utility ` (until now only the currently used database was returned). - - Added unbuffered_row() function for getting a row without prefetching whole result (consume less memory) + - Added unbuffered_row() method for getting a row without prefetching whole result (consume less memory). - Libraries @@ -110,17 +105,15 @@ Release Date: Not Released - CI_Loader::_ci_autoloader() is now a protected method. - Added custom filename to Email::attach() as $this->email->attach($filename, $disposition, $newname). - Added possibility to send attachment as buffer string in Email::attach() as $this->email->attach($buffer, $disposition, $newname, $mime). - - Cart library changes include: + - :doc:`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 + - 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. - :doc:`Image Manipulation library ` changes include: - The initialize() method now only sets existing class properties. - Added support for 3-length hex color values for wm_font_color and wm_shadow_color properties, as well as validation for them. - - Class properties wm_font_color, wm_shadow_color and wm_use_drop_shadow are now protected, to avoid breaking the text_watermark() method - if they are set manually after initialization. + - Class properties wm_font_color, wm_shadow_color and wm_use_drop_shadow are now protected, to avoid breaking the text_watermark() method if they are set manually after initialization. - If property maintain_ratio is set to TRUE, image_reproportion() now doesn't need both width and height to be specified. - - Minor speed optimizations and method & property visibility declarations in the Calendar Library. - Removed SHA1 function in the :doc:`Encryption Library `. - Added $config['csrf_regeneration'] to the CSRF protection in the :doc:`Security library `, which makes token regeneration optional. - :doc:`Form Validation library ` changes include: @@ -153,26 +146,26 @@ Release Date: Not Released Bug fixes for 3.0 ------------------ -- Unlink raised an error if cache file did not exist when you try to delete it. +- Fixed a bug where ``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 (#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 a bug (#157, #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 (#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 db_pconnect(). +- 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 ``db_pconnect()``. - Fixed a bug in CI_Image_lib::gd_loaded() where it was possible for the script execution to end or a PHP E_WARNING message to be emitted. -- In Pagination library, when use_page_numbers=TRUE previous link and page 1 link do not have the same url +- Fixed a bug in the :doc:`Pagination library ` where when use_page_numbers=TRUE previous link and page 1 link did not have the same url. - Fixed a bug (#561) - Errors in :doc:`XML-RPC Library ` were not properly escaped. - Fixed a bug (#904) - ``CI_Loader::initialize()`` caused a PHP Fatal error to be triggered if error level E_STRICT is used. -- Fixed a hosting edge case where an empty $_SERVER['HTTPS'] variable would evaluate to 'on' +- Fixed a hosting edge case where an empty $_SERVER['HTTPS'] variable would evaluate to 'on'. - Fixed a bug (#154) - ``CI_Session::sess_update()`` caused the session to be destroyed on pages where multiple AJAX requests were executed at once. - Fixed a possible bug in ``CI_Input::is_ajax_request()`` where some clients might not send the X-Requested-With HTTP header value exactly as 'XmlHttpRequest'. - Fixed a bug (#1039) - MySQL's _backup() method failed due to a table name not being escaped. @@ -183,7 +176,7 @@ Bug fixes for 3.0 - Fixed a bug (#129) - ODBC's num_rows() returned -1 in some cases, due to not all subdrivers supporting the odbc_num_rows() function. - Fixed a bug (#153) - E_NOTICE being generated by getimagesize() in the :doc:`File Uploading Library `. - Fixed a bug (#611) - SQLSRV's error handling methods used to issue warnings when there's no actual error. -- Fixed a bug (#1036) - is_write_type() method in the :doc:`Database Library ` didn't return TRUE for RENAME and OPTIMIZE queries. +- Fixed a bug (#1036) - is_write_type() method in the :doc:`Database Library ` didn't return TRUE for RENAME queries. - Fixed a bug in PDO's _version() method where it used to return the client version as opposed to the server one. - Fixed a bug in PDO's insert_id() method where it could've failed if it's used with Postgre versions prior to 8.1. - Fixed a bug in CUBRID's affected_rows() method where a connection resource was passed to cubrid_affected_rows() instead of a result. @@ -207,7 +200,7 @@ Bug fixes for 3.0 - Fixed a bug (#23, #1238) - delete_all() in the `Database Caching Library ` used to delete .htaccess and index.html files, which is a potential security risk. - Fixed a bug in :doc:`Trackback Library ` method validate_url() where it didn't actually do anything, due to input not being passed by reference. - Fixed a bug (#11, #183, #863) - CI_Form_validation::_execute() silently continued to the next rule, if a rule method/function is not found. -- Fixed a bug (#122) Where routed uri string was being reported incorrectly in sub-directories +- Fixed a bug (#122) Where routed uri string was being reported incorrectly in sub-directories. - Fixed a bug (#1242) - read_dir() in the :doc:`Zip Library ` wasn't compatible with Windows. - Fixed a bug (#306) - ODBC driver didn't have an _insert_batch() method, which resulted in fatal error being triggered when insert_batch() is used with it. - Fixed a bug in MSSQL and SQLSrv's _truncate() where the TABLE keyword was missing. @@ -217,7 +210,7 @@ Bug fixes for 3.0 - Fixed a bug in SQLSRV's delete() method where like() and limit() conditions were ignored. - Fixed a bug (#1265) - Database connections were always closed, regardless of the 'pconnect' option value. - Fixed a bug (#128) - :doc:`Language Library ` did not correctly keep track of loaded language files. -- Fixed a bug (#1242) - Added Windows path compatibility to function read_dir of ZIP library +- Fixed a bug (#1242) - Added Windows path compatibility to function read_dir of ZIP library. - Fixed a bug (#1314) - sess_destroy() did not destroy userdata. - Fixed a bug (#1349) - get_extension() in the `File Uploading Library ` returned the original filename when it didn't have an actual extension. -- cgit v1.2.3-24-g4f1b From f46e726cfb726da2ec2095011ffe8625b6f9c816 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 23 May 2012 13:16:00 +0300 Subject: Fix a typo in the changelog --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a65a658ed..2b15c3f55 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -160,7 +160,7 @@ Bug fixes for 3.0 - 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 ``db_pconnect()``. +- Fixed a bug (#406) - sqlsrv DB driver not returning resource on ``db_pconnect()``. - Fixed a bug in CI_Image_lib::gd_loaded() where it was possible for the script execution to end or a PHP E_WARNING message to be emitted. - Fixed a bug in the :doc:`Pagination library ` where when use_page_numbers=TRUE previous link and page 1 link did not have the same url. - Fixed a bug (#561) - Errors in :doc:`XML-RPC Library ` were not properly escaped. -- cgit v1.2.3-24-g4f1b From 55a6ddb0c7bab1149bb1ddfa3a1aff46612c91d4 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Wed, 23 May 2012 18:37:24 +0100 Subject: Input, Session and Cookie get's will return NULL. Read more about this change here: http://codeigniter.com/forums/viewthread/215833 --- user_guide_src/source/libraries/input.rst | 17 +++++------------ user_guide_src/source/libraries/uri.rst | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 1f2ea650a..432bac3c7 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -18,7 +18,7 @@ The security filtering function 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 +- 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. @@ -53,14 +53,7 @@ false (boolean) if not. This lets you conveniently use data without having to test whether an item exists first. In other words, normally you might do something like this:: - if ( ! isset($_POST['something'])) - { - $something = FALSE; - } - else - { - $something = $_POST['something']; - } + $something = isset($_POST['something']) ? $_POST['something'] : NULL; With CodeIgniter's built in functions you can simply do this:: @@ -95,7 +88,7 @@ To return an array of all POST items call without any parameters. To return all POST items and pass them through the XSS filter set the first parameter NULL while setting the second parameter to boolean; -The function returns FALSE (boolean) if there are no items in the POST. +The function returns NULL if there are no items in the POST. :: @@ -115,7 +108,7 @@ To return an array of all GET items call without any parameters. To return all GET items and pass them through the XSS filter set the first parameter NULL while setting the second parameter to boolean; -The function returns FALSE (boolean) if there are no items in the GET. +The function returns NULL if there are no items in the GET. :: @@ -210,7 +203,7 @@ the cookie you are looking for (including any prefixes):: cookie('some_cookie'); -The function returns FALSE (boolean) if the item you are attempting to +The function returns NULL if the item you are attempting to retrieve does not exist. The second optional parameter lets you run the data through the XSS diff --git a/user_guide_src/source/libraries/uri.rst b/user_guide_src/source/libraries/uri.rst index ee60b77d7..cdd76e322 100644 --- a/user_guide_src/source/libraries/uri.rst +++ b/user_guide_src/source/libraries/uri.rst @@ -25,7 +25,7 @@ The segment numbers would be this: #. metro #. crime_is_up -By default the function returns FALSE (boolean) if the segment does not +By default the function returns NULL if the segment does not exist. There is an optional second parameter that permits you to set your own default value if the segment is missing. For example, this would tell the function to return the number zero in the event of -- cgit v1.2.3-24-g4f1b From 7b5eb7310e5980ffb23fde8a11261e4a40c3b90e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 24 May 2012 20:52:41 +0300 Subject: Fix issue #1273 and some cleanup in Query Builder --- user_guide_src/source/changelog.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e0d745fd8..8ddeb0eac 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -149,7 +149,7 @@ Bug fixes for 3.0 - Fixed a bug where ``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 (#159, #163) that mishandled Query Builder 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. @@ -190,7 +190,7 @@ Bug fixes for 3.0 - Fixed a bug (#499) - a CSRF cookie was created even with CSRF protection being disabled. - Fixed a bug (#306) - ODBC's insert_id() method was calling non-existent function odbc_insert_id(), which resulted in a fatal error. - Fixed a bug in Oracle's DB_result class where the cursor id passed to it was always NULL. -- Fixed a bug (#64) - Regular expression in DB_active_rec.php failed to handle queries containing SQL bracket delimiters in the join condition. +- Fixed a bug (#64) - Regular expression in DB_query_builder.php failed to handle queries containing SQL bracket delimiters in the join condition. - Fixed a bug in the :doc:`Session Library ` where a PHP E_NOTICE error was triggered by _unserialize() due to results from databases such as MSSQL and Oracle being space-padded on the right. - Fixed a bug (#501) - set_rules() to check if the request method is not 'POST' before aborting, instead of depending on count($_POST) in the :doc:`Form Validation Library `. - Fixed a bug (#940) - csrf_verify() used to set the CSRF cookie while processing a POST request with no actual POST data, which resulted in validating a request that should be considered invalid. @@ -213,7 +213,8 @@ Bug fixes for 3.0 - Fixed a bug (#128) - :doc:`Language Library ` did not correctly keep track of loaded language files. - Fixed a bug (#1242) - Added Windows path compatibility to function read_dir of ZIP library. - Fixed a bug (#1314) - sess_destroy() did not destroy userdata. -- Fixed a bug (#1349) - get_extension() in the `File Uploading Library ` returned the original filename when it didn't have an actual extension. +- Fixed a bug (#1349) - get_extension() in the :doc:`File Uploading Library ` returned the original filename when it didn't have an actual extension. +- Fixed a bug (#1273) - E_NOTICE being generated by :doc:`Query Builder `'s set_update_batch() method. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 470805b12a8a25faddc9caafe573c15dbd89f8ed Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 24 May 2012 21:57:21 +0300 Subject: Fix issues #44 & #110 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8ddeb0eac..8ee224fc6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -215,6 +215,7 @@ Bug fixes for 3.0 - Fixed a bug (#1314) - sess_destroy() did not destroy userdata. - Fixed a bug (#1349) - get_extension() in the :doc:`File Uploading Library ` returned the original filename when it didn't have an actual extension. - Fixed a bug (#1273) - E_NOTICE being generated by :doc:`Query Builder `'s set_update_batch() method. +- Fixed a bug (#44, #110) - :doc:`Upload library `'s clean_file_name() method didn't clear '!' and '#' characters. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 55d3ad4faf2727b900832884e7c219076a255b66 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 24 May 2012 22:13:06 +0300 Subject: Fix issue #121 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8ee224fc6..67f1271f1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -216,6 +216,7 @@ Bug fixes for 3.0 - Fixed a bug (#1349) - get_extension() in the :doc:`File Uploading Library ` returned the original filename when it didn't have an actual extension. - Fixed a bug (#1273) - E_NOTICE being generated by :doc:`Query Builder `'s set_update_batch() method. - Fixed a bug (#44, #110) - :doc:`Upload library `'s clean_file_name() method didn't clear '!' and '#' characters. +- Fixed a bug (#121) - ``CI_DB_result::row()`` returned an array when there's no actual result to be returned. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 846acc7926ccb991d39135353d5047e7de5bcb60 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 24 May 2012 23:27:46 +0300 Subject: Fix issue #319 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 67f1271f1..f21f1266d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -217,6 +217,7 @@ Bug fixes for 3.0 - Fixed a bug (#1273) - E_NOTICE being generated by :doc:`Query Builder `'s set_update_batch() method. - Fixed a bug (#44, #110) - :doc:`Upload library `'s clean_file_name() method didn't clear '!' and '#' characters. - Fixed a bug (#121) - ``CI_DB_result::row()`` returned an array when there's no actual result to be returned. +- Fixed a bug (#319) - SQLSRV's affected_rows() method failed due to a scrollable cursor being created for write-type queries. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From d06acd85cdfff5411474b46afee36fb77baa1200 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 25 May 2012 00:29:09 +0300 Subject: Added update_batch() support for PostgreSQL (issue #356) --- user_guide_src/source/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f21f1266d..5407fb05e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -75,6 +75,7 @@ Release Date: Not Released - Added db_set_charset() support. - Added _optimize_table() support for the :doc:`Database Utility Class ` (rebuilds table indexes). - Added boolean data type support in escape(). + - Added update_batch() support. - Added a constructor to the DB_result class and moved all driver-specific properties and logic out of the base DB_driver class to allow better abstraction. - Removed limit() and order_by() support for UPDATE and DELETE queries in PostgreSQL driver. Postgres does not support those features. - Removed protect_identifiers() and renamed internal method _protect_identifiers() to it instead - it was just an alias. @@ -218,6 +219,7 @@ Bug fixes for 3.0 - Fixed a bug (#44, #110) - :doc:`Upload library `'s clean_file_name() method didn't clear '!' and '#' characters. - Fixed a bug (#121) - ``CI_DB_result::row()`` returned an array when there's no actual result to be returned. - Fixed a bug (#319) - SQLSRV's affected_rows() method failed due to a scrollable cursor being created for write-type queries. +- Fixed a bug (#356) - PostgreSQL driver didn't have an _update_batch() method, which resulted in fatal error being triggered when update_batch() is used with it. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 21cb2d32edd595a38189cdba137e694c3a22e1f0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 25 May 2012 01:01:06 +0300 Subject: Fix issue #136 (MySQL escape_like_str()) --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5407fb05e..4b8a0f2d3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -195,7 +195,7 @@ Bug fixes for 3.0 - Fixed a bug in the :doc:`Session Library ` where a PHP E_NOTICE error was triggered by _unserialize() due to results from databases such as MSSQL and Oracle being space-padded on the right. - Fixed a bug (#501) - set_rules() to check if the request method is not 'POST' before aborting, instead of depending on count($_POST) in the :doc:`Form Validation Library `. - Fixed a bug (#940) - csrf_verify() used to set the CSRF cookie while processing a POST request with no actual POST data, which resulted in validating a request that should be considered invalid. -- Fixed a bug in PostgreSQL's escape_str() where it didn't properly escape LIKE wild characters. +- Fixed a bug (#136) - PostgreSQL, MySQL and MySQLi's escape_str() method didn't properly escape LIKE wild characters. - Fixed a bug in the library loader where some PHP versions wouldn't execute the class constructor. - Fixed a bug (#88) - An unexisting property was used for configuration of the Memcache cache driver. - Fixed a bug (#14) - create_database() method in the :doc:`Database Forge Library ` didn't utilize the configured database character set. -- cgit v1.2.3-24-g4f1b From 650f2a2bc15dd575f50446dcc1315c131652ca49 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 26 May 2012 18:56:29 +0300 Subject: Fix issue #862 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4b8a0f2d3..a234d6969 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -220,6 +220,7 @@ Bug fixes for 3.0 - Fixed a bug (#121) - ``CI_DB_result::row()`` returned an array when there's no actual result to be returned. - Fixed a bug (#319) - SQLSRV's affected_rows() method failed due to a scrollable cursor being created for write-type queries. - Fixed a bug (#356) - PostgreSQL driver didn't have an _update_batch() method, which resulted in fatal error being triggered when update_batch() is used with it. +- Fixed a bug (#862) - create_table() failed on SQLSRV/MSSQL when used with 'IF NOT EXISTS'. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From fa5a9e5f28b2ae61748bb20c2f644c3c156c3d5e Mon Sep 17 00:00:00 2001 From: madhazelnut Date: Wed, 30 May 2012 18:50:39 +0300 Subject: create_captcha() helper documentation --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a234d6969..6e528584b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -40,7 +40,7 @@ Release Date: Not Released - Moved error templates to "application/views/errors" - Helpers - + - create_captcha() accepts additional colors parameter, allowing for color customization - url_title() will now trim extra dashes from beginning and end. - Added XHTML Basic 1.1 doctype to :doc:`HTML Helper `. - Changed humanize() to include a second param for the separator. -- cgit v1.2.3-24-g4f1b From 8bbf4e09b68a4aa9beb85edbdb0bec75c7a51de6 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Thu, 31 May 2012 13:30:22 +0200 Subject: automatic list formatting was broken --- user_guide_src/source/changelog.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 6e528584b..da3be3adb 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -40,6 +40,7 @@ Release Date: Not Released - Moved error templates to "application/views/errors" - Helpers + - create_captcha() accepts additional colors parameter, allowing for color customization - url_title() will now trim extra dashes from beginning and end. - Added XHTML Basic 1.1 doctype to :doc:`HTML Helper `. @@ -110,7 +111,7 @@ Release Date: Not Released - :doc:`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. + - Added function remove() to remove a cart item, updating with quantity of 0 seemed like a hack but has remained to retain compatibility. - :doc:`Image Manipulation library ` changes include: - The initialize() method now only sets existing class properties. - Added support for 3-length hex color values for wm_font_color and wm_shadow_color properties, as well as validation for them. -- cgit v1.2.3-24-g4f1b From 991cfa2e5843df05c6295445133882b9f35e3f7b Mon Sep 17 00:00:00 2001 From: Thanasis Polychronakis Date: Thu, 31 May 2012 21:54:35 +0300 Subject: Changed documentation and added note to changelog as per @philsturgeon request --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/libraries/config.rst | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index da3be3adb..3989b52d2 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -38,6 +38,7 @@ Release Date: Not Released - Added some more doctypes. - Updated all classes to be written in PHP 5 style, with visibility declarations and no ``var`` usage for properties. - Moved error templates to "application/views/errors" + - Global config files are loaded first, then environment ones. Environment config keys overwrite base ones, allowing to only set the keys we want changed per Env. - Helpers diff --git a/user_guide_src/source/libraries/config.rst b/user_guide_src/source/libraries/config.rst index c81cad7b3..08d9c2905 100644 --- a/user_guide_src/source/libraries/config.rst +++ b/user_guide_src/source/libraries/config.rst @@ -149,11 +149,13 @@ folders: - Your own custom configuration files .. note:: - CodeIgniter always tries to load the configuration files for - the current environment first. If the file does not exist, the global - config file (i.e., the one in application/config/) is loaded. This means - you are not obligated to place **all** of your configuration files in an - environment folder − only the files that change per environment. + CodeIgniter always loads the global config file first (i.e., the one in application/config/), + then tries to load the configuration files for the current environment. + This means you are not obligated to place **all** of your configuration files in an + environment folder. Only the files that change per environment. Additionally you don't + have to copy **all** the config items in the environment config file. Only the config items + that you wish to change for your environment. The config items declared in your environment + folders always overwrite those in your global config files. Helper Functions ================ -- cgit v1.2.3-24-g4f1b From bfc1cad4fbf6d6640d782f39169af6c3799fa3e8 Mon Sep 17 00:00:00 2001 From: Mickey Wu Date: Thu, 31 May 2012 22:28:40 -0700 Subject: Made set_header() public in Email library and updated documentation. --- user_guide_src/source/libraries/email.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index daf000907..f99eb91df 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -182,6 +182,14 @@ formatting which is added to the header string for people who do not accept HTML email. If you do not set your own message CodeIgniter will extract the message from your HTML email and strip the tags. +$this->email->set_header() +----------------------- + +Appends additional headers to the e-mail:: + + $this->email->set_header('Header1', 'Value1'); + $this->email->set_header('Header2', 'Value2'); + $this->email->clear() --------------------- -- cgit v1.2.3-24-g4f1b From 2e757d844caede9784da0b30faa7d5c405c6b172 Mon Sep 17 00:00:00 2001 From: Mickey Wu Date: Fri, 1 Jun 2012 10:24:22 -0700 Subject: Update user_guide_src/source/changelog.rst --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index da3be3adb..13482d826 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -132,6 +132,7 @@ Release Date: Not Released - Allowed for setting table class defaults in a config file. - Added a Wincache driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. + - Enabled public access to Email library's set_header() for adding additional headers to e-mails. - Core -- cgit v1.2.3-24-g4f1b From 697b75e5296c4add2577db9099c235781fd34430 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 2 Jun 2012 11:22:58 +0100 Subject: Changed example model name to follow the CI styleguide class naming conventions --- user_guide_src/source/general/models.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index 0156b0460..72acf77b4 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -16,7 +16,7 @@ blog. You might have a model class that contains functions to insert, update, and retrieve your blog data. Here is an example of what such a model class might look like:: - class Blogmodel extends CI_Model { + class Blog_model extends CI_Model { var $title = ''; var $content = ''; -- cgit v1.2.3-24-g4f1b From 149c07726bb60df65766a1046e695b1897652cc7 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 2 Jun 2012 11:23:41 +0100 Subject: Changed load model examples to use lowercase model name. Fixes #1417 --- user_guide_src/source/general/models.rst | 12 ++++++------ user_guide_src/source/libraries/loader.rst | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index 72acf77b4..87f63e416 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -104,7 +104,7 @@ Your models will typically be loaded and called from within your :doc:`controller ` functions. To load a model you will use the following function:: - $this->load->model('Model_name'); + $this->load->model('model_name'); If your model is located in a sub-folder, include the relative path from your models folder. For example, if you have a model located at @@ -115,14 +115,14 @@ application/models/blog/queries.php you'll load it using:: Once loaded, you will access your model functions using an object with the same name as your class:: - $this->load->model('Model_name'); + $this->load->model('model_name'); - $this->Model_name->function(); + $this->model_name->function(); If you would like your model assigned to a different object name you can specify it via the second parameter of the loading function:: - $this->load->model('Model_name', 'fubar'); + $this->load->model('model_name', 'fubar'); $this->fubar->function(); @@ -133,7 +133,7 @@ view:: function blog() { - $this->load->model('Blog'); + $this->load->model('blog'); $data['query'] = $this->Blog->get_last_ten_entries(); @@ -165,7 +165,7 @@ database. The following options for connecting are available to you: defined in your database config file will be used: :: - $this->load->model('Model_name', '', TRUE); + $this->load->model('model_name', '', TRUE); - You can manually pass database connectivity settings via the third parameter:: diff --git a/user_guide_src/source/libraries/loader.rst b/user_guide_src/source/libraries/loader.rst index 2090404bf..aadf9740a 100644 --- a/user_guide_src/source/libraries/loader.rst +++ b/user_guide_src/source/libraries/loader.rst @@ -116,12 +116,12 @@ assign it to a variable if you want the data returned:: $string = $this->load->view('myfile', '', true); -$this->load->model('Model_name'); +$this->load->model('model_name'); ================================== :: - $this->load->model('Model_name'); + $this->load->model('model_name'); If your model is located in a sub-folder, include the relative path from @@ -134,7 +134,7 @@ application/models/blog/queries.php you'll load it using:: If you would like your model assigned to a different object name you can specify it via the second parameter of the loading function:: - $this->load->model('Model_name', 'fubar'); + $this->load->model('model_name', 'fubar'); $this->fubar->function(); -- cgit v1.2.3-24-g4f1b From dda21f6abc76451997b12c07e6066aa49c2d423d Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Sun, 3 Jun 2012 10:36:36 -0500 Subject: Added support for $_SERVER['CI_ENV'] in index.php Remember this is entirely optional, nothing will change if you do not which to use Multiple Environments just like right now. If you DO set CI_ENV you can manipulate the switch that controls error reporting, etc, so set it to "production" on your live site to hide errors from users. If you don't require this logic you can remove it, or change it entirely to check HTTP_HOST for environment subdomains, or check IP address, etc. --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/general/environments.rst | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a234d6969..5e09f8c29 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -19,6 +19,7 @@ Release Date: Not Released - General Changes - PHP 5.1.6 is no longer supported. CodeIgniter now requires PHP 5.2.4. + - ``$_SERVER['CI_ENV']`` can now be set to control the ``ENVIRONMENT`` constant. - Added an optional backtrace to php-error template. - Added Android to the list of user agents. - Added Windows 7, Android, Blackberry and iOS to the list of user platforms. diff --git a/user_guide_src/source/general/environments.rst b/user_guide_src/source/general/environments.rst index 40725feba..fa1b096e2 100644 --- a/user_guide_src/source/general/environments.rst +++ b/user_guide_src/source/general/environments.rst @@ -11,10 +11,16 @@ when "live". The ENVIRONMENT Constant ======================== -By default, CodeIgniter comes with the environment constant set to +By default, CodeIgniter comes with the environment constant set to use +the value provided in ``$_SERVER['CI_ENV']``, otherwise defaults to 'development'. At the top of index.php, you will see:: - define('ENVIRONMENT', 'development'); + define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development'); + +This server variable can be set in your .htaccess file, or Apache +config using `SetEnv `_. +Alternative methods are available for nginx and other servers, or you can +remove this logic entirely and set the constant based on the HTTP_HOST or IP. In addition to affecting some basic framework behavior (see the next section), you may use this constant in your own development to -- cgit v1.2.3-24-g4f1b From 2fd0506ebcfeeadc0a07c4667d1997d0d30b205e Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Mon, 4 Jun 2012 20:49:03 +0200 Subject: changelog --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3989b52d2..c8c2ef010 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -223,6 +223,7 @@ Bug fixes for 3.0 - Fixed a bug (#319) - SQLSRV's affected_rows() method failed due to a scrollable cursor being created for write-type queries. - Fixed a bug (#356) - PostgreSQL driver didn't have an _update_batch() method, which resulted in fatal error being triggered when update_batch() is used with it. - Fixed a bug (#862) - create_table() failed on SQLSRV/MSSQL when used with 'IF NOT EXISTS'. +- Fixed a bug (#1419) - libraries/Driver.php had a static variable that was causing an error. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 6ef498b49946ba74d610b3805fb908b163a7f03a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 5 Jun 2012 22:01:58 +0300 Subject: Added get_mimes() function to system/core/Commons.php.The MIMEs array from config/mimes.php is used by multiple core classes, libraries and helpers and each of them has implemented an own way of getting it, which is not needed and is hard to maintain. This also fixes issue #1411 --- user_guide_src/source/changelog.rst | 2 ++ user_guide_src/source/general/common_functions.rst | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 587e56ea7..8ecdf9aef 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -147,6 +147,7 @@ Release Date: Not Released - Added support for HTTP-Only cookies with new config option ``cookie_httponly`` (default FALSE). - Renamed method _call_hook() to call_hook() in the :doc:`Hooks Library `. - Added get_content_type() method to the :doc:`Output Library `. + - Added get_mimes() function to system/core/Commons.php to return the config/mimes.php array. Bug fixes for 3.0 ------------------ @@ -225,6 +226,7 @@ Bug fixes for 3.0 - Fixed a bug (#356) - PostgreSQL driver didn't have an _update_batch() method, which resulted in fatal error being triggered when update_batch() is used with it. - Fixed a bug (#862) - create_table() failed on SQLSRV/MSSQL when used with 'IF NOT EXISTS'. - Fixed a bug (#1419) - libraries/Driver.php had a static variable that was causing an error. +- Fixed a bug (#1411) - the :doc:`Email library ` used its own short list of MIMEs instead the one from config/mimes.php. Version 2.1.1 ============= diff --git a/user_guide_src/source/general/common_functions.rst b/user_guide_src/source/general/common_functions.rst index 70563b8d2..99126f900 100644 --- a/user_guide_src/source/general/common_functions.rst +++ b/user_guide_src/source/general/common_functions.rst @@ -79,3 +79,8 @@ html_escape($mixed) This function provides short cut for htmlspecialchars() function. It accepts string and array. To prevent Cross Site Scripting (XSS), it is very useful. + +get_mimes() +============= + +This function returns the MIMEs array from config/mimes.php. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 24bd230337cc469941dbdb51e05351cc1b3fbe14 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 5 Jun 2012 22:29:12 +0300 Subject: Fix a magic_quotes-related bug and changed the default parameter value for is_php() --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8ecdf9aef..c4c42d118 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -227,6 +227,7 @@ Bug fixes for 3.0 - Fixed a bug (#862) - create_table() failed on SQLSRV/MSSQL when used with 'IF NOT EXISTS'. - Fixed a bug (#1419) - libraries/Driver.php had a static variable that was causing an error. - Fixed a bug (#1411) - the :doc:`Email library ` used its own short list of MIMEs instead the one from config/mimes.php. +- Fixed a bug where the magic_quotes_runtime setting wasn't turned off for PHP 5.3 (where it is indeed deprecated, but not non-existent). Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From aa31f05646f177e587e1e4a0b74cb351bd98de84 Mon Sep 17 00:00:00 2001 From: Mickey Wu Date: Tue, 5 Jun 2012 16:55:04 -0700 Subject: Update develop --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 13482d826..a0cff6e22 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -132,7 +132,7 @@ Release Date: Not Released - Allowed for setting table class defaults in a config file. - Added a Wincache driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - - Enabled public access to Email library's set_header() for adding additional headers to e-mails. + - Enabled public access to Email library's set_header() for adding additional headers to e-mails. Original function _set_header() now renamed to set_header(). - Core -- cgit v1.2.3-24-g4f1b From d4901395c598552a3ef52d34aa3734e7b124dbfa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 6 Jun 2012 14:54:15 +0300 Subject: Added Fennec as Firefox Mobile to config/user_agents.php (issue #1063) --- user_guide_src/source/changelog.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f4bba25ed..74de512f7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -23,6 +23,7 @@ Release Date: Not Released - Added an optional backtrace to php-error template. - Added Android to the list of user agents. - Added Windows 7, Android, Blackberry and iOS to the list of user platforms. + - Added Fennec (Firefox for mobile) to the list of mobile user agents. - Ability to log certain error types, not all under a threshold. - Added support for pem, p10, p12, p7a, p7c, p7m, p7r, p7s, crt, crl, der, kdb, rsa, cer, sst, csr Certs to mimes.php. - Added support for pgp and gpg to mimes.php. @@ -79,8 +80,8 @@ Release Date: Not Released - Added _optimize_table() support for the :doc:`Database Utility Class ` (rebuilds table indexes). - Added boolean data type support in escape(). - Added update_batch() support. + - Removed limit() and order_by() support for UPDATE and DELETE queries in as PostgreSQL does not support those features. - Added a constructor to the DB_result class and moved all driver-specific properties and logic out of the base DB_driver class to allow better abstraction. - - Removed limit() and order_by() support for UPDATE and DELETE queries in PostgreSQL driver. Postgres does not support those features. - Removed protect_identifiers() and renamed internal method _protect_identifiers() to it instead - it was just an alias. - MySQL and MySQLi drivers now require at least MySQL version 5.1. - db_set_charset() now only requires one parameter (collation was only needed due to legacy support for MySQL versions prior to 5.1). -- cgit v1.2.3-24-g4f1b From 73ed3ed3e2cf3efeb8332c569e589f16468daf7d Mon Sep 17 00:00:00 2001 From: Joffrey Jaffeux Date: Wed, 6 Jun 2012 14:26:55 +0200 Subject: update changelog for ipv6 support --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f4bba25ed..c12db1f27 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -135,6 +135,7 @@ Release Date: Not Released - Added a Wincache driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - Enabled public access to Email library's set_header() for adding additional headers to e-mails. Original function _set_header() now renamed to set_header(). + - Input library now supports IPv6 and has a ip_version() method. - Core -- cgit v1.2.3-24-g4f1b From 5f33f368ee4a635c93ffc73997969a2eabdf67b9 Mon Sep 17 00:00:00 2001 From: Joffrey Jaffeux Date: Wed, 6 Jun 2012 14:28:16 +0200 Subject: update documentation for ip_version() and tells valid_ip() now supports ipv6 --- user_guide_src/source/libraries/input.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 432bac3c7..649fe43d6 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -228,7 +228,7 @@ $this->input->valid_ip($ip) ============================ Takes an IP address as input and returns TRUE or FALSE (boolean) if it -is valid or not. Note: The $this->input->ip_address() function above +is valid or not (works with IPv4 and IPv6). Note: The $this->input->ip_address() function above validates the IP automatically. :: @@ -242,6 +242,15 @@ validates the IP automatically. echo 'Valid'; } +$this->input->ip_version($ip) +============================ + +Takes an IP address as input and returns the version : 4 or 6. +:: + + $ip = '175.123.74.43'; + echo $this->input->ip_version($ip); // 4 + $this->input->user_agent() =========================== -- cgit v1.2.3-24-g4f1b From 6c8515459e4c631b0882532e8c44ee6435fd3809 Mon Sep 17 00:00:00 2001 From: Joffrey Jaffeux Date: Wed, 6 Jun 2012 14:30:11 +0200 Subject: bad spacing --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c12db1f27..0ab18782e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -135,7 +135,7 @@ Release Date: Not Released - Added a Wincache driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - Enabled public access to Email library's set_header() for adding additional headers to e-mails. Original function _set_header() now renamed to set_header(). - - Input library now supports IPv6 and has a ip_version() method. + - Input library now supports IPv6 and has a ip_version() method. - Core -- cgit v1.2.3-24-g4f1b From 47b673324f06236264ca64f8c3155aab51762609 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 6 Jun 2012 15:58:05 +0300 Subject: Add a second parameter (charset) to CI_Output::set_content_type() + fix for issue #666 --- user_guide_src/source/changelog.rst | 4 +++- user_guide_src/source/libraries/output.rst | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 74de512f7..ce9b06883 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -135,7 +135,7 @@ Release Date: Not Released - Allowed for setting table class defaults in a config file. - Added a Wincache driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - - Enabled public access to Email library's set_header() for adding additional headers to e-mails. Original function _set_header() now renamed to set_header(). + - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Core @@ -150,6 +150,7 @@ Release Date: Not Released - Renamed method _call_hook() to call_hook() in the :doc:`Hooks Library `. - Added get_content_type() method to the :doc:`Output Library `. - Added get_mimes() function to system/core/Commons.php to return the config/mimes.php array. + - Added a second argument to set_content_type() in the :doc:`Output Library ` that allows setting the document charset as well. Bug fixes for 3.0 ------------------ @@ -230,6 +231,7 @@ Bug fixes for 3.0 - Fixed a bug (#1419) - libraries/Driver.php had a static variable that was causing an error. - Fixed a bug (#1411) - the :doc:`Email library ` used its own short list of MIMEs instead the one from config/mimes.php. - Fixed a bug where the magic_quotes_runtime setting wasn't turned off for PHP 5.3 (where it is indeed deprecated, but not non-existent). +- Fixed a bug (#666) - :doc:`Output library `'s set_content_type() method didn't set the document charset. Version 2.1.1 ============= diff --git a/user_guide_src/source/libraries/output.rst b/user_guide_src/source/libraries/output.rst index baceaae7b..0472d14cf 100644 --- a/user_guide_src/source/libraries/output.rst +++ b/user_guide_src/source/libraries/output.rst @@ -49,6 +49,10 @@ data, JPEG's, XML, etc easily. .. important:: Make sure any non-mime string you pass to this method exists in config/mimes.php or it will have no effect. +You can also set the character set of the document, by passing a second argument:: + + $this->output->set_content_type('css', 'utf-8'); + $this->output->get_content_type(); ========================================== -- cgit v1.2.3-24-g4f1b From 3c5623748424aaccd6bad980240833b3b1e87d60 Mon Sep 17 00:00:00 2001 From: Cory Date: Wed, 6 Jun 2012 10:51:55 -0400 Subject: Modifying changelog to reflect the change --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 587e56ea7..e8e8a8da0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -225,6 +225,7 @@ Bug fixes for 3.0 - Fixed a bug (#356) - PostgreSQL driver didn't have an _update_batch() method, which resulted in fatal error being triggered when update_batch() is used with it. - Fixed a bug (#862) - create_table() failed on SQLSRV/MSSQL when used with 'IF NOT EXISTS'. - Fixed a bug (#1419) - libraries/Driver.php had a static variable that was causing an error. +- Fixed a bug (#1374) - :doc:`Table Library ` was generating an extra td tag at the start of the tr. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 1ab6f6520ebfc016c49cfbe3a4d9d009be5da268 Mon Sep 17 00:00:00 2001 From: Joffrey Jaffeux Date: Wed, 6 Jun 2012 20:14:13 +0200 Subject: removed ip_version() --- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/libraries/input.rst | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3118b7dc5..0b987b1be 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -135,7 +135,7 @@ Release Date: Not Released - Allowed for setting table class defaults in a config file. - Added a Wincache driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - - Input library now supports IPv6 and has a ip_version() method. + - Input library now supports IPv6. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Core diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 649fe43d6..abdf87704 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -242,15 +242,6 @@ validates the IP automatically. echo 'Valid'; } -$this->input->ip_version($ip) -============================ - -Takes an IP address as input and returns the version : 4 or 6. -:: - - $ip = '175.123.74.43'; - echo $this->input->ip_version($ip); // 4 - $this->input->user_agent() =========================== -- cgit v1.2.3-24-g4f1b From 3dfa14b3831c6f22acdca3d3ae8f0cb48e66b782 Mon Sep 17 00:00:00 2001 From: Joffrey Jaffeux Date: Wed, 6 Jun 2012 22:21:31 +0200 Subject: remove text about ipv4/ipv6 support in the doc --- user_guide_src/source/libraries/input.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index abdf87704..432bac3c7 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -228,7 +228,7 @@ $this->input->valid_ip($ip) ============================ Takes an IP address as input and returns TRUE or FALSE (boolean) if it -is valid or not (works with IPv4 and IPv6). Note: The $this->input->ip_address() function above +is valid or not. Note: The $this->input->ip_address() function above validates the IP automatically. :: -- cgit v1.2.3-24-g4f1b From 0f0b76980cb07f39b20c8591882aeae3854f016c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jun 2012 14:57:04 +0300 Subject: Deprecated do_hash() and read_file() in favor of hash() and file_get_contents() respectively --- user_guide_src/source/changelog.rst | 20 +++++++++++--------- user_guide_src/source/helpers/file_helper.rst | 3 +++ user_guide_src/source/helpers/security_helper.rst | 6 ++++-- user_guide_src/source/helpers/string_helper.rst | 3 +-- 4 files changed, 19 insertions(+), 13 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 211e9acc9..7180c2d07 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -44,19 +44,21 @@ Release Date: Not Released - Helpers - - create_captcha() accepts additional colors parameter, allowing for color customization - - url_title() will now trim extra dashes from beginning and end. + - ``create_captcha()`` accepts additional colors parameter, allowing for color customization. + - ``url_title()`` will now trim extra dashes from beginning and end. - Added XHTML Basic 1.1 doctype to :doc:`HTML Helper `. - - Changed humanize() to include a second param for the separator. + - Changed ``humanize()`` to include a second param for the separator. - Refactored ``plural()`` and ``singular()`` to avoid double pluralization and support more words. - Added an optional third parameter to ``force_download()`` that enables/disables sending the actual file MIME type in the Content-Type header (disabled by default). - Added an optional third parameter to ``timespan()`` that constrains the number of time units displayed. - - Added a work-around in force_download() for a bug Android <= 2.1, where the filename extension needs to be in uppercase. - - form_dropdown() will now also take an array for unity with other form helpers. - - set_realpath() can now also handle file paths as opposed to just directories. - - do_hash() now uses PHP's native hash() function, supporting more algorithms. - - Added an optional paramater to ``delete_files()`` to enable it to skip deleting files such as .htaccess and index.html. - - Removed deprecated helper function ``js_insert_smiley()`` from smiley helper. + - Added a work-around in ``force_download()`` for a bug Android <= 2.1, where the filename extension needs to be in uppercase. + - ``form_dropdown()`` will now also take an array for unity with other form helpers. + - ``do_hash()`` now uses PHP's native ``hash()`` function (supporting more algorithms) and is deprecated. + - Removed previously deprecated helper function ``js_insert_smiley()`` from smiley helper. + - :doc:`File Helper ` changes include: + - ``set_realpath()`` can now also handle file paths as opposed to just directories. + - Added an optional paramater to ``delete_files()`` to enable it to skip deleting files such as .htaccess and index.html. + - ``read_file()`` is now a deprecated alias of ``file_get_contents()``. - Database diff --git a/user_guide_src/source/helpers/file_helper.rst b/user_guide_src/source/helpers/file_helper.rst index bfc271eb3..60c5aa98c 100644 --- a/user_guide_src/source/helpers/file_helper.rst +++ b/user_guide_src/source/helpers/file_helper.rst @@ -32,6 +32,9 @@ The path can be a relative or full server path. Returns FALSE (boolean) on failu controller or view files. CodeIgniter uses a front controller so paths are always relative to the main site index. +.. note:: This function is DEPRECATED. Use the native ``file_get_contents()`` + instead. + If your server is running an `open_basedir` restriction this function might not work if you are trying to access a file above the calling script. write_file('path', $data) diff --git a/user_guide_src/source/helpers/security_helper.rst b/user_guide_src/source/helpers/security_helper.rst index b1bcf2b4a..ec0be28b3 100644 --- a/user_guide_src/source/helpers/security_helper.rst +++ b/user_guide_src/source/helpers/security_helper.rst @@ -43,8 +43,10 @@ for a full list of supported algorithms. $str = do_hash($str); // SHA1 $str = do_hash($str, 'md5'); // MD5 -.. note:: This function was formerly named dohash(), which has been - removed in favor of `do_hash()`. +.. note:: This function was formerly named ``dohash()``, which has been + removed in favor of ``do_hash()``. + +.. note:: This function is DEPRECATED. Use the native ``hash()`` instead. strip_image_tags() ================== diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst index 2d23fb00c..19500aa0d 100644 --- a/user_guide_src/source/helpers/string_helper.rst +++ b/user_guide_src/source/helpers/string_helper.rst @@ -36,8 +36,7 @@ alpha, alunum, numeric, nozero, unique, md5, encrypt and sha1 - **unique**: Encrypted with MD5 and uniqid(). Note: The length parameter is not available for this type. Returns a fixed length 32 character string. -- **sha1**: An encrypted random number based on do_hash() from the - :doc:`security helper `. +- **sha1**: An encrypted random number based on ``sha1()``. Usage example -- cgit v1.2.3-24-g4f1b From d09ff35e8c4b7cae6313cc40ec0e6b57b9f52106 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jun 2012 15:46:32 +0300 Subject: Revert 296ab9a06e3c648de56861ad67581236a6dae71a - there's no bug to fix --- user_guide_src/source/changelog.rst | 1 - 1 file changed, 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7180c2d07..a7bf6fa6e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -235,7 +235,6 @@ Bug fixes for 3.0 - Fixed a bug (#1411) - the :doc:`Email library ` used its own short list of MIMEs instead the one from config/mimes.php. - Fixed a bug where the magic_quotes_runtime setting wasn't turned off for PHP 5.3 (where it is indeed deprecated, but not non-existent). - Fixed a bug (#666) - :doc:`Output library `'s set_content_type() method didn't set the document charset. -- Fixed a bug (#1374) - :doc:`Table Library ` was generating an extra td tag at the start of the tr. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 1f26edc61f314a74cd93fcdf688b3780734e0e96 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jun 2012 16:13:54 +0300 Subject: Added a work-around for MSSQL/SQLSRV create_table() with INT column types (column lengths are not supported) --- user_guide_src/source/changelog.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a7bf6fa6e..942a52cdf 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -172,7 +172,7 @@ Bug fixes for 3.0 - 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 returning resource on ``db_pconnect()``. +- Fixed a bug (#406) - SQLSRV DB driver not returning resource on ``db_pconnect()``. - Fixed a bug in CI_Image_lib::gd_loaded() where it was possible for the script execution to end or a PHP E_WARNING message to be emitted. - Fixed a bug in the :doc:`Pagination library ` where when use_page_numbers=TRUE previous link and page 1 link did not have the same url. - Fixed a bug (#561) - Errors in :doc:`XML-RPC Library ` were not properly escaped. @@ -230,7 +230,7 @@ Bug fixes for 3.0 - Fixed a bug (#121) - ``CI_DB_result::row()`` returned an array when there's no actual result to be returned. - Fixed a bug (#319) - SQLSRV's affected_rows() method failed due to a scrollable cursor being created for write-type queries. - Fixed a bug (#356) - PostgreSQL driver didn't have an _update_batch() method, which resulted in fatal error being triggered when update_batch() is used with it. -- Fixed a bug (#862) - create_table() failed on SQLSRV/MSSQL when used with 'IF NOT EXISTS'. +- Fixed a bug (#784, #862) - create_table() failed on SQLSRV/MSSQL when used with 'IF NOT EXISTS'. - Fixed a bug (#1419) - libraries/Driver.php had a static variable that was causing an error. - Fixed a bug (#1411) - the :doc:`Email library ` used its own short list of MIMEs instead the one from config/mimes.php. - Fixed a bug where the magic_quotes_runtime setting wasn't turned off for PHP 5.3 (where it is indeed deprecated, but not non-existent). -- cgit v1.2.3-24-g4f1b From af4d55da04b8d8750b59e04e46463d525237b74b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jun 2012 16:22:35 +0300 Subject: Fix issue #861 (and previous commit, for that matter) --- user_guide_src/source/changelog.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 942a52cdf..801f0e481 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -230,11 +230,12 @@ Bug fixes for 3.0 - Fixed a bug (#121) - ``CI_DB_result::row()`` returned an array when there's no actual result to be returned. - Fixed a bug (#319) - SQLSRV's affected_rows() method failed due to a scrollable cursor being created for write-type queries. - Fixed a bug (#356) - PostgreSQL driver didn't have an _update_batch() method, which resulted in fatal error being triggered when update_batch() is used with it. -- Fixed a bug (#784, #862) - create_table() failed on SQLSRV/MSSQL when used with 'IF NOT EXISTS'. +- Fixed a bug (#784, #862) - :doc:`Database Forge ` method ``create_table()`` failed on SQLSRV/MSSQL when used with 'IF NOT EXISTS'. - Fixed a bug (#1419) - libraries/Driver.php had a static variable that was causing an error. - Fixed a bug (#1411) - the :doc:`Email library ` used its own short list of MIMEs instead the one from config/mimes.php. - Fixed a bug where the magic_quotes_runtime setting wasn't turned off for PHP 5.3 (where it is indeed deprecated, but not non-existent). - Fixed a bug (#666) - :doc:`Output library `'s set_content_type() method didn't set the document charset. +- Fixed a bug (#784, #861) - :doc:`Database Forge ` method ``create_table()`` used to accept constraints for MSSQL/SQLSRV integer-type columns. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From c2c361b9c9dcfd94003d97622d74184f01c0615f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jun 2012 22:06:51 +0300 Subject: Add a changelog note --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 801f0e481..66da20c40 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -106,6 +106,7 @@ Release Date: Not Released - Added MSSQL, SQLSRV support for optimize_table() in :doc:`Database Utility `. - Improved CUBRID support for list_databases() in :doc:`Database Utility ` (until now only the currently used database was returned). - Added unbuffered_row() method for getting a row without prefetching whole result (consume less memory). + - Added port handling support for MSSQL on UNIX-based systems. - Libraries -- cgit v1.2.3-24-g4f1b From b2457b7958d7f342507a2516198c87d8fb1d8f76 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 Jun 2012 23:36:56 +0300 Subject: Add ics files support to mimes.php (issue #1441) --- user_guide_src/source/changelog.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 66da20c40..256de9548 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -30,9 +30,10 @@ Release Date: Not Released - Added support for 3gp, 3g2, mp4, wmv, f4v, vlc Video files to mimes.php. - Added support for m4a, aac, m4u, xspf, au, ac3, flac, ogg Audio files to mimes.php. - Added support for kmz and kml (Google Earth) files to mimes.php. - - Added Romanian and Greek characters in foreign_characters.php + - Added support for ics Calendar files to mimes.php + - Updated support for xml ('application/xml') and xsl ('application/xml', 'text/xsl') files in mimes.php. - Updated support for doc files in mimes.php. - - Added application/xml for xml and application/xml, text/xsl for xsl in mimes.php. + - Added Romanian and Greek characters in foreign_characters.php. - Changed logger to only chmod when file is first created. - Removed previously deprecated SHA1 Library. - Removed previously deprecated use of ``$autoload['core']`` in application/config/autoload.php. -- cgit v1.2.3-24-g4f1b From 082ee2b054b0d61ac02fea3deb704290e8d6021a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 8 Jun 2012 15:26:34 +0300 Subject: Added MSSQL/SQLSRV field escaping support with QUOTE_IDENTIFIER detection (issue #706) --- user_guide_src/source/changelog.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 256de9548..7a6f8fa37 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -88,10 +88,16 @@ Release Date: Not Released - Removed protect_identifiers() and renamed internal method _protect_identifiers() to it instead - it was just an alias. - MySQL and MySQLi drivers now require at least MySQL version 5.1. - db_set_charset() now only requires one parameter (collation was only needed due to legacy support for MySQL versions prior to 5.1). - - Added DSN string support for CUBRID. - - Added persistent connections support for CUBRID. - - Added random ordering support for MSSQL, SQLSRV. - Added support for SQLite3 database driver. + - Improved support of the CUBRID driver, including: + - Added DSN string support. + - Added persistent connections support. + - Improved list_databases() in :doc:`Database Utility ` (until now only the currently used database was returned). + - Improved support of the MSSQL and SQLSRV drivers, including: + - Added random ordering support. + - Added support for optimize_table() in :doc:`Database Utility `. + - Added escaping with QUOTE_IDENTIFIER setting detection. + - Added port handling support for UNIX-based systems (MSSQL driver). - Improved support of the Oracle (OCI8) driver, including: - Added DSN string support (Easy Connect and TNS). - Added support for dropping tables to :doc:`Database Forge `. @@ -104,10 +110,7 @@ Release Date: Not Released - Added SQLite support for drop_table() in :doc:`Database Forge `. - Added ODBC support for create_database(), drop_database() and drop_table() in :doc:`Database Forge `. - Added PDO support for create_database(), drop_database and drop_table() in :doc:`Database Forge `. - - Added MSSQL, SQLSRV support for optimize_table() in :doc:`Database Utility `. - - Improved CUBRID support for list_databases() in :doc:`Database Utility ` (until now only the currently used database was returned). - Added unbuffered_row() method for getting a row without prefetching whole result (consume less memory). - - Added port handling support for MSSQL on UNIX-based systems. - Libraries @@ -238,6 +241,7 @@ Bug fixes for 3.0 - Fixed a bug where the magic_quotes_runtime setting wasn't turned off for PHP 5.3 (where it is indeed deprecated, but not non-existent). - Fixed a bug (#666) - :doc:`Output library `'s set_content_type() method didn't set the document charset. - Fixed a bug (#784, #861) - :doc:`Database Forge ` method ``create_table()`` used to accept constraints for MSSQL/SQLSRV integer-type columns. +- Fixed a bug (#706) - SQLSRV/MSSSQL didn't escape field names. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 9637b40ca9e9ac1cdce2b895d3db09848a6eef76 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 8 Jun 2012 15:39:24 +0300 Subject: escape_identifiers() to accept arrays as well --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7a6f8fa37..0880247fc 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -107,6 +107,7 @@ Release Date: Not Released - num_rows() is now only called explicitly by the developer and no longer re-executes statements. - Added replace() support for SQLite. - Renamed internal method _escape_identifiers() to escape_identifiers(). + - Updated escape_identifiers() to accept an array of fields as well as strings. - Added SQLite support for drop_table() in :doc:`Database Forge `. - Added ODBC support for create_database(), drop_database() and drop_table() in :doc:`Database Forge `. - Added PDO support for create_database(), drop_database and drop_table() in :doc:`Database Forge `. -- cgit v1.2.3-24-g4f1b From d25c589dc3bbfc83fb59bbeb1a3046b99bf694f8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 8 Jun 2012 16:23:01 +0300 Subject: Add OFFSET support for SQL Server 2012 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0880247fc..25b42b2e0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -98,6 +98,7 @@ Release Date: Not Released - Added support for optimize_table() in :doc:`Database Utility `. - Added escaping with QUOTE_IDENTIFIER setting detection. - Added port handling support for UNIX-based systems (MSSQL driver). + - Added OFFSET support for SQL Server 2012 and above. - Improved support of the Oracle (OCI8) driver, including: - Added DSN string support (Easy Connect and TNS). - Added support for dropping tables to :doc:`Database Forge `. -- cgit v1.2.3-24-g4f1b From f5d1fd2ce8bfa049c8049184ac6d385d0f70fe29 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Fri, 8 Jun 2012 23:37:33 +0200 Subject: Updated the upgrade guide to specify which are the supported timezones. --- user_guide_src/source/installation/upgrade_300.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 503e5366c..e86ef67da 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -46,7 +46,8 @@ Step 5: Change your use of the Date helper's now() function =========================================================== Function now() has been modified. You can see the changes in :doc:`Date Helper <../helpers/date_helper>` -You must replace $config['time_reference'] with $config['timezone'] in your config.php file. +You must replace $config['time_reference'] with $config['timezone'] in your config.php file. You can select all +PHP supported timezones, listed here: `PHP's supported timezones `_. Step 6: Move your errors folder =============================== -- cgit v1.2.3-24-g4f1b From 9e674f74ec4f36f11f30e2f84a48ef6cea33a9d9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 9 Jun 2012 21:02:52 +0300 Subject: Cleanup the new Redis cache driver and add a changelog entry for it --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 25b42b2e0..17b360b62 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -143,6 +143,7 @@ Release Date: Not Released - Added all_flashdata() method to session class. Returns an associative array of only flashdata. - Allowed for setting table class defaults in a config file. - Added a Wincache driver to the :doc:`Caching Library `. + - Added a Redis driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - Input library now supports IPv6. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. -- cgit v1.2.3-24-g4f1b From e15e3dde9dca15e2d65f098010d3fb7004cef5e7 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Sat, 9 Jun 2012 23:52:27 +0200 Subject: Fixed timezone change in index.php Now it does not ever change the local timezone, and it adds the option to get the 'local' time() --- user_guide_src/source/helpers/date_helper.rst | 3 ++- user_guide_src/source/installation/upgrade_300.rst | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index b6c6ed4bb..33b39bd5b 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -21,7 +21,8 @@ now() ===== Returns the current time as a Unix timestamp, based on the "timezone" parameter. -All PHP available timezones are supported. +All PHP available timezones are supported. You can also use 'local' timezone, and +it will return time(). .. php:method:: now($timezone = NULL) diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index e86ef67da..c2c3899ee 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -47,7 +47,8 @@ Step 5: Change your use of the Date helper's now() function Function now() has been modified. You can see the changes in :doc:`Date Helper <../helpers/date_helper>` You must replace $config['time_reference'] with $config['timezone'] in your config.php file. You can select all -PHP supported timezones, listed here: `PHP's supported timezones `_. +PHP supported timezones, listed here: `Supported timezones `_. You can also +use 'local' if you want to get time(). Step 6: Move your errors folder =============================== -- cgit v1.2.3-24-g4f1b From 5a257187c4ca09ea61c19999bf061cec3f224cc2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 10 Jun 2012 06:18:14 +0300 Subject: Merge branch 2.1-stable into develop --- user_guide_src/source/changelog.rst | 6 +++++- user_guide_src/source/installation/upgrading.rst | 3 ++- user_guide_src/source/libraries/form_validation.rst | 1 + user_guide_src/source/libraries/input.rst | 3 +++ user_guide_src/source/libraries/sessions.rst | 2 +- user_guide_src/source/libraries/uri.rst | 2 +- 6 files changed, 13 insertions(+), 4 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 17b360b62..70d622b4b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -145,7 +145,6 @@ Release Date: Not Released - Added a Wincache driver to the :doc:`Caching Library `. - Added a Redis driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - - Input library now supports IPv6. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Core @@ -256,6 +255,8 @@ Release Date: Not Released - Libraries - Further improved MIME type detection in the :doc:`File Uploading Library `. + - Added support for IPv6 to the :doc:`Input Library `. + - Added support for the IP format parameter to the :doc:`Form Validation Library `. - Helpers - url_title() performance and output improved. You can now use any string as the word delimiter, but 'dash' and 'underscore' are still supported. @@ -270,6 +271,9 @@ Bug fixes for 2.1.1 - Fixed a bug - When database caching was enabled, $this->db->query() checked the cache before binding variables which resulted in cached queries never being found. - Fixed a bug - CSRF cookie value was allowed to be any (non-empty) string before being written to the output, making code injection a risk. - Fixed a bug (#726) - PDO put a 'dbname' argument in it's connection string regardless of the database platform in use, which made it impossible to use SQLite. +- Fixed a bug - CI_DB_pdo_driver::num_rows() was not returning properly value with SELECT queries, cause it was relying on PDOStatement::rowCount(). +- Fixed a bug (#1059) - CI_Image_lib::clear() was not correctly clearing all necessary object properties, namely width and height. +- Fixed a bud (#1387) - Active Record's ``from()`` method didn't escape table aliases. Version 2.1.0 ============= diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 2badffc93..255c6a557 100644 --- a/user_guide_src/source/installation/upgrading.rst +++ b/user_guide_src/source/installation/upgrading.rst @@ -5,7 +5,8 @@ Upgrading From a Previous Version Please read the upgrade notes corresponding to the version you are upgrading from. -- :doc:`Upgrading from 2.0.3 to 2.1.0 ` +- :doc:`Upgrading from 2.1.1 to 3.0.0 ` +- :doc:`Upgrading from 2.1.0 to 2.1.1 ` - :doc:`Upgrading from 2.0.2 to 2.0.3 ` - :doc:`Upgrading from 2.0.1 to 2.0.2 ` - :doc:`Upgrading from 2.0 to 2.0.1 ` diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 028b61c4c..3c0e6eda4 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -884,6 +884,7 @@ Rule Parameter Description **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. + Accepts an optional parameter of 'ipv4' or 'ipv6' to specify an IP format. **valid_base64** No Returns FALSE if the supplied string contains anything other than valid Base64 characters. ========================= ========== ============================================================================================= ======================= diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 432bac3c7..7f995f050 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -242,6 +242,9 @@ validates the IP automatically. echo 'Valid'; } +Accepts an optional second string parameter of 'ipv4' or 'ipv6' to specify +an IP format. The default checks for both formats. + $this->input->user_agent() =========================== diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index e8332ee97..5400524a9 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -245,7 +245,7 @@ session class:: CREATE TABLE IF NOT EXISTS `ci_sessions` ( session_id varchar(40) DEFAULT '0' NOT NULL, - ip_address varchar(16) DEFAULT '0' NOT NULL, + ip_address varchar(45) DEFAULT '0' NOT NULL, user_agent varchar(120) NOT NULL, last_activity int(10) unsigned DEFAULT 0 NOT NULL, user_data text NOT NULL, diff --git a/user_guide_src/source/libraries/uri.rst b/user_guide_src/source/libraries/uri.rst index cdd76e322..bb959b002 100644 --- a/user_guide_src/source/libraries/uri.rst +++ b/user_guide_src/source/libraries/uri.rst @@ -146,7 +146,7 @@ full URL:: The function would return this:: - /news/local/345 + news/local/345 $this->uri->ruri_string() ========================== -- cgit v1.2.3-24-g4f1b From bf94058d537efc78ed2df7009db8b3261ff44619 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 10 Jun 2012 07:05:05 +0300 Subject: Fix issue #1452 --- user_guide_src/source/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 70d622b4b..5b2f59e7e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -244,6 +244,8 @@ Bug fixes for 3.0 - Fixed a bug (#666) - :doc:`Output library `'s set_content_type() method didn't set the document charset. - Fixed a bug (#784, #861) - :doc:`Database Forge ` method ``create_table()`` used to accept constraints for MSSQL/SQLSRV integer-type columns. - Fixed a bug (#706) - SQLSRV/MSSSQL didn't escape field names. +- Fixed a bug (#1452) - protect_identifiers() didn't properly detect identifiers with spaces in their names. +- Fixed a bug where protect_identifiers() ignored it's extra arguments when the value passed to it is an array. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From d454f0e413ba6df6494b6c0da4d32fac8a17de1c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 10 Jun 2012 14:51:04 +0300 Subject: Add BETWEEN to _has_operator() --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5b2f59e7e..027163db7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -246,6 +246,7 @@ Bug fixes for 3.0 - Fixed a bug (#706) - SQLSRV/MSSSQL didn't escape field names. - Fixed a bug (#1452) - protect_identifiers() didn't properly detect identifiers with spaces in their names. - Fixed a bug where protect_identifiers() ignored it's extra arguments when the value passed to it is an array. +- Fixed a bug where _has_operator() didn't detect BETWEEN. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 37ec30c6d89448cd11c24788c01ff06326de128b Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Mon, 11 Jun 2012 09:26:33 +0200 Subject: changelog --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/libraries/file_uploading.rst | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 027163db7..984183a13 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -146,6 +146,7 @@ Release Date: Not Released - Added a Redis driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. + - Added a index parameter to the data() function in the Upload library. - Core diff --git a/user_guide_src/source/libraries/file_uploading.rst b/user_guide_src/source/libraries/file_uploading.rst index d573fc770..414d84f0b 100644 --- a/user_guide_src/source/libraries/file_uploading.rst +++ b/user_guide_src/source/libraries/file_uploading.rst @@ -287,6 +287,10 @@ data related to the file you uploaded. Here is the array prototype:: [image_size_str] => width="800" height="200" ) +To return one element from the array:: + + $this->upload->data('file_name'); // Returns: mypic.jpg + Explanation *********** -- cgit v1.2.3-24-g4f1b From 650b4c000242ad90ed1ca1e56bdee7d42dbdedaa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jun 2012 12:07:15 +0300 Subject: Remove unused qb_order property + other minor changes --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 984183a13..259f4e732 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -146,7 +146,7 @@ Release Date: Not Released - Added a Redis driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - - Added a index parameter to the data() function in the Upload library. + - Added an "index" parameter to the data() method in the :doc:`Upload library `. - Core -- cgit v1.2.3-24-g4f1b From 71379ca89226fe8af0314a8b70e5dc0f57367255 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jun 2012 16:12:43 +0300 Subject: Add OFFSET support for SQL Server 2005+ in MSSQL/SQLSRV --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 259f4e732..03b541e3d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -98,7 +98,7 @@ Release Date: Not Released - Added support for optimize_table() in :doc:`Database Utility `. - Added escaping with QUOTE_IDENTIFIER setting detection. - Added port handling support for UNIX-based systems (MSSQL driver). - - Added OFFSET support for SQL Server 2012 and above. + - Added OFFSET support for SQL Server 2005 and above. - Improved support of the Oracle (OCI8) driver, including: - Added DSN string support (Easy Connect and TNS). - Added support for dropping tables to :doc:`Database Forge `. -- cgit v1.2.3-24-g4f1b From df242193f3e785f4c9b802be3432f373fbc34a14 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jun 2012 16:16:49 +0300 Subject: Alter documentation on requirements for the SQLSRV driver --- user_guide_src/source/general/requirements.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/general/requirements.rst b/user_guide_src/source/general/requirements.rst index d97b7b4b2..d9edfba6d 100644 --- a/user_guide_src/source/general/requirements.rst +++ b/user_guide_src/source/general/requirements.rst @@ -4,5 +4,6 @@ Server Requirements - `PHP `_ version 5.2.4 or newer. - A Database is required for most web application programming. Current - supported databases are MySQL (5.1+), MySQLi, MS SQL, SQLSRV, Oracle, - PostgreSQL, SQLite, SQLite3, CUBRID, Interbase, ODBC and PDO. + supported databases are MySQL (5.1+), MySQLi, Oracle, PostgreSQL, + MS SQL, SQLSRV (SQL Server 2005+), SQLite, SQLite3, CUBRID, Interbase, + ODBC and PDO. -- cgit v1.2.3-24-g4f1b From e6302791d229e42c8fc42a3982a10eb63508197f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jun 2012 21:28:22 +0300 Subject: Fix a join() issue --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 03b541e3d..5627f0221 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -248,6 +248,7 @@ Bug fixes for 3.0 - Fixed a bug (#1452) - protect_identifiers() didn't properly detect identifiers with spaces in their names. - Fixed a bug where protect_identifiers() ignored it's extra arguments when the value passed to it is an array. - Fixed a bug where _has_operator() didn't detect BETWEEN. +- Fixed a bug where :doc:`Query Builder `'s join failed with identifiers containing dashes. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 5d28176a76355b230f1c4e1858475def4e34fa4c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jun 2012 22:05:40 +0300 Subject: Fix issue #1264 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5627f0221..fb137e460 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -249,6 +249,7 @@ Bug fixes for 3.0 - Fixed a bug where protect_identifiers() ignored it's extra arguments when the value passed to it is an array. - Fixed a bug where _has_operator() didn't detect BETWEEN. - Fixed a bug where :doc:`Query Builder `'s join failed with identifiers containing dashes. +- Fixed a bug (#1264) - :doc:`Database Forge ` and :doc:`Database Utilities ` didn't update/reset the databases and tables list cache when a table or a database is created, dropped or renamed. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 428702387ca071db4686ec6d6c60bd35b01c33e4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 01:30:20 +0300 Subject: join() with multiple conditions and optional escape parameter --- user_guide_src/source/changelog.rst | 50 ++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 23 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index fb137e460..2c76ea43f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -63,14 +63,17 @@ Release Date: Not Released - Database - - Renamed the Active Record class to Query Builder to remove confusion with the Active Record design pattern. - - Added the ability to insert objects with insert_batch() in :doc:`Query Builder `. - - Added new :doc:`Query Builder ` methods that return the SQL string of queries without executing them: get_compiled_select(), get_compiled_insert(), get_compiled_update(), get_compiled_delete(). - - Adding $escape parameter to the order_by() method, this enables ordering by custom fields. + - :doc:`Query Builder ` changes include: + - Renamed the Active Record class to Query Builder to remove confusion with the Active Record design pattern. + - Added the ability to insert objects with insert_batch(). + - Added new methods that return the SQL string of queries without executing them: get_compiled_select(), get_compiled_insert(), get_compiled_update(), get_compiled_delete(). + - Added an optional order_by() parameter that allows to disable escaping (useful for custom fields). + - Added an optional join() parameter that allows to disable escaping. + - Added support for join() with multiple conditions. - Improved support for the MySQLi driver, including: - - OOP style of the PHP extension is now used, instead of the procedural aliases. - - Server version checking is now done via ``mysqli::$server_info`` instead of running an SQL query. - - Added persistent connections support for PHP >= 5.3. + - OOP style of the PHP extension is now used, instead of the procedural aliases. + - Server version checking is now done via ``mysqli::$server_info`` instead of running an SQL query. + - Added persistent connections support for PHP >= 5.3. - Added 'dsn' configuration setting for drivers that support DSN strings (PDO, PostgreSQL, Oracle, ODBC, CUBRID). - Improved PDO database support. - Added Interbase/Firebird database support via the "interbase" driver. @@ -78,14 +81,16 @@ Release Date: Not Released - Replaced the _error_message() and _error_number() methods with error(), that returns an array containing the last database error code and message. - Improved version() implementation so that drivers that have a native function to get the version number don't have to be defined in the core DB_driver class. - Improved support of the PostgreSQL driver, including: - - pg_version() is now used to get the database version number, when possible. - - Added db_set_charset() support. - - Added _optimize_table() support for the :doc:`Database Utility Class ` (rebuilds table indexes). - - Added boolean data type support in escape(). - - Added update_batch() support. - - Removed limit() and order_by() support for UPDATE and DELETE queries in as PostgreSQL does not support those features. + - pg_version() is now used to get the database version number, when possible. + - Added db_set_charset() support. + - Added _optimize_table() support for the :doc:`Database Utility Class ` (rebuilds table indexes). + - Added boolean data type support in escape(). + - Added update_batch() support. + - Removed limit() and order_by() support for UPDATE and DELETE queries in as PostgreSQL does not support those features. - Added a constructor to the DB_result class and moved all driver-specific properties and logic out of the base DB_driver class to allow better abstraction. - Removed protect_identifiers() and renamed internal method _protect_identifiers() to it instead - it was just an alias. + - Renamed internal method _escape_identifiers() to escape_identifiers(). + - Updated escape_identifiers() to accept an array of fields as well as strings. - MySQL and MySQLi drivers now require at least MySQL version 5.1. - db_set_charset() now only requires one parameter (collation was only needed due to legacy support for MySQL versions prior to 5.1). - Added support for SQLite3 database driver. @@ -100,16 +105,15 @@ Release Date: Not Released - Added port handling support for UNIX-based systems (MSSQL driver). - Added OFFSET support for SQL Server 2005 and above. - Improved support of the Oracle (OCI8) driver, including: - - Added DSN string support (Easy Connect and TNS). - - Added support for dropping tables to :doc:`Database Forge `. - - Added support for listing database schemas to :doc:`Database Utilities `. - - Generally improved for speed and cleaned up all of its components. - - *Row* result methods now really only fetch only the needed number of rows, instead of depending entirely on result(). - - num_rows() is now only called explicitly by the developer and no longer re-executes statements. - - Added replace() support for SQLite. - - Renamed internal method _escape_identifiers() to escape_identifiers(). - - Updated escape_identifiers() to accept an array of fields as well as strings. - - Added SQLite support for drop_table() in :doc:`Database Forge `. + - Added DSN string support (Easy Connect and TNS). + - Added support for drop_table() in :doc:`Database Forge `. + - Added support for list_databases() in :doc:`Database Utilities `. + - Generally improved for speed and cleaned up all of its components. + - *Row* result methods now really only fetch only the needed number of rows, instead of depending entirely on result(). + - num_rows() is now only called explicitly by the developer and no longer re-executes statements. + - Improved support of the Sqlite driver, including: + - Added support for replace() in :doc:`Query Builder `. + - Added support for drop_table() in :doc:`Database Forge `. - Added ODBC support for create_database(), drop_database() and drop_table() in :doc:`Database Forge `. - Added PDO support for create_database(), drop_database and drop_table() in :doc:`Database Forge `. - Added unbuffered_row() method for getting a row without prefetching whole result (consume less memory). -- cgit v1.2.3-24-g4f1b From c73df1de471d4dc849942e718e17d97a04c6fd20 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 01:43:03 +0300 Subject: Add changelog entry for issue #7 --- user_guide_src/source/changelog.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2c76ea43f..6d2971103 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -252,8 +252,9 @@ Bug fixes for 3.0 - Fixed a bug (#1452) - protect_identifiers() didn't properly detect identifiers with spaces in their names. - Fixed a bug where protect_identifiers() ignored it's extra arguments when the value passed to it is an array. - Fixed a bug where _has_operator() didn't detect BETWEEN. -- Fixed a bug where :doc:`Query Builder `'s join failed with identifiers containing dashes. +- Fixed a bug where :doc:`Query Builder `'s join() method failed with identifiers containing dashes. - Fixed a bug (#1264) - :doc:`Database Forge ` and :doc:`Database Utilities ` didn't update/reset the databases and tables list cache when a table or a database is created, dropped or renamed. +- Fixed a bug (#7) - :doc:`Query Builder `'s join() method only escaped one set of conditions. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 079fbfcde095230f304e889217f897031a948f61 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 02:26:58 +0300 Subject: Changed APPPATH, BASEPATH and VIEWPATH to be absolute paths (fixes issue #1321) and removed EXT constant --- user_guide_src/source/changelog.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 6d2971103..ebf29791b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -33,15 +33,18 @@ Release Date: Not Released - Added support for ics Calendar files to mimes.php - Updated support for xml ('application/xml') and xsl ('application/xml', 'text/xsl') files in mimes.php. - Updated support for doc files in mimes.php. + - Added some more doctypes. - Added Romanian and Greek characters in foreign_characters.php. - Changed logger to only chmod when file is first created. - Removed previously deprecated SHA1 Library. - Removed previously deprecated use of ``$autoload['core']`` in application/config/autoload.php. Only entries in ``$autoload['libraries']`` are auto-loaded now. - - Added some more doctypes. + - Removed previously deprecated EXT constant. - Updated all classes to be written in PHP 5 style, with visibility declarations and no ``var`` usage for properties. - Moved error templates to "application/views/errors" - - Global config files are loaded first, then environment ones. Environment config keys overwrite base ones, allowing to only set the keys we want changed per Env. + - Global config files are loaded first, then environment ones. Environment config keys overwrite base ones, allowing to only set the keys we want changed per environment. + - Changed detection of ``$view_folder`` so that if it's not found in the current path, it will now also be searched for under the application folder. + - Path constants BASEPATH, APPPATH and VIEWPATH are now (internally) defined as absolute paths. - Helpers @@ -255,6 +258,7 @@ Bug fixes for 3.0 - Fixed a bug where :doc:`Query Builder `'s join() method failed with identifiers containing dashes. - Fixed a bug (#1264) - :doc:`Database Forge ` and :doc:`Database Utilities ` didn't update/reset the databases and tables list cache when a table or a database is created, dropped or renamed. - Fixed a bug (#7) - :doc:`Query Builder `'s join() method only escaped one set of conditions. +- Fixed a bug (#1321) - Core Exceptions class couldn't find the errors/ folder in some cases. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 782de1101f37b21ff2183fde5b2ed8569d8c287d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 03:04:50 +0300 Subject: Added MySQLi backup() support --- user_guide_src/source/changelog.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ebf29791b..f91a1dc99 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -77,6 +77,7 @@ Release Date: Not Released - OOP style of the PHP extension is now used, instead of the procedural aliases. - Server version checking is now done via ``mysqli::$server_info`` instead of running an SQL query. - Added persistent connections support for PHP >= 5.3. + - Added support for backup() in :doc:`Database Utilities `. - Added 'dsn' configuration setting for drivers that support DSN strings (PDO, PostgreSQL, Oracle, ODBC, CUBRID). - Improved PDO database support. - Added Interbase/Firebird database support via the "interbase" driver. @@ -86,7 +87,7 @@ Release Date: Not Released - Improved support of the PostgreSQL driver, including: - pg_version() is now used to get the database version number, when possible. - Added db_set_charset() support. - - Added _optimize_table() support for the :doc:`Database Utility Class ` (rebuilds table indexes). + - Added support for optimize_table() in :doc:`Database Utilities ` (rebuilds table indexes). - Added boolean data type support in escape(). - Added update_batch() support. - Removed limit() and order_by() support for UPDATE and DELETE queries in as PostgreSQL does not support those features. @@ -114,7 +115,7 @@ Release Date: Not Released - Generally improved for speed and cleaned up all of its components. - *Row* result methods now really only fetch only the needed number of rows, instead of depending entirely on result(). - num_rows() is now only called explicitly by the developer and no longer re-executes statements. - - Improved support of the Sqlite driver, including: + - Improved support of the SQLite driver, including: - Added support for replace() in :doc:`Query Builder `. - Added support for drop_table() in :doc:`Database Forge `. - Added ODBC support for create_database(), drop_database() and drop_table() in :doc:`Database Forge `. -- cgit v1.2.3-24-g4f1b From c9195a75e7d3d06524c9a5ce97f4f4c30c69019b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 03:49:03 +0300 Subject: Add changelog for pull #1017 --- user_guide_src/source/changelog.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f91a1dc99..f342abf15 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -256,10 +256,11 @@ Bug fixes for 3.0 - Fixed a bug (#1452) - protect_identifiers() didn't properly detect identifiers with spaces in their names. - Fixed a bug where protect_identifiers() ignored it's extra arguments when the value passed to it is an array. - Fixed a bug where _has_operator() didn't detect BETWEEN. -- Fixed a bug where :doc:`Query Builder `'s join() method failed with identifiers containing dashes. +- Fixed a bug in :doc:`Query Builder `'s join() method where it failed with identifiers containing dashes. - Fixed a bug (#1264) - :doc:`Database Forge ` and :doc:`Database Utilities ` didn't update/reset the databases and tables list cache when a table or a database is created, dropped or renamed. - Fixed a bug (#7) - :doc:`Query Builder `'s join() method only escaped one set of conditions. - Fixed a bug (#1321) - Core Exceptions class couldn't find the errors/ folder in some cases. +- Fixed a bug in the File-based :doc:`Cache Library ` driver's get_metadata() method where a non-existent array key was accessed for the TTL value. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 5a1e5e34207b9b30ff42200158074953ca1cabab Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 11:28:26 +0300 Subject: Add support for the anchor 'rel' attribute in the Pagination library --- user_guide_src/source/changelog.rst | 5 +++-- user_guide_src/source/libraries/pagination.rst | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f342abf15..82116c9b1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -154,7 +154,8 @@ Release Date: Not Released - Added a Redis driver to the :doc:`Caching Library `. - Added dsn (delivery status notification) option to the :doc:`Email Library `. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - - Added an "index" parameter to the data() method in the :doc:`Upload library `. + - Added an "index" parameter to the data() method in the :doc:`Upload Library `. + - Added support for the anchor "rel" attribute in the :doc:`Pagination Library `. - Core @@ -177,7 +178,7 @@ Bug fixes for 3.0 - Fixed a bug where ``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 Query Builder 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 (#737, #75) - :doc:`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. diff --git a/user_guide_src/source/libraries/pagination.rst b/user_guide_src/source/libraries/pagination.rst index f1653c913..560755fb6 100644 --- a/user_guide_src/source/libraries/pagination.rst +++ b/user_guide_src/source/libraries/pagination.rst @@ -254,3 +254,27 @@ Adding a class to every anchor If you want to add a class attribute to every link rendered by the pagination class, you can set the config "anchor_class" equal to the classname you want. + +:: + + $config['anchor_class'] = 'myclass'; // class="myclass" + +********************************** +Changing the "rel" attribute value +********************************** + +By default, the rel attribute will be automatically put under the +following conditions: + +- rel="start" for the "first" link +- rel="prev" for the "previous" link +- rel="next" for the "next" link + +If you want to disable the rel attribute, or change its value, you +can set the 'attr_rel' config option:: + + // Disable + $config['attr_rel'] = FALSE; + + // Use a custom value on all anchors + $config['attr_rel'] = 'custom_value'; // produces: rel="custom_value" \ No newline at end of file -- cgit v1.2.3-24-g4f1b From f696c1fe8df29d54a933804a6f4d182a5a59c7a2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 12:14:51 +0300 Subject: Fix issue #1202 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 82116c9b1..4962caa7d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -262,6 +262,7 @@ Bug fixes for 3.0 - Fixed a bug (#7) - :doc:`Query Builder `'s join() method only escaped one set of conditions. - Fixed a bug (#1321) - Core Exceptions class couldn't find the errors/ folder in some cases. - Fixed a bug in the File-based :doc:`Cache Library ` driver's get_metadata() method where a non-existent array key was accessed for the TTL value. +- Fixed a bug (#1202) - :doc:`Encryption Library ` encode_from_legacy() didn't set back the encrypt mode on failure. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 4e9538fe19b09c0dc588542cfb7f793348b83bf7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 14:16:53 +0300 Subject: Fix issue #145 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4962caa7d..ab3e01394 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -263,6 +263,7 @@ Bug fixes for 3.0 - Fixed a bug (#1321) - Core Exceptions class couldn't find the errors/ folder in some cases. - Fixed a bug in the File-based :doc:`Cache Library ` driver's get_metadata() method where a non-existent array key was accessed for the TTL value. - Fixed a bug (#1202) - :doc:`Encryption Library ` encode_from_legacy() didn't set back the encrypt mode on failure. +- Fixed a bug (#145) - compile_binds() failed when the bind marker was present in a literal string within the query. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From fe8f5e25c8127c0ff7ebb77dd5f9b982e9eb9270 Mon Sep 17 00:00:00 2001 From: Kevin Wood-Friend Date: Tue, 12 Jun 2012 09:56:00 -0400 Subject: Updated changelog for set_rules() accepting an array of rules, as well as a string. --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ab3e01394..33b413163 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -147,6 +147,7 @@ Release Date: Not Released - _execute() now considers input data to be invalid if a specified rule is not found. - Removed method is_numeric() as it exists as a native PHP function and _execute() will find and use that (the 'is_numeric' rule itself is deprecated since 1.6.1). - Native PHP functions used as rules can now accept an additional parameter, other than the data itself. + - Updated set_rules() to accept an array of rules as well as a string. - Changed the :doc:`Session Library ` to select only one row when using database sessions. - Added all_flashdata() method to session class. Returns an associative array of only flashdata. - Allowed for setting table class defaults in a config file. -- cgit v1.2.3-24-g4f1b From feb14dac4e7a417a48344a5188a8ad8074871df4 Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Tue, 12 Jun 2012 16:09:36 +0200 Subject: Changed the config parameter. The session's _get_time() function has also changed. --- user_guide_src/source/helpers/date_helper.rst | 6 ++---- user_guide_src/source/installation/upgrade_300.rst | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 33b39bd5b..7bbfd4f15 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -30,11 +30,9 @@ it will return time(). :returns: integer :: + echo now("Australia/Victoria"); - $tz = "Australia/Victoria"; - echo now($tz); - -If a timezone is not provided, it will return time() based on "timezone" setting. +If a timezone is not provided, it will return time() based on "time_reference" setting. mdate() ======= diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index c2c3899ee..debf9662c 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -45,9 +45,8 @@ need to rename the `$active_record` variable to `$query_builder`. Step 5: Change your use of the Date helper's now() function =========================================================== -Function now() has been modified. You can see the changes in :doc:`Date Helper <../helpers/date_helper>` -You must replace $config['time_reference'] with $config['timezone'] in your config.php file. You can select all -PHP supported timezones, listed here: `Supported timezones `_. You can also +Function now() has been modified. You can see the changes in :doc:`Date Helper <../helpers/date_helper>`. +You can now select all PHP supported timezones in the `time_reference` setting, listed here: `Supported timezones `_. You can also use 'local' if you want to get time(). Step 6: Move your errors folder -- cgit v1.2.3-24-g4f1b From f9311136d9f821b7b0b1f2fa7c933f51803d4f96 Mon Sep 17 00:00:00 2001 From: Kevin Wood-Friend Date: Tue, 12 Jun 2012 10:57:57 -0400 Subject: Updated Form Validation's documentation for set_rules() now accepting an array of rules --- user_guide_src/source/libraries/form_validation.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 3c0e6eda4..3bcad7ba6 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -304,6 +304,10 @@ Give it a try! Submit your form without the proper data and you'll see new error messages that correspond to your new rules. There are numerous rules available which you can read about in the validation reference. +.. note:: You can also pass an array of rules to set_rules(), instead of a string. Example:: + + $this->form_validation->set_rules('username', 'Username', array('required', 'min_length[5]')); + Prepping Data ============= @@ -935,7 +939,7 @@ $this->form_validation->set_rules(); :param string $field: The field name :param string $label: The field label - :param string $rules: The rules, seperated by a pipe "|" + :param mixed $rules: The rules, as a string with rules separated by a pipe "|", or an array or rules. :rtype: Object Permits you to set validation rules, as described in the tutorial -- cgit v1.2.3-24-g4f1b From 6984d153f68f1f89fa6800143498cc4914441d66 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 13 Jun 2012 10:10:17 +0300 Subject: Add a changelog entry --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 33b413163..e955209b1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -265,6 +265,7 @@ Bug fixes for 3.0 - Fixed a bug in the File-based :doc:`Cache Library ` driver's get_metadata() method where a non-existent array key was accessed for the TTL value. - Fixed a bug (#1202) - :doc:`Encryption Library ` encode_from_legacy() didn't set back the encrypt mode on failure. - Fixed a bug (#145) - compile_binds() failed when the bind marker was present in a literal string within the query. +- Fixed a bug in protect_identifiers() where if passed along with the field names, operators got escaped as well. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 9cf12d1de76c2696233a437e0cdc7266bb846ae6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 13 Jun 2012 10:19:59 +0300 Subject: Fix docs for Input library (issue #1465) --- user_guide_src/source/libraries/input.rst | 37 +++++++++---------------------- 1 file changed, 10 insertions(+), 27 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 7f995f050..8c6f7c849 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -42,14 +42,14 @@ this:: Please refer to the :doc:`Security class ` documentation for information on using XSS Filtering in your application. -Using POST, COOKIE, or SERVER Data -================================== +Using POST, GET, COOKIE, or SERVER Data +======================================= -CodeIgniter comes with three helper functions that let you fetch POST, +CodeIgniter comes with four helper methods that let you fetch POST, GET, COOKIE or SERVER items. The main advantage of using the provided functions rather than fetching an item directly ($_POST['something']) -is that the functions will check to see if the item is set and return -false (boolean) if not. This lets you conveniently use data without +is that the methods will check to see if the item is set and return +NULL if not. This lets you conveniently use data without having to test whether an item exists first. In other words, normally you might do something like this:: @@ -73,8 +73,8 @@ looking for:: $this->input->post('some_data'); -The function returns FALSE (boolean) if the item you are attempting to -retrieve does not exist. +The function returns NULL if the item you are attempting to retrieve +does not exist. The second optional parameter lets you run the data through the XSS filter. It's enabled by setting the second parameter to boolean TRUE; @@ -130,7 +130,9 @@ $this->input->cookie() This function is identical to the post function, only it fetches cookie data:: - $this->input->cookie('some_data', TRUE); + $this->input->cookie('some_cookie'); + $this->input->cookie('some_cookie, TRUE); // with XSS filter + $this->input->server() ====================== @@ -195,25 +197,6 @@ parameters:: $this->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure); -$this->input->cookie() -====================== - -Lets you fetch a cookie. The first parameter will contain the name of -the cookie you are looking for (including any prefixes):: - - cookie('some_cookie'); - -The function returns NULL if the item you are attempting to -retrieve does not exist. - -The second optional parameter lets you run the data through the XSS -filter. It's enabled by setting the second parameter to boolean TRUE; - -:: - - cookie('some_cookie', TRUE); - - $this->input->ip_address() =========================== -- cgit v1.2.3-24-g4f1b From 22c3e73573d2828cec6183866b162359f873a949 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 13 Jun 2012 10:21:36 +0300 Subject: Another input library docs fix --- user_guide_src/source/libraries/input.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 8c6f7c849..c0b9c6589 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -59,9 +59,10 @@ With CodeIgniter's built in functions you can simply do this:: $something = $this->input->post('something'); -The three functions are: +The four methods are: - $this->input->post() +- $this->input->get() - $this->input->cookie() - $this->input->server() -- cgit v1.2.3-24-g4f1b From 7400965017f87c3aba18bf75ed7d732359fd577d Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Wed, 13 Jun 2012 22:57:50 +0200 Subject: Fixed some stuff in documentation. --- user_guide_src/source/helpers/date_helper.rst | 9 ++++++--- user_guide_src/source/installation/upgrade_300.rst | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 7bbfd4f15..1b7177fc2 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -20,9 +20,12 @@ The following functions are available: now() ===== -Returns the current time as a Unix timestamp, based on the "timezone" parameter. -All PHP available timezones are supported. You can also use 'local' timezone, and -it will return time(). +Returns the current time as a Unix timestamp, referenced either to your +server's local time or any PHP suported timezone, based on the "time reference" +setting in your config file. If you do not intend to set your master time reference +to any other PHP suported timezone (which you'll typically do if you run a site that +lets each user set their own timezone settings) there is no benefit to using this +function over PHP's time() function. .. php:method:: now($timezone = NULL) diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index debf9662c..d8a3d5bc1 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -46,8 +46,8 @@ Step 5: Change your use of the Date helper's now() function =========================================================== Function now() has been modified. You can see the changes in :doc:`Date Helper <../helpers/date_helper>`. -You can now select all PHP supported timezones in the `time_reference` setting, listed here: `Supported timezones `_. You can also -use 'local' if you want to get time(). +You can now select all PHP supported timezones in the `time_reference` setting, listed here: +`Supported timezones `_. You can also use 'local' if you want to get time(). Step 6: Move your errors folder =============================== -- cgit v1.2.3-24-g4f1b From d461934184d95b0cfb2feec93f27b621ef72a5c2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 14 Jun 2012 02:27:25 +0300 Subject: Fix issue #10 + URI class speed improvements --- user_guide_src/source/changelog.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e955209b1..039e8acf3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -266,11 +266,12 @@ Bug fixes for 3.0 - Fixed a bug (#1202) - :doc:`Encryption Library ` encode_from_legacy() didn't set back the encrypt mode on failure. - Fixed a bug (#145) - compile_binds() failed when the bind marker was present in a literal string within the query. - Fixed a bug in protect_identifiers() where if passed along with the field names, operators got escaped as well. +- Fixed a bug (#10) - :doc:`URI Library ` internal method _detect_uri() failed with paths containing a colon. Version 2.1.1 ============= -Release Date: Not Released +Release Date: June 13, 2012 - General Changes - Fixed support for docx, xlsx files in mimes.php. @@ -295,7 +296,6 @@ Bug fixes for 2.1.1 - Fixed a bug (#726) - PDO put a 'dbname' argument in it's connection string regardless of the database platform in use, which made it impossible to use SQLite. - Fixed a bug - CI_DB_pdo_driver::num_rows() was not returning properly value with SELECT queries, cause it was relying on PDOStatement::rowCount(). - Fixed a bug (#1059) - CI_Image_lib::clear() was not correctly clearing all necessary object properties, namely width and height. -- Fixed a bud (#1387) - Active Record's ``from()`` method didn't escape table aliases. Version 2.1.0 ============= -- cgit v1.2.3-24-g4f1b From d163e0b219b8afacea3cd0d1d7c2ce5bb6f8a933 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 14 Jun 2012 03:09:53 +0300 Subject: Polish changes from pull #1233 - Session class already has the time_reference setting - 'GMT' is a valid timezone, so nothing needs to be changed in order to work properly (upgrade notes) - Altered some description text --- user_guide_src/source/changelog.rst | 3 ++- user_guide_src/source/installation/upgrade_300.rst | 11 ++--------- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1f5bcb648..06bfba887 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -48,7 +48,7 @@ Release Date: Not Released - Helpers - - Date helper will now return now() based on the timezone you specify. + - :doc:`Date Helper ` function now() now works with all timezone strings supported by PHP. - ``create_captcha()`` accepts additional colors parameter, allowing for color customization. - ``url_title()`` will now trim extra dashes from beginning and end. - Added XHTML Basic 1.1 doctype to :doc:`HTML Helper `. @@ -173,6 +173,7 @@ Release Date: Not Released - Added get_content_type() method to the :doc:`Output Library `. - Added get_mimes() function to system/core/Commons.php to return the config/mimes.php array. - Added a second argument to set_content_type() in the :doc:`Output Library ` that allows setting the document charset as well. + - $config['time_reference'] now supports all timezone strings supported by PHP. Bug fixes for 3.0 ------------------ diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index d8a3d5bc1..c70737cff 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -42,14 +42,7 @@ need to rename the `$active_record` variable to `$query_builder`. // $active_record = TRUE; $query_builder = TRUE; -Step 5: Change your use of the Date helper's now() function -=========================================================== - -Function now() has been modified. You can see the changes in :doc:`Date Helper <../helpers/date_helper>`. -You can now select all PHP supported timezones in the `time_reference` setting, listed here: -`Supported timezones `_. You can also use 'local' if you want to get time(). - -Step 6: Move your errors folder +Step 5: Move your errors folder =============================== -In version 3.0.0, the errors folder has been moved from "application/errors" to "application/views/errors". \ No newline at end of file +In version 3.0.0, the errors folder has been moved from _application/errors_ to _application/views/errors_. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 19c83f6ec6dd29b2ecbeba87801d275f4e247678 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 14 Jun 2012 14:33:33 +0300 Subject: Add changelog entry for issue #1387 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 06bfba887..7748f9b37 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -269,6 +269,7 @@ Bug fixes for 3.0 - Fixed a bug (#145) - compile_binds() failed when the bind marker was present in a literal string within the query. - Fixed a bug in protect_identifiers() where if passed along with the field names, operators got escaped as well. - Fixed a bug (#10) - :doc:`URI Library ` internal method _detect_uri() failed with paths containing a colon. +- Fixed a bug (#1387) - :doc:`Query Builder `'s from() method didn't escape table aliases. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 1922a885b40ef63cf0a5141eb8377d04e3bee172 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 15 Jun 2012 15:16:51 +0300 Subject: Update simple_query() documentation (issue #1484) --- user_guide_src/source/database/queries.rst | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/database/queries.rst b/user_guide_src/source/database/queries.rst index d23efecb3..11dd78392 100644 --- a/user_guide_src/source/database/queries.rst +++ b/user_guide_src/source/database/queries.rst @@ -21,11 +21,31 @@ this:: $this->db->simple_query(); =========================== -This is a simplified version of the $this->db->query() function. It ONLY -returns TRUE/FALSE on success or failure. It DOES NOT return a database -result set, nor does it set the query timer, or compile bind data, or -store your query for debugging. It simply lets you submit a query. Most -users will rarely use this function. +This is a simplified version of the $this->db->query() method. It DOES +NOT return a database result set, nor does it set the query timer, or +compile bind data, or store your query for debugging. It simply lets you +submit a query. Most users will rarely use this function. + +It returns whatever the database drivers' "execute" function returns. +That typically is TRUE/FALSE on success or failure for write type queries +such as INSERT, DELETE or UPDATE statements (which is what it really +should be used for) and a resource/object on success for queries with +fetchable results. + +:: + + if ($this->db->simple_query('YOUR QUERY')) + { + echo "Success!"; + } + else + { + echo "Query failed!"; + } + +.. note:: PostgreSQL's pg_exec() function always returns a resource on + success, even for write type queries. So take that in mind if + you're looking for a boolean value. *************************************** Working with Database prefixes manually -- cgit v1.2.3-24-g4f1b From d9b44bef948928739b2b96b43d78b7629c0ccc15 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 15 Jun 2012 16:07:08 +0300 Subject: Fix issue #520 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7748f9b37..ec33414c2 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -270,6 +270,7 @@ Bug fixes for 3.0 - Fixed a bug in protect_identifiers() where if passed along with the field names, operators got escaped as well. - Fixed a bug (#10) - :doc:`URI Library ` internal method _detect_uri() failed with paths containing a colon. - Fixed a bug (#1387) - :doc:`Query Builder `'s from() method didn't escape table aliases. +- Fixed a bug (#520) - :doc:`Date Helper ` function nice_date() failed when the optional second parameter is not passed. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From c275b23b06195e4ea6424d96a0c76b825c71443a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 15 Jun 2012 16:13:17 +0300 Subject: Fix nice_date() documentation --- user_guide_src/source/helpers/date_helper.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 1b7177fc2..b6dc2e934 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -247,16 +247,18 @@ Example :: - $bad_time = 199605 // Should Produce: 1996-05-01 - $better_time = nice_date($bad_time,'Y-m-d'); - $bad_time = 9-11-2001 // Should Produce: 2001-09-11 - $better_time = nice_date($human,'Y-m-d'); + $bad_date = '199605'; + // Should Produce: 1996-05-01 + $better_date = nice_date($bad_date, 'Y-m-d'); + + $bad_date = '9-11-2001'; + // Should Produce: 2001-09-11 + $better_date = nice_date($bad_date, 'Y-m-d'); timespan() ========== Formats a unix timestamp so that is appears similar to this - :: 1 Year, 10 Months, 2 Weeks, 5 Days, 10 Hours, 16 Minutes -- cgit v1.2.3-24-g4f1b From 51d6d8406d6493d7e3f8783c5d17a4a1970e9fba Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 15 Jun 2012 16:41:09 +0300 Subject: Add support for HTTP code 303 in set_status_header(), as suggested in pull #341 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ec33414c2..aeccea281 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -174,6 +174,7 @@ Release Date: Not Released - Added get_mimes() function to system/core/Commons.php to return the config/mimes.php array. - Added a second argument to set_content_type() in the :doc:`Output Library ` that allows setting the document charset as well. - $config['time_reference'] now supports all timezone strings supported by PHP. + - Added support for HTTP code 303 ("See Other") in set_status_header(). Bug fixes for 3.0 ------------------ -- cgit v1.2.3-24-g4f1b From ac35e5a3fc0987872933131988a99bd21f86a70c Mon Sep 17 00:00:00 2001 From: vlakoff Date: Fri, 15 Jun 2012 22:59:26 +0300 Subject: Fix error in Encryption Class documentation One ANSI character is 8 bits, so 32 characters are not 128 bits but 256 bits. --- user_guide_src/source/libraries/encryption.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/encryption.rst b/user_guide_src/source/libraries/encryption.rst index 28bdca203..a38122203 100644 --- a/user_guide_src/source/libraries/encryption.rst +++ b/user_guide_src/source/libraries/encryption.rst @@ -26,7 +26,7 @@ key security so you may want to think carefully before using it for anything that requires high security, like storing credit card numbers. To take maximum advantage of the encryption algorithm, your key should -be 32 characters in length (128 bits). The key should be as random a +be 32 characters in length (256 bits). The key should be as random a string as you can concoct, with numbers and uppercase and lowercase letters. Your key should **not** be a simple text string. In order to be cryptographically secure it needs to be as random as possible. -- cgit v1.2.3-24-g4f1b From d1a075d7807ad8177ecb4235dfe16ffe2041f860 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 15 Jun 2012 23:28:52 +0300 Subject: mimes.php: zip, rar, php from pull #1472 --- user_guide_src/source/changelog.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index aeccea281..589cd0046 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -30,9 +30,12 @@ Release Date: Not Released - Added support for 3gp, 3g2, mp4, wmv, f4v, vlc Video files to mimes.php. - Added support for m4a, aac, m4u, xspf, au, ac3, flac, ogg Audio files to mimes.php. - Added support for kmz and kml (Google Earth) files to mimes.php. - - Added support for ics Calendar files to mimes.php + - Added support for ics Calendar files to mimes.php. + - Added support for rar archives to mimes.php. - Updated support for xml ('application/xml') and xsl ('application/xml', 'text/xsl') files in mimes.php. - Updated support for doc files in mimes.php. + - Updated support for php files in mimes.php. + - Updated support for zip files in mimes.php. - Added some more doctypes. - Added Romanian and Greek characters in foreign_characters.php. - Changed logger to only chmod when file is first created. -- cgit v1.2.3-24-g4f1b From 58ae971ba248cf3e32a139088c3833c9735028de Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 15 Jun 2012 23:44:48 +0300 Subject: Fix issue #167 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 589cd0046..3e5bc8fcb 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -275,6 +275,7 @@ Bug fixes for 3.0 - Fixed a bug (#10) - :doc:`URI Library ` internal method _detect_uri() failed with paths containing a colon. - Fixed a bug (#1387) - :doc:`Query Builder `'s from() method didn't escape table aliases. - Fixed a bug (#520) - :doc:`Date Helper ` function nice_date() failed when the optional second parameter is not passed. +- Fixed a bug (#167) - ``$config['permitted_uri_chars']`` didn't affect URL-encoded characters. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 0140ddd510edffb901b98de6b80676ece183760c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 16 Jun 2012 01:12:56 +0300 Subject: Fix issue #318 + added a default to the switch() in CI_Output::minify() --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3e5bc8fcb..8e0ac10f0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -276,6 +276,7 @@ Bug fixes for 3.0 - Fixed a bug (#1387) - :doc:`Query Builder `'s from() method didn't escape table aliases. - Fixed a bug (#520) - :doc:`Date Helper ` function nice_date() failed when the optional second parameter is not passed. - Fixed a bug (#167) - ``$config['permitted_uri_chars']`` didn't affect URL-encoded characters. +- Fixed a bug (#318) - :doc:`Profiling ` setting *query_toggle_count* was not settable as described in the manual. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 498c1e027e67dfd8108e0e255ff18fb914742b63 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 16 Jun 2012 03:34:10 +0300 Subject: Added an escape parameter to where_in(), or_where_in(), where_not_in(), or_where_not_in() and made where(), or_where() to default the escape setting to the value of _protect_identifiers --- user_guide_src/source/changelog.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8e0ac10f0..b3c2e7086 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -74,8 +74,7 @@ Release Date: Not Released - Renamed the Active Record class to Query Builder to remove confusion with the Active Record design pattern. - Added the ability to insert objects with insert_batch(). - Added new methods that return the SQL string of queries without executing them: get_compiled_select(), get_compiled_insert(), get_compiled_update(), get_compiled_delete(). - - Added an optional order_by() parameter that allows to disable escaping (useful for custom fields). - - Added an optional join() parameter that allows to disable escaping. + - Added an optional parameter that allows to disable escaping (useful for custom fields) for methods join(), order_by(), where_in(), or_where_in(), where_not_in(), or_where_not_in(). - Added support for join() with multiple conditions. - Improved support for the MySQLi driver, including: - OOP style of the PHP extension is now used, instead of the procedural aliases. -- cgit v1.2.3-24-g4f1b From ff3f7dea40e8fae81dd586b340d30d24154cf5ab Mon Sep 17 00:00:00 2001 From: vlakoff Date: Sat, 16 Jun 2012 14:21:32 +0200 Subject: Documentation: remaining PHP "var" declarations changed to "public" Since PHP 4 isn't supported anymore, let's clean up these few PHP "var" declarations which were remaining in the documentation. According to my checks, there is no more PHP "var" left. --- user_guide_src/source/database/query_builder.rst | 18 +++++++++--------- user_guide_src/source/general/models.rst | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 54e8df6b5..b86a0c8db 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -603,9 +603,9 @@ Here is an example using an object:: /* class Myclass { - var $title = 'My Title'; - var $content = 'My Content'; - var $date = 'My Date'; + public $title = 'My Title'; + public $content = 'My Content'; + public $date = 'My Date'; } */ @@ -730,9 +730,9 @@ Or an object:: /* class Myclass { - var $title = 'My Title'; - var $content = 'My Content'; - var $date = 'My Date'; + public $title = 'My Title'; + public $content = 'My Content'; + public $date = 'My Date'; } */ @@ -766,9 +766,9 @@ Or you can supply an object:: /* class Myclass { - var $title = 'My Title'; - var $content = 'My Content'; - var $date = 'My Date'; + public $title = 'My Title'; + public $content = 'My Content'; + public $date = 'My Date'; } */ diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index 87f63e416..2e1e025ee 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -18,9 +18,9 @@ model class might look like:: class Blog_model extends CI_Model { - var $title = ''; - var $content = ''; - var $date = ''; + public $title = ''; + public $content = ''; + public $date = ''; function __construct() { -- cgit v1.2.3-24-g4f1b From 1764dd7d4ab6e6e5c799eaa9ce007fce48fa0b63 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 16 Jun 2012 18:48:19 +0300 Subject: Fix issue #938 + some related improvements --- user_guide_src/source/changelog.rst | 8 +++++--- user_guide_src/source/libraries/config.rst | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b3c2e7086..b9d72642a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -163,12 +163,12 @@ Release Date: Not Released - Core - - Changed private functions in CI_URI to protected so MY_URI can override them. + - Changed private methods in the :doc:`URI Library ` to protected so MY_URI can override them. - Removed CI_CORE boolean constant from CodeIgniter.php (no longer Reactor and Core versions). - - Added method get_vars() to CI_Loader to retrieve all variables loaded with $this->load->vars(). + - Added method get_vars() to the :doc:`Loader Library ` to retrieve all variables loaded with $this->load->vars(). - is_loaded() function from system/core/Commons.php now returns a reference. - $config['rewrite_short_tags'] now has no effect when using PHP 5.4 as *` to retrieve $_SERVER['REQUEST_METHOD']. - Modified valid_ip() to use PHP's filter_var() in the :doc:`Input Library `. - Added support for HTTP-Only cookies with new config option ``cookie_httponly`` (default FALSE). - Renamed method _call_hook() to call_hook() in the :doc:`Hooks Library `. @@ -177,6 +177,7 @@ Release Date: Not Released - Added a second argument to set_content_type() in the :doc:`Output Library ` that allows setting the document charset as well. - $config['time_reference'] now supports all timezone strings supported by PHP. - Added support for HTTP code 303 ("See Other") in set_status_header(). + - Changed :doc:`Config Library ` method site_url() to accept an array as well. Bug fixes for 3.0 ------------------ @@ -276,6 +277,7 @@ Bug fixes for 3.0 - Fixed a bug (#520) - :doc:`Date Helper ` function nice_date() failed when the optional second parameter is not passed. - Fixed a bug (#167) - ``$config['permitted_uri_chars']`` didn't affect URL-encoded characters. - Fixed a bug (#318) - :doc:`Profiling ` setting *query_toggle_count* was not settable as described in the manual. +- Fixed a bug (#938) - :doc:`Config Library ` method site_url() added a question mark to the URL string when query strings are enabled even if it already existed. Version 2.1.1 ============= diff --git a/user_guide_src/source/libraries/config.rst b/user_guide_src/source/libraries/config.rst index 08d9c2905..694896353 100644 --- a/user_guide_src/source/libraries/config.rst +++ b/user_guide_src/source/libraries/config.rst @@ -175,7 +175,7 @@ This function retrieves the URL to your site, plus an optional path such as to a stylesheet or image. The two functions above are normally accessed via the corresponding -functions in the :doc:`URL Helper `. +functions in the :doc:`URL Helper `. $this->config->system_url(); ***************************** -- cgit v1.2.3-24-g4f1b From 95d78cf4f78c0fb685a789c280d106ab242318ef Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 16 Jun 2012 19:54:33 +0300 Subject: Fix issue #999 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b9d72642a..9ef0ce991 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -278,6 +278,7 @@ Bug fixes for 3.0 - Fixed a bug (#167) - ``$config['permitted_uri_chars']`` didn't affect URL-encoded characters. - Fixed a bug (#318) - :doc:`Profiling ` setting *query_toggle_count* was not settable as described in the manual. - Fixed a bug (#938) - :doc:`Config Library ` method site_url() added a question mark to the URL string when query strings are enabled even if it already existed. +- Fixed a bug (#999) - :doc:`Config Library ` method site_url() always appended ``$config['url_suffix']`` to the end of the URL string, regardless of wether a query string exists in it. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From f0a8410a5cbe080b377ec352320872d27ce7d91f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 16 Jun 2012 20:52:20 +0300 Subject: Fix two anchor_popup() issues --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9ef0ce991..542c47396 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -279,6 +279,7 @@ Bug fixes for 3.0 - Fixed a bug (#318) - :doc:`Profiling ` setting *query_toggle_count* was not settable as described in the manual. - Fixed a bug (#938) - :doc:`Config Library ` method site_url() added a question mark to the URL string when query strings are enabled even if it already existed. - Fixed a bug (#999) - :doc:`Config Library ` method site_url() always appended ``$config['url_suffix']`` to the end of the URL string, regardless of wether a query string exists in it. +- Fixed a bug where :doc:`URL Helper ` function anchor_popup() ignored the attributes argument if it is not an array. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 81c3208b79cca353b27ecd4bdf00d4b6e7c91b2c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 16 Jun 2012 21:21:46 +0300 Subject: anchor_popup() improvements --- user_guide_src/source/changelog.rst | 5 ++++- user_guide_src/source/helpers/url_helper.rst | 26 +++++++++++++++++--------- 2 files changed, 21 insertions(+), 10 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 542c47396..dd6fa4603 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -53,7 +53,10 @@ Release Date: Not Released - :doc:`Date Helper ` function now() now works with all timezone strings supported by PHP. - ``create_captcha()`` accepts additional colors parameter, allowing for color customization. - - ``url_title()`` will now trim extra dashes from beginning and end. + - :doc:`URL Helper ` changes include: + - ``url_title()`` will now trim extra dashes from beginning and end. + - ``anchor_popup()`` will now fill the "href" attribute with the URL and its JS code will return false instead. + - Added JS window name support to ``anchor_popup()`` function. - Added XHTML Basic 1.1 doctype to :doc:`HTML Helper `. - Changed ``humanize()`` to include a second param for the separator. - Refactored ``plural()`` and ``singular()`` to avoid double pluralization and support more words. diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index e6d51b22b..3c91fd5dd 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -168,19 +168,20 @@ browser settings. Here is an example with attributes :: - $atts = array(                - 'width'      => '800',                - 'height'     => '600',                - 'scrollbars' => 'yes',                - 'status'     => 'yes',                - 'resizable'  => 'yes',                - 'screenx'    => '0',                - 'screeny'    => '0'              + $atts = array( + 'width' => '800', + 'height' => '600', + 'scrollbars' => 'yes', + 'status'      => 'yes', + 'resizable'   => 'yes', + 'screenx'     => '0', + 'screeny'     => '0', + 'window_name' => '_blank' ); echo anchor_popup('news/local/123', 'Click Me!', $atts); -Note: The above attributes are the function defaults so you only need to +.. note:: The above attributes are the function defaults so you only need to set the ones that are different from what you need. If you want the function to use all of its defaults simply pass an empty array in the third parameter @@ -189,6 +190,13 @@ third parameter echo anchor_popup('news/local/123', 'Click Me!', array()); +.. note:: The 'window_name' is not really an attribute, but an argument to + the JavaScript `window.open() ` + method, which accepts either a window name or a window target. + +.. note:: Any other attribute than the listed above will be parsed as an + HTML attribute to the anchor tag. + mailto() ======== -- cgit v1.2.3-24-g4f1b From d60e700640c2a67f74acff090b94d06117bfc203 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 17 Jun 2012 00:03:03 +0300 Subject: Add an option to disable MIME detection in the Upload library (issue #1494) --- user_guide_src/source/libraries/file_uploading.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/file_uploading.rst b/user_guide_src/source/libraries/file_uploading.rst index 414d84f0b..65cd5c722 100644 --- a/user_guide_src/source/libraries/file_uploading.rst +++ b/user_guide_src/source/libraries/file_uploading.rst @@ -215,6 +215,9 @@ Preference Default Value Options Descripti that can not be discerned by the person uploading it. **remove_spaces** TRUE TRUE/FALSE (boolean) If set to TRUE, any spaces in the file name will be converted to underscores. This is recommended. +**detect_mime** TRUE TRUE/FALSE (boolean) If set to TRUE, a server side detection of the file type will be + performed to avoid code injection attacks. DO NOT disable this option + unless you have no other option as that would cause a security risk. ============================ ================= ======================= ====================================================================== Setting preferences in a config file -- cgit v1.2.3-24-g4f1b From 88c47278f775413b5a408f48d30bd279e34e601a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 17 Jun 2012 02:32:31 +0300 Subject: Pagination: fixed 'rel' attribute handling, added custom attributes support, deprecated 'anchor_class' setting --- user_guide_src/source/changelog.rst | 5 +++- user_guide_src/source/libraries/pagination.rst | 40 ++++++++++++-------------- 2 files changed, 22 insertions(+), 23 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index dd6fa4603..4054a04ff 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -162,7 +162,10 @@ Release Date: Not Released - Added dsn (delivery status notification) option to the :doc:`Email Library `. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Added an "index" parameter to the data() method in the :doc:`Upload Library `. - - Added support for the anchor "rel" attribute in the :doc:`Pagination Library `. + - :doc:`Pagination Library ` changes include: + - Added support for the anchor "rel" attribute. + - Added support for setting custom attributes. + - Deprecated usage of the "anchor_class" setting (use the new "attributes" setting instead). - Core diff --git a/user_guide_src/source/libraries/pagination.rst b/user_guide_src/source/libraries/pagination.rst index 560755fb6..c4398d739 100644 --- a/user_guide_src/source/libraries/pagination.rst +++ b/user_guide_src/source/libraries/pagination.rst @@ -247,34 +247,30 @@ adding:: $config['display_pages'] = FALSE; -****************************** -Adding a class to every anchor -****************************** +**************************** +Adding attributes to anchors +**************************** -If you want to add a class attribute to every link rendered by the -pagination class, you can set the config "anchor_class" equal to the -classname you want. +If you want to add an extra attribute to be added to every link rendered +by the pagination class, you can set them as key/value pairs in the +"attributes" config :: - $config['anchor_class'] = 'myclass'; // class="myclass" + // Produces: class="myclass" + $config['attributes'] = array('class' => 'myclass'); -********************************** -Changing the "rel" attribute value -********************************** +.. note:: Usage of the old method of setting classes via "anchor_class" + is deprecated. -By default, the rel attribute will be automatically put under the -following conditions: +***************************** +Disabling the "rel" attribute +***************************** -- rel="start" for the "first" link -- rel="prev" for the "previous" link -- rel="next" for the "next" link +By default the rel attribute is dynamically generated and appended to +the appropriate anchors. If for some reason you want to turn it off, +you can pass boolean FALSE as a regular attribute -If you want to disable the rel attribute, or change its value, you -can set the 'attr_rel' config option:: - - // Disable - $config['attr_rel'] = FALSE; +:: - // Use a custom value on all anchors - $config['attr_rel'] = 'custom_value'; // produces: rel="custom_value" \ No newline at end of file + $config['attributes']['rel'] = FALSE; \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 3751f9362b731f5f3d2e63176c364d6281fdf415 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 17 Jun 2012 18:07:48 +0300 Subject: Add join() USING support --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4054a04ff..b39d43b1a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -79,6 +79,7 @@ Release Date: Not Released - Added new methods that return the SQL string of queries without executing them: get_compiled_select(), get_compiled_insert(), get_compiled_update(), get_compiled_delete(). - Added an optional parameter that allows to disable escaping (useful for custom fields) for methods join(), order_by(), where_in(), or_where_in(), where_not_in(), or_where_not_in(). - Added support for join() with multiple conditions. + - Added support for USING in join(). - Improved support for the MySQLi driver, including: - OOP style of the PHP extension is now used, instead of the procedural aliases. - Server version checking is now done via ``mysqli::$server_info`` instead of running an SQL query. -- cgit v1.2.3-24-g4f1b From 6ac514484fffd9700c6ecc57cfa1b1fd105e37f6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 18 Jun 2012 13:05:17 +0300 Subject: Fix issue #1328 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b39d43b1a..67b78bf8b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -287,6 +287,7 @@ Bug fixes for 3.0 - Fixed a bug (#938) - :doc:`Config Library ` method site_url() added a question mark to the URL string when query strings are enabled even if it already existed. - Fixed a bug (#999) - :doc:`Config Library ` method site_url() always appended ``$config['url_suffix']`` to the end of the URL string, regardless of wether a query string exists in it. - Fixed a bug where :doc:`URL Helper ` function anchor_popup() ignored the attributes argument if it is not an array. +- Fixed a bug (#1328) - :doc:`Form Validation Library ` didn't properly check the type of the form fields before processing them. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 777153d8362ed884fc3d47ea4a5e1fa0f1ce8ca9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 18 Jun 2012 13:30:45 +0300 Subject: Changed limit() and offset() to ignore NULL values --- user_guide_src/source/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 67b78bf8b..da608b162 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -80,6 +80,8 @@ Release Date: Not Released - Added an optional parameter that allows to disable escaping (useful for custom fields) for methods join(), order_by(), where_in(), or_where_in(), where_not_in(), or_where_not_in(). - Added support for join() with multiple conditions. - Added support for USING in join(). + - Changed limit() to ignore NULL values instead of always casting to integer. + - Changed offset() to ignore empty values instead of always casting to integer. - Improved support for the MySQLi driver, including: - OOP style of the PHP extension is now used, instead of the procedural aliases. - Server version checking is now done via ``mysqli::$server_info`` instead of running an SQL query. -- cgit v1.2.3-24-g4f1b From 8d3099d4e5261e0f044c7fcd8b3ab7724645aa8d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 21 Jun 2012 16:00:20 +0300 Subject: Fix issue #79 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index da608b162..8a6c922a4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -290,6 +290,7 @@ Bug fixes for 3.0 - Fixed a bug (#999) - :doc:`Config Library ` method site_url() always appended ``$config['url_suffix']`` to the end of the URL string, regardless of wether a query string exists in it. - Fixed a bug where :doc:`URL Helper ` function anchor_popup() ignored the attributes argument if it is not an array. - Fixed a bug (#1328) - :doc:`Form Validation Library ` didn't properly check the type of the form fields before processing them. +- Fixed a bug (#79) - :doc:`Form Validation Library ` didn't properly validate array fields that use associative keys or have custom indexes. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 7540dede0f01acd7aa1ffd224defc5189305a815 Mon Sep 17 00:00:00 2001 From: Mat Whitney Date: Fri, 22 Jun 2012 12:02:10 -0700 Subject: Added optional fourth parameter to timezone_menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit allows setting one or more attributes on the generated select tag. This allows passing attributes needed for Section 508 compliance § 1194.22(n), such as an id. http://access-board.gov/sec508/guide/1194.22.htm#(n) http://www.w3.org/TR/WCAG10-HTML-TECHS/#forms-labels --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/helpers/date_helper.rst | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8a6c922a4..c861a1e8d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -70,6 +70,7 @@ Release Date: Not Released - ``set_realpath()`` can now also handle file paths as opposed to just directories. - Added an optional paramater to ``delete_files()`` to enable it to skip deleting files such as .htaccess and index.html. - ``read_file()`` is now a deprecated alias of ``file_get_contents()``. + - :doc:`Date Helper ` Added optional fourth parameter to ``timezone_menu()`` that allows more attributes to be added to the generated select tag - Database diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index b6dc2e934..ba079394d 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -115,7 +115,7 @@ Supported formats: local_to_gmt() ============== -Takes a Unix timestamp as input and returns it as GMT. +Takes a Unix timestamp as input and returns it as GMT. .. php:method:: local_to_gmt($time = '') @@ -159,7 +159,7 @@ Example mysql_to_unix() =============== -Takes a MySQL Timestamp as input and returns it as Unix. +Takes a MySQL Timestamp as input and returns it as Unix. .. php:method:: mysql_to_unix($time = '') @@ -212,7 +212,7 @@ human_to_unix() The opposite of the above function. Takes a "human" time as input and returns it as Unix. This function is useful if you accept "human" formatted dates submitted via a form. Returns FALSE (boolean) if the -date string passed to it is not formatted as indicated above. +date string passed to it is not formatted as indicated above. .. php:method:: human_to_unix($datestr = '') @@ -235,9 +235,9 @@ them into something useful. It also accepts well-formed dates. The function will return a Unix timestamp by default. You can, optionally, pass a format string (the same type as the PHP date function -accepts) as the second parameter. +accepts) as the second parameter. -.. php:method:: nice_date($bad_date = '', $format = FALSE) +.. php:method:: nice_date($bad_date = '', $format = FALSE) :param integer $bad_date: The terribly formatted date-like string :param string $format: Date format to return (same as php date function) @@ -265,10 +265,10 @@ Formats a unix timestamp so that is appears similar to this The first parameter must contain a Unix timestamp. The second parameter must contain a timestamp that is greater that the first timestamp. If -the second parameter empty, the current time will be used. The third -parameter is optional and limits the number of time units to display. -The most common purpose for this function is to show how much time has -elapsed from some point in time in the past to now. +the second parameter empty, the current time will be used. The third +parameter is optional and limits the number of time units to display. +The most common purpose for this function is to show how much time has +elapsed from some point in time in the past to now. .. php:method:: timespan($seconds = 1, $time = '', $units = '') @@ -293,7 +293,7 @@ days_in_month() =============== Returns the number of days in a given month/year. Takes leap years into -account. +account. .. php:method:: days_in_month($month = 0, $year = '') @@ -390,14 +390,15 @@ allowed to set their local timezone value. The first parameter lets you set the "selected" state of the menu. For example, to set Pacific time as the default you will do this -.. php:method:: timezone_menu($default = 'UTC', $class = "", $name = 'timezones') +.. php:method:: timezone_menu($default = 'UTC', $class = '', $name = 'timezones', $attributes = '') :param string $default: timezone :param string $class: classname :param string $name: menu name + :param mixed $attributes: attributes :returns: string -Example: +Example: :: @@ -407,6 +408,8 @@ Please see the timezone reference below to see the values of this menu. The second parameter lets you set a CSS class name for the menu. +The fourth parameter lets you set one or more attributes on the generated select tag. + .. note:: The text contained in the menu is found in the following language file: `language//date_lang.php` -- cgit v1.2.3-24-g4f1b From 282e02c7d66085d3c6d4c85eed4a1581389b5e63 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 23 Jun 2012 14:11:58 +0100 Subject: Clarified support of $config['csrf_exclude_uris'] support in v3.0 (#236) --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 8a6c922a4..f8eb59644 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -148,6 +148,7 @@ Release Date: Not Released - If property maintain_ratio is set to TRUE, image_reproportion() now doesn't need both width and height to be specified. - Removed SHA1 function in the :doc:`Encryption Library `. - Added $config['csrf_regeneration'] to the CSRF protection in the :doc:`Security library `, which makes token regeneration optional. + - Added $config['csrf_exclude_uris'] to the CSRF protection in the :doc:`Security library `, which allows you list URIs which will not have the CSRF validation functions run. - :doc:`Form Validation library ` changes include: - Added method error_array() to return all error messages as an array. - Added method set_data() to set an alternative data array to be validated instead of the default $_POST. @@ -453,7 +454,6 @@ Release Date: August 20, 2011 - Added insert_batch() function to the PostgreSQL database driver. Thanks to epallerols for the patch. - Added "application/x-csv" to mimes.php. - - Added CSRF protection URI whitelisting. - Fixed a bug where :doc:`Email library ` attachments with a "." in the name would using invalid MIME-types. -- cgit v1.2.3-24-g4f1b From f82b92999e8309155df3e665e25a261c26b0e93d Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Sat, 23 Jun 2012 15:49:23 +0100 Subject: Added ['reuse_query_string'] to Pagination. This allows automatic repopulation of query string arguments, combined with normal URI segments. --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/libraries/pagination.rst | 15 +++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f8eb59644..29084ed9b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -170,6 +170,7 @@ Release Date: Not Released - Added support for the anchor "rel" attribute. - Added support for setting custom attributes. - Deprecated usage of the "anchor_class" setting (use the new "attributes" setting instead). + - Added $config['reuse_query_string'] to allow automatic repopulation of query string arguments, combined with normal URI segments. - Core diff --git a/user_guide_src/source/libraries/pagination.rst b/user_guide_src/source/libraries/pagination.rst index c4398d739..15b3675df 100644 --- a/user_guide_src/source/libraries/pagination.rst +++ b/user_guide_src/source/libraries/pagination.rst @@ -112,6 +112,21 @@ the pagination link will become. Note that "per_page" is the default query string passed, however can be configured using $config['query_string_segment'] = 'your_string' +$config['reuse_query_string'] = FALSE; +==================================== + +By default your Query String arguments (nothing to do with other +query string options) will be ignored. Setting this config to +TRUE will add existing query string arguments back into the +URL after the URI segment and before the suffix + +:: + + http://example.com/index.php/test/page/20?query=search%term + +This helps you mix together normal :doc:`URI Segments <../general/urls>` +as well as query string arguments, which until 3.0 was not possible. + *********************** Adding Enclosing Markup *********************** -- cgit v1.2.3-24-g4f1b From 965703d4aadec14010b2875b11c40763bf1985df Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 25 Jun 2012 18:20:46 +0300 Subject: Add changelog entry --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 29084ed9b..e7c0fc83c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -130,6 +130,7 @@ Release Date: Not Released - Added ODBC support for create_database(), drop_database() and drop_table() in :doc:`Database Forge `. - Added PDO support for create_database(), drop_database and drop_table() in :doc:`Database Forge `. - Added unbuffered_row() method for getting a row without prefetching whole result (consume less memory). + - Added subdrivers support (currently only used by PDO). - Libraries -- cgit v1.2.3-24-g4f1b From ce79be0b5ffc9d5754c93771a8c289a252ec437b Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 25 Jun 2012 23:23:46 -0700 Subject: Fixing various Sphinx bugs and syntax errors in docs --- user_guide_src/source/changelog.rst | 30 ++-- user_guide_src/source/database/results.rst | 4 +- user_guide_src/source/helpers/date_helper.rst | 165 ++++++++------------- user_guide_src/source/helpers/url_helper.rst | 6 +- user_guide_src/source/installation/upgrade_300.rst | 4 +- user_guide_src/source/libraries/email.rst | 2 +- user_guide_src/source/libraries/pagination.rst | 2 +- 7 files changed, 82 insertions(+), 131 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 28e2f94bb..e6afd350a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -358,7 +358,7 @@ Release Date: November 14, 2011 injection. - Added additional option 'none' for the optional third argument for $this->db->like() in the :doc:`Database - Driver `. + Driver `. - Added $this->db->insert_batch() support to the OCI8 (Oracle) driver. - Added failover if the main connections in the config should fail @@ -1632,27 +1632,27 @@ Release Date: January 30, 2008 - Active Record - Added protect_identifiers() in :doc:`Active - Record <./database/active_record>`. + Record <./database/query_builder>`. - All AR queries are backticked if appropriate to the database. - Added where_in(), or_where_in(), where_not_in(), or_where_not_in(), not_like() and or_not_like() to :doc:`Active - Record <./database/active_record>`. + Record <./database/query_builder>`. - Added support for limit() into update() and delete() statements in - :doc:`Active Record <./database/active_record>`. + :doc:`Active Record <./database/query_builder>`. - Added empty_table() and truncate_table() to :doc:`Active - Record <./database/active_record>`. + Record <./database/query_builder>`. - Added the ability to pass an array of tables to the delete() - statement in :doc:`Active Record <./database/active_record>`. + statement in :doc:`Active Record <./database/query_builder>`. - Added count_all_results() function to :doc:`Active - Record <./database/active_record>`. + Record <./database/query_builder>`. - Added select_max(), select_min(), select_avg() and - select_sum() to :doc:`Active Record <./database/active_record>`. + select_sum() to :doc:`Active Record <./database/query_builder>`. - Added the ability to use aliases with joins in :doc:`Active - Record <./database/active_record>`. + Record <./database/query_builder>`. - Added a third parameter to Active Record's like() clause to control where the wildcard goes. - Added a third parameter to set() in :doc:`Active - Record <./database/active_record>` that withholds escaping + Record <./database/query_builder>` that withholds escaping data. - Changed the behaviour of variables submitted to the where() clause with no values to auto set "IS NULL" @@ -1760,7 +1760,7 @@ Release Date: January 30, 2008 the table of contents of the userguide. - Moved part of the userguide menu javascript to an external file. - Documented distinct() in :doc:`Active - Record <./database/active_record>`. + Record <./database/query_builder>`. - Documented the timezones() function in the :doc:`Date Helper <./helpers/date_helper>`. - Documented unset_userdata in the :doc:`Session @@ -2336,9 +2336,9 @@ Release Date: April 11, 2006 function <./general/views>`: $this->load->view('my_view', $object); - Added getwhere function to :doc:`Active Record - class <./database/active_record>`. + class <./database/query_builder>`. - Added count_all function to :doc:`Active Record - class <./database/active_record>`. + class <./database/query_builder>`. - Added language file for scaffolding and fixed a scaffolding bug that occurs when there are no rows in the specified table. - Added :doc:`$this->db->last_query() <./database/queries>`, which @@ -2363,7 +2363,7 @@ Release Date: April 3, 2006 - Added support for :doc:`Models `. - Redesigned the database libraries to support additional RDBMs (Postgres, MySQLi, etc.). -- Redesigned the :doc:`Active Record class <./database/active_record>` +- Redesigned the :doc:`Active Record class <./database/query_builder>` to enable more varied types of queries with simpler syntax, and advanced features like JOINs. - Added a feature to the database class that lets you run :doc:`custom @@ -2396,7 +2396,7 @@ Release Date: April 3, 2006 whether PHP 4 or 5 is being run, since PHP 5 allows a more graceful way to manage objects that utilizes a bit less resources. - Deprecated: $this->db->use_table() has been deprecated. Please read - the :doc:`Active Record <./database/active_record>` page for + the :doc:`Active Record <./database/query_builder>` page for information. - Deprecated: $this->db->smart_escape_str() has been deprecated. Please use this instead: $this->db->escape() diff --git a/user_guide_src/source/database/results.rst b/user_guide_src/source/database/results.rst index ac4fc3733..d032f734e 100644 --- a/user_guide_src/source/database/results.rst +++ b/user_guide_src/source/database/results.rst @@ -139,13 +139,13 @@ parameter: .. note:: all the functions above will load the whole result into memory (prefetching) use unbuffered_row() for processing large result sets. unbuffered_row($type) -===== +===================== This function returns a single result row without prefetching the whole result in memory as row() does. If your query has more than one row, it returns the current row and moves the internal data pointer ahead. The result is returned as $type could be 'object' (default) or 'array' that will return an associative array. - +:: $query = $this->db->query("YOUR QUERY"); diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index ba079394d..5adfb18d2 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -87,30 +87,20 @@ contain the date as a Unix timestamp. Supported formats: -+----------------+------------------------+-----------------------------------+ -| Constant | Description | Example | -+================+========================+===================================+ -| DATE_ATOM | Atom | 2005-08-15T16:13:03+0000 | -+----------------+------------------------+-----------------------------------+ -| DATE_COOKIE | HTTP Cookies | Sun, 14 Aug 2005 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_ISO8601 | ISO-8601 | 2005-08-14T16:13:03+00:00 | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC822 | RFC 822 | Sun, 14 Aug 05 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC850 | RFC 850 | Sunday, 14-Aug-05 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC1036 | RFC 1036 | Sunday, 14-Aug-05 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC1123 | RFC 1123 | Sun, 14 Aug 2005 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_RFC2822 | RFC 2822 | Sun, 14 Aug 2005 16:13:03 +0000 | -+----------------+------------------------+-----------------------------------+ -| DATE_RSS | RSS | Sun, 14 Aug 2005 16:13:03 UTC | -+----------------+------------------------+-----------------------------------+ -| DATE_W3C | W3C | 2005-08-14T16:13:03+0000 | -+----------------+------------------------+-----------------------------------+ - +=============== ======================= ====================================== +Constant Description Example +=============== ======================= ====================================== +DATE_ATOM Atom 2005-08-15T16:13:03+0000 +DATE_COOKIE HTTP Cookies Sun, 14 Aug 2005 16:13:03 UTC +DATE_ISO8601 ISO-8601 2005-08-14T16:13:03+00:00 +DATE_RFC822 RFC 822 Sun, 14 Aug 05 16:13:03 UTC +DATE_RFC850 RFC 850 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1036 RFC 1036 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1123 RFC 1123 Sun, 14 Aug 2005 16:13:03 UTC +DATE_RFC2822 RFC 2822 Sun, 14 Aug 2005 16:13:03 +0000 +DATE_RSS RSS Sun, 14 Aug 2005 16:13:03 UTC +DATE_W3C W3C 2005-08-14T16:13:03+0000 +=============== ======================= ====================================== local_to_gmt() ============== @@ -421,86 +411,47 @@ The following table indicates each timezone and its location. Note some of the location lists have been abridged for clarity and formatting. -+------------+----------------------------------------------------------------+ -| Time Zone | Location | -+============+================================================================+ -| UM12 | (UTC - 12:00) Baker/Howland Island | -+------------+----------------------------------------------------------------+ -| UM11 | (UTC - 11:00) Samoa Time Zone, Niue | -+------------+----------------------------------------------------------------+ -| UM10 | (UTC - 10:00) Hawaii-Aleutian Standard Time, Cook Islands | -+------------+----------------------------------------------------------------+ -| UM95 | (UTC - 09:30) Marquesas Islands | -+------------+----------------------------------------------------------------+ -| UM9 | (UTC - 09:00) Alaska Standard Time, Gambier Islands | -+------------+----------------------------------------------------------------+ -| UM8 | (UTC - 08:00) Pacific Standard Time, Clipperton Island | -+------------+----------------------------------------------------------------+ -| UM7 | (UTC - 11:00) Mountain Standard Time | -+------------+----------------------------------------------------------------+ -| UM6 | (UTC - 06:00) Central Standard Time | -+------------+----------------------------------------------------------------+ -| UM5 | (UTC - 05:00) Eastern Standard Time, Western Caribbean | -+------------+----------------------------------------------------------------+ -| UM45 | (UTC - 04:30) Venezuelan Standard Time | -+------------+----------------------------------------------------------------+ -| UM4 | (UTC - 04:00) Atlantic Standard Time, Eastern Caribbean | -+------------+----------------------------------------------------------------+ -| UM35 | (UTC - 03:30) Newfoundland Standard Time | -+------------+----------------------------------------------------------------+ -| UM3 | (UTC - 03:00) Argentina, Brazil, French Guiana, Uruguay | -+------------+----------------------------------------------------------------+ -| UM2 | (UTC - 02:00) South Georgia/South Sandwich Islands | -+------------+----------------------------------------------------------------+ -| UM1 | (UTC -1:00) Azores, Cape Verde Islands | -+------------+----------------------------------------------------------------+ -| UTC | (UTC) Greenwich Mean Time, Western European Time | -+------------+----------------------------------------------------------------+ -| UP1 | (UTC +1:00) Central European Time, West Africa Time | -+------------+----------------------------------------------------------------+ -| UP2 | (UTC +2:00) Central Africa Time, Eastern European Time | -+------------+----------------------------------------------------------------+ -| UP3 | (UTC +3:00) Moscow Time, East Africa Time | -+------------+----------------------------------------------------------------+ -| UP35 | (UTC +3:30) Iran Standard Time | -+------------+----------------------------------------------------------------+ -| UP4 | (UTC +4:00) Azerbaijan Standard Time, Samara Time | -+------------+----------------------------------------------------------------+ -| UP45 | (UTC +4:30) Afghanistan | -+------------+----------------------------------------------------------------+ -| UP5 | (UTC +5:00) Pakistan Standard Time, Yekaterinburg Time | -+------------+----------------------------------------------------------------+ -| UP55 | (UTC +5:30) Indian Standard Time, Sri Lanka Time | -+------------+----------------------------------------------------------------+ -| UP575 | (UTC +5:45) Nepal Time | -+------------+----------------------------------------------------------------+ -| UP6 | (UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time | -+------------+----------------------------------------------------------------+ -| UP65 | (UTC +6:30) Cocos Islands, Myanmar | -+------------+----------------------------------------------------------------+ -| UP7 | (UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam| -+------------+----------------------------------------------------------------+ -| UP8 | (UTC +8:00) Australian Western Standard Time, Beijing Time | -+------------+----------------------------------------------------------------+ -| UP875 | (UTC +8:45) Australian Central Western Standard Time | -+------------+----------------------------------------------------------------+ -| UP9 | (UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk | -+------------+----------------------------------------------------------------+ -| UP95 | (UTC +9:30) Australian Central Standard Time | -+------------+----------------------------------------------------------------+ -| UP10 | (UTC +10:00) Australian Eastern Standard Time, Vladivostok Time| -+------------+----------------------------------------------------------------+ -| UP105 | (UTC +10:30) Lord Howe Island | -+------------+----------------------------------------------------------------+ -| UP11 | (UTC +11:00) Magadan Time, Solomon Islands, Vanuatu | -+------------+----------------------------------------------------------------+ -| UP115 | (UTC +11:30) Norfolk Island | -+------------+----------------------------------------------------------------+ -| UP12 | (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand | -+------------+----------------------------------------------------------------+ -| UP1275 | (UTC +12:45) Chatham Islands Standard Time | -+------------+----------------------------------------------------------------+ -| UP13 | (UTC +13:00) Phoenix Islands Time, Tonga | -+------------+----------------------------------------------------------------+ -| UP14 | (UTC +14:00) Line Islands | -+------------+----------------------------------------------------------------+ +=========== ===================================================================== +Time Zone Location +=========== ===================================================================== +UM2 (UTC - 12:00) Baker/Howland Island +UM1 (UTC - 11:00) Samoa Time Zone, Niue +UM0 (UTC - 10:00) Hawaii-Aleutian Standard Time, Cook Islands +UM95 (UTC - 09:30) Marquesas Islands +UM9 (UTC - 09:00) Alaska Standard Time, Gambier Islands +UM8 (UTC - 08:00) Pacific Standard Time, Clipperton Island +UM7 (UTC - 11:00) Mountain Standard Time +UM6 (UTC - 06:00) Central Standard Time +UM5 (UTC - 05:00) Eastern Standard Time, Western Caribbean +UM45 (UTC - 04:30) Venezuelan Standard Time +UM4 (UTC - 04:00) Atlantic Standard Time, Eastern Caribbean +UM35 (UTC - 03:30) Newfoundland Standard Time +UM3 (UTC - 03:00) Argentina, Brazil, French Guiana, Uruguay +UM2 (UTC - 02:00) South Georgia/South Sandwich Islands +UM (UTC -1:00) Azores, Cape Verde Islands +UTC (UTC) Greenwich Mean Time, Western European Time +UP1 (UTC +1:00) Central European Time, West Africa Time +UP2 (UTC +2:00) Central Africa Time, Eastern European Time +UP3 (UTC +3:00) Moscow Time, East Africa Time +UP35 (UTC +3:30) Iran Standard Time +UP4 (UTC +4:00) Azerbaijan Standard Time, Samara Time +UP45 (UTC +4:30) Afghanistan +UP5 (UTC +5:00) Pakistan Standard Time, Yekaterinburg Time +UP55 (UTC +5:30) Indian Standard Time, Sri Lanka Time +UP575 (UTC +5:45) Nepal Time +UP6 (UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time +UP65 (UTC +6:30) Cocos Islands, Myanmar +UP7 (UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam +UP8 (UTC +8:00) Australian Western Standard Time, Beijing Time +UP875 (UTC +8:45) Australian Central Western Standard Time +UP9 (UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk +UP95 (UTC +9:30) Australian Central Standard Time +UP10 (UTC +10:00) Australian Eastern Standard Time, Vladivostok Time +UP105 (UTC +10:30) Lord Howe Island +UP11 (UTC +11:00) Magadan Time, Solomon Islands, Vanuatu +UP115 (UTC +11:30) Norfolk Island +UP12 (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand +UP1275 (UTC +12:45) Chatham Islands Standard Time +UP1 (UTC +13:00) Phoenix Islands Time, Tonga +UP14 (UTC +14:00) Line Islands +=========== ===================================================================== \ No newline at end of file diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 3c91fd5dd..82db6a5b3 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -182,9 +182,9 @@ browser settings. Here is an example with attributes echo anchor_popup('news/local/123', 'Click Me!', $atts); .. note:: The above attributes are the function defaults so you only need to -set the ones that are different from what you need. If you want the -function to use all of its defaults simply pass an empty array in the -third parameter + set the ones that are different from what you need. If you want the + function to use all of its defaults simply pass an empty array in the + third parameter :: diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index c70737cff..14199092f 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -35,7 +35,7 @@ Move any entries that you might have listed there to `$autoload['libraries']` in Step 4: Update your config/database.php ======================================= -Due to 3.0.0's renaming of Active Record to Query Builder, inside your _config/database.php_, you will +Due to 3.0.0's renaming of Active Record to Query Builder, inside your `config/database.php`, you will need to rename the `$active_record` variable to `$query_builder`. $active_group = 'default'; @@ -45,4 +45,4 @@ need to rename the `$active_record` variable to `$query_builder`. Step 5: Move your errors folder =============================== -In version 3.0.0, the errors folder has been moved from _application/errors_ to _application/views/errors_. \ No newline at end of file +In version 3.0.0, the errors folder has been moved from _application/errors* to _application/views/errors*. \ 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 f99eb91df..c5fa68004 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -183,7 +183,7 @@ accept HTML email. If you do not set your own message CodeIgniter will extract the message from your HTML email and strip the tags. $this->email->set_header() ------------------------ +-------------------------- Appends additional headers to the e-mail:: diff --git a/user_guide_src/source/libraries/pagination.rst b/user_guide_src/source/libraries/pagination.rst index 15b3675df..a7e4c84c9 100644 --- a/user_guide_src/source/libraries/pagination.rst +++ b/user_guide_src/source/libraries/pagination.rst @@ -113,7 +113,7 @@ Note that "per_page" is the default query string passed, however can be configured using $config['query_string_segment'] = 'your_string' $config['reuse_query_string'] = FALSE; -==================================== +====================================== By default your Query String arguments (nothing to do with other query string options) will be ignored. Setting this config to -- cgit v1.2.3-24-g4f1b From d13803813b355fccb17dd4f148f43b7a20977781 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 25 Jun 2012 23:54:18 -0700 Subject: First pass at ToC remediation --- user_guide_src/source/_themes/eldocs/layout.html | 58 ++-------- .../_themes/eldocs/static/asset/css/common.css | 83 ++++++++++---- user_guide_src/source/general/welcome.rst | 32 ++++++ user_guide_src/source/index.rst | 121 ++++++++++++++++----- 4 files changed, 191 insertions(+), 103 deletions(-) create mode 100644 user_guide_src/source/general/welcome.rst (limited to 'user_guide_src') diff --git a/user_guide_src/source/_themes/eldocs/layout.html b/user_guide_src/source/_themes/eldocs/layout.html index 4b1a0221c..01db07cac 100644 --- a/user_guide_src/source/_themes/eldocs/layout.html +++ b/user_guide_src/source/_themes/eldocs/layout.html @@ -9,6 +9,9 @@ {%- if project == 'ExpressionEngine' %}{% set project_abbreviation = 'ee' %}{% set project_domain = 'expressionengine.com' %}{% endif -%} {%- if project == 'CodeIgniter' %}{% set project_abbreviation = 'ci' %}{% set project_domain = 'codeigniter.com' %}{% endif -%} {%- if project == 'MojoMotor' %}{% set project_abbreviation = 'mm' %}{% set project_domain = 'mojomotor.com' %}{% endif -%} +{%- set exclude_comments = ['index', 'license', 'changelog', + 'development/index', 'development/extension_hooks/index', + 'development/guidelines/template'] %} @@ -85,10 +88,6 @@
{{ project }}

{{ release }} User Guide

- {%- if show_source and has_source and sourcename %} -

{{ _('Show Source') }}

- {%- endif %}
@@ -124,49 +124,9 @@ {%- block footer %} {%- endblock %} - - - - \ No newline at end of file + diff --git a/user_guide_src/source/_themes/eldocs/static/asset/css/common.css b/user_guide_src/source/_themes/eldocs/static/asset/css/common.css index 66768bac6..6cabda037 100644 --- a/user_guide_src/source/_themes/eldocs/static/asset/css/common.css +++ b/user_guide_src/source/_themes/eldocs/static/asset/css/common.css @@ -49,7 +49,9 @@ h1, h2, h3, h4, h5, h6, pre{ color: #094776; } h1{ font-size: 28px; } -h2{ font-size: 24px; } +h2{ font-size: 24px; font-weight: normal; } + +h1, h2, h3, h4, h5, h6{ margin-bottom: 20px; } h2, h3{ border-bottom: 2px solid #EEEEEE; padding: 0 0 3px; } @@ -73,6 +75,10 @@ p, dl, ul, ol{ margin: 20px 0; } li > ol{ margin: 0; margin-left: 40px; } dl > dd{ margin-left: 20px; } + + li > p { margin: 0; } + +#expressionengine-user-guide li em { font-style: normal; } p, li, dd, dt, pre{ line-height: 1.5; } @@ -141,39 +147,31 @@ img{ display: block; max-width: 100%; } fieldset{ border: 0; } .top{ float: right; } -.next{ padding: 0 20px 0 10px; } -.prev{ padding-right: 10px; } -.highlight-ci, +.admonition, .highlight-ee, +.highlight-ci, .highlight-rst, .highlight-bash, .highlight-perl, +.highlight-php, .cp-path, -.important, -.note{ - background-color: #F5FBFF; +.codeblock{ + background-color: #F9FEFF; border: 1px solid #C8DEF0; - margin: 20px 0 20px 20px; + -moz-box-shadow: 4px 4px 0 rgba(0,0,0,0.03); + -webkit-box-shadow: 4px 4px 0 rgba(0,0,0,0.03); + box-shadow: 4px 4px 0 rgba(0,0,0,0.03); + margin: 20px 0; padding: 10px 10px 8px; } - .highlight-ci, - .highlight-ee, - .highlight-rst, - .highlight-bash, - .highlight-perl{ - -moz-box-shadow: 4px 4px 0 rgba(0,0,0,0.03); - -webkit-box-shadow: 4px 4px 0 rgba(0,0,0,0.03); - box-shadow: 4px 4px 0 rgba(0,0,0,0.03); - } - - .cp-path{ background-color: #FFFDED; border-color: #D1CDB0; } - .important, .note{ background-color: #F2FFE8; border-color: #B9D3A6; } - .highlight-rst{ background-color: #F9FEFE; border-color: #AACFCF; } + .admonition p{ margin: 0; } + + .codeblock{ margin: 10px 0; } - .important p, - .note p{ margin: 0; } + .cp-path{ background-color: #FAFFF6; border-color: #D1CDB0; } + .important, .note{ background-color: #FFFFF2; border-color: #C8C8A5; } .admonition-title{ float: left; @@ -295,6 +293,43 @@ fieldset{ border: 0; } #footer p{ margin: 0; } +#comments, +#feedLink{ background: #FCFCFC; padding: 1px 40px 20px; } + + #comments{ border-top: 1px solid #CCCCCC; } + #comments h3{ margin: 20px 0; } + +.comments td.avatar{ min-width: 100px; } + +.comments td.column1, +.comments td.post{ background-color: #FFFFFF; padding: 10px; } + +.comments td.staffeven{ border-left: 10px solid #C8DEF0; } + +#comment_form p, +.comments p{ margin: 0; } + + .comments p{ margin-bottom: 10px; } + +#comment_form textarea{ + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin-bottom: 10px; + resize: none; + width: 100%; +} + +#comment_form input[type="submit"]{ margin-top: 10px; } + + #comment_form textarea:focus{ background-color: #FFFFF2; border: 1px solid #666666; outline: 0; } + + #commentFormInstructions{ font-size: 12px; margin: 20px 0; } + + #feedLink a{ font-size: 16px; } + + #feedLink a img{ float: left; margin-right: 5px; } + @media (max-width:800px){ #footer .top, #header form{ float: none; margin-bottom: 10px; } @@ -310,4 +345,4 @@ fieldset{ border: 0; } @media screen and (-webkit-min-device-pixel-ratio:0){ #header input[type="submit"]{ padding-bottom: 7px; } -} \ No newline at end of file +} diff --git a/user_guide_src/source/general/welcome.rst b/user_guide_src/source/general/welcome.rst new file mode 100644 index 000000000..b28c3bcc2 --- /dev/null +++ b/user_guide_src/source/general/welcome.rst @@ -0,0 +1,32 @@ +###################### +Welcome to CodeIgniter +###################### + +CodeIgniter is an Application Development Framework - a toolkit - for +people who build web sites using PHP. Its goal is to enable you to +develop projects much faster than you could if you were writing code +from scratch, by providing a rich set of libraries for commonly needed +tasks, as well as a simple interface and logical structure to access +these libraries. CodeIgniter lets you creatively focus on your project +by minimizing the amount of code needed for a given task. + +*********************** +Who is CodeIgniter For? +*********************** + +CodeIgniter is right for you if: + +- You want a framework with a small footprint. +- You need exceptional performance. +- You need broad compatibility with standard hosting accounts that run + a variety of PHP versions and configurations. +- You want a framework that requires nearly zero configuration. +- You want a framework that does not require you to use the command + line. +- You want a framework that does not require you to adhere to + restrictive coding rules. +- You are not interested in large-scale monolithic libraries like PEAR. +- You do not want to be forced to learn a templating language (although + a template parser is optionally available if you desire one). +- You eschew complexity, favoring simple solutions. +- You need clear, thorough documentation. diff --git a/user_guide_src/source/index.rst b/user_guide_src/source/index.rst index 6cdeb2442..c89b41c74 100644 --- a/user_guide_src/source/index.rst +++ b/user_guide_src/source/index.rst @@ -1,34 +1,95 @@ -Welcome to CodeIgniter -====================== - -CodeIgniter is an Application Development Framework - a toolkit - for -people who build web sites using PHP. Its goal is to enable you to -develop projects much faster than you could if you were writing code -from scratch, by providing a rich set of libraries for commonly needed -tasks, as well as a simple interface and logical structure to access -these libraries. CodeIgniter lets you creatively focus on your project -by minimizing the amount of code needed for a given task. - -Who is CodeIgniter For? -======================= - -CodeIgniter is right for you if: - -- You want a framework with a small footprint. -- You need exceptional performance. -- You need broad compatibility with standard hosting accounts that run - a variety of PHP versions and configurations. -- You want a framework that requires nearly zero configuration. -- You want a framework that does not require you to use the command - line. -- You want a framework that does not require you to adhere to - restrictive coding rules. -- You are not interested in large-scale monolithic libraries like PEAR. -- You do not want to be forced to learn a templating language (although - a template parser is optionally available if you desire one). -- You eschew complexity, favoring simple solutions. -- You need clear, thorough documentation. +###################### +CodeIgniter User Guide +###################### +- :doc:`License Agreement ` +- :doc:`Change Log ` + +.. contents:: + :local: + :depth: 2 + +******* +Welcome +******* + +- :doc:`general/welcome` + +********** +Basic Info +********** + +- :doc:`general/requirements` +- :doc:`general/credits` + +************ +Installation +************ + +- :doc:`installation/downloads` +- :doc:`installation/index` +- :doc:`installation/upgrading` +- :doc:`installation/troubleshooting` + +************ +Introduction +************ + +- :doc:`overview/getting_started` +- :doc:`overview/at_a_glance` +- :doc:`overview/cheatsheets` +- :doc:`overview/features` +- :doc:`overview/appflow` +- :doc:`overview/mvc` +- :doc:`overview/goals` + +******** +Tutorial +******** + +- :doc:`tutorial/index` +- :doc:`tutorial/static_pages` +- :doc:`tutorial/news_section` +- :doc:`tutorial/create_news_items` +- :doc:`tutorial/conclusion` + +************** +General Topics +************** + +.. toctree:: + :glob: + :titlesonly: + + general/index + +***************** +Library Reference +***************** + +.. toctree:: + :glob: + :titlesonly: + + libraries/index + +**************** +Driver Reference +**************** + +- :doc:`libraries/caching` +- :doc:`database/index` +- :doc:`libraries/javascript` + +**************** +Helper Reference +**************** + +.. toctree:: + :glob: + :titlesonly: + + helpers/index .. toctree:: :glob: -- cgit v1.2.3-24-g4f1b From 4b84d62490e3c17c18f0d1681d713da57a2c82ba Mon Sep 17 00:00:00 2001 From: Marco Monteiro Date: Tue, 26 Jun 2012 11:53:20 +0100 Subject: Updated pagination library documentation with prefix and suffix --- user_guide_src/source/libraries/pagination.rst | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/pagination.rst b/user_guide_src/source/libraries/pagination.rst index 15b3675df..6e1020be3 100644 --- a/user_guide_src/source/libraries/pagination.rst +++ b/user_guide_src/source/libraries/pagination.rst @@ -21,9 +21,9 @@ Here is a simple example showing how to create pagination in one of your $config['base_url'] = 'http://example.com/index.php/test/page/'; $config['total_rows'] = 200; - $config['per_page'] = 20; + $config['per_page'] = 20; - $this->pagination->initialize($config); + $this->pagination->initialize($config); echo $this->pagination->create_links(); @@ -115,9 +115,9 @@ configured using $config['query_string_segment'] = 'your_string' $config['reuse_query_string'] = FALSE; ==================================== -By default your Query String arguments (nothing to do with other -query string options) will be ignored. Setting this config to -TRUE will add existing query string arguments back into the +By default your Query String arguments (nothing to do with other +query string options) will be ignored. Setting this config to +TRUE will add existing query string arguments back into the URL after the URI segment and before the suffix :: @@ -127,6 +127,18 @@ URL after the URI segment and before the suffix This helps you mix together normal :doc:`URI Segments <../general/urls>` as well as query string arguments, which until 3.0 was not possible. +$config['prefix'] = ''; +================================== + +A custom prefix added to the path. The prefix value will be right before +the offset segment. + +$config['suffix'] = ''; +================================== + +A custom suffix added to the path. The sufix value will be right after +the offset segment. + *********************** Adding Enclosing Markup *********************** -- cgit v1.2.3-24-g4f1b From 1a24a9da3cfbacf8802ffd0b79f5494d30278007 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 27 Jun 2012 00:52:47 +0300 Subject: Fix issue #427 --- user_guide_src/source/changelog.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 28e2f94bb..27381b49a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -70,7 +70,8 @@ Release Date: Not Released - ``set_realpath()`` can now also handle file paths as opposed to just directories. - Added an optional paramater to ``delete_files()`` to enable it to skip deleting files such as .htaccess and index.html. - ``read_file()`` is now a deprecated alias of ``file_get_contents()``. - - :doc:`Date Helper ` Added optional fourth parameter to ``timezone_menu()`` that allows more attributes to be added to the generated select tag + - Added an optional parameter to :doc:`Date Helper ` function ``timezone_menu()`` that allows more attributes to be added to the generated select tag. + - :doc:`Security Helper ` function ``strip_image_tags()`` is now an alias for the same method in the :doc:`Security Library `. - Database @@ -190,6 +191,7 @@ Release Date: Not Released - $config['time_reference'] now supports all timezone strings supported by PHP. - Added support for HTTP code 303 ("See Other") in set_status_header(). - Changed :doc:`Config Library ` method site_url() to accept an array as well. + - Added method ``strip_image_tags()`` to the :doc:`Security Library `. Bug fixes for 3.0 ------------------ @@ -294,6 +296,7 @@ Bug fixes for 3.0 - Fixed a bug where :doc:`URL Helper ` function anchor_popup() ignored the attributes argument if it is not an array. - Fixed a bug (#1328) - :doc:`Form Validation Library ` didn't properly check the type of the form fields before processing them. - Fixed a bug (#79) - :doc:`Form Validation Library ` didn't properly validate array fields that use associative keys or have custom indexes. +- Fixed a bug (#427) - :doc:`Form Validation Library ` method ``strip_image_tags()`` was an alias to a non-existent method. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 2fce2a95e99c91c57f7d15b5e441b2cf89193da3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 27 Jun 2012 01:07:56 +0300 Subject: URL Helper redirect() to utilize HTTP/1.1 response code 303 See Other --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 27381b49a..17fb6472a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -57,6 +57,7 @@ Release Date: Not Released - ``url_title()`` will now trim extra dashes from beginning and end. - ``anchor_popup()`` will now fill the "href" attribute with the URL and its JS code will return false instead. - Added JS window name support to ``anchor_popup()`` function. + - Added support (auto-detection) for HTTP/1.1 response code 303 in ``redirect()``. - Added XHTML Basic 1.1 doctype to :doc:`HTML Helper `. - Changed ``humanize()`` to include a second param for the separator. - Refactored ``plural()`` and ``singular()`` to avoid double pluralization and support more words. -- cgit v1.2.3-24-g4f1b From a36fd63379cba76128ed4a0d88e9466abb4419d8 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Wed, 27 Jun 2012 02:46:19 +0200 Subject: FTP Class documentation cleanup Since PHP 5 is required, setting permissions is always possible. --- user_guide_src/source/libraries/ftp.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/ftp.rst b/user_guide_src/source/libraries/ftp.rst index 20b11a5c8..05a3fdcc8 100644 --- a/user_guide_src/source/libraries/ftp.rst +++ b/user_guide_src/source/libraries/ftp.rst @@ -26,7 +26,7 @@ Usage Examples In this example a connection is opened to the FTP server, and a local file is read and uploaded in ASCII mode. The file permissions are set to -755. Note: Setting permissions requires PHP 5. +755. :: @@ -136,8 +136,7 @@ Example:: **Mode options are:** ascii, binary, and auto (the default). If auto is used it will base the mode on the file extension of the source file. -Permissions are available if you are running PHP 5 and can be passed as -an octal value in the fourth parameter. +If set, permissions have to be passed as an octal value. $this->ftp->download() ====================== -- cgit v1.2.3-24-g4f1b From 384b34217b3709d3b3f11dbda3ac5c53274ff117 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 27 Jun 2012 08:06:06 -0400 Subject: Update other email validation methods --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c0fa9d7f7..cc6220253 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -73,6 +73,7 @@ Release Date: Not Released - ``read_file()`` is now a deprecated alias of ``file_get_contents()``. - Added an optional parameter to :doc:`Date Helper ` function ``timezone_menu()`` that allows more attributes to be added to the generated select tag. - :doc:`Security Helper ` function ``strip_image_tags()`` is now an alias for the same method in the :doc:`Security Library `. + - Updated email validation methods to use filter_var so they are more accurate. - Database -- cgit v1.2.3-24-g4f1b From 580388bc79e340ddf44f52853524ecc03b9d339c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 27 Jun 2012 15:43:46 +0300 Subject: valid_email() to always return boolean --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cc6220253..70d0c80a9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -48,6 +48,7 @@ Release Date: Not Released - Global config files are loaded first, then environment ones. Environment config keys overwrite base ones, allowing to only set the keys we want changed per environment. - Changed detection of ``$view_folder`` so that if it's not found in the current path, it will now also be searched for under the application folder. - Path constants BASEPATH, APPPATH and VIEWPATH are now (internally) defined as absolute paths. + - Updated email validation methods to use filter_var() instead of PCRE. - Helpers @@ -73,7 +74,6 @@ Release Date: Not Released - ``read_file()`` is now a deprecated alias of ``file_get_contents()``. - Added an optional parameter to :doc:`Date Helper ` function ``timezone_menu()`` that allows more attributes to be added to the generated select tag. - :doc:`Security Helper ` function ``strip_image_tags()`` is now an alias for the same method in the :doc:`Security Library `. - - Updated email validation methods to use filter_var so they are more accurate. - Database -- cgit v1.2.3-24-g4f1b From d580999cead0aa37d705c2f32e02712a2d522deb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 28 Jun 2012 14:06:54 +0300 Subject: Fix issue #1545 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 70d0c80a9..d2774ca12 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -299,6 +299,7 @@ Bug fixes for 3.0 - Fixed a bug (#1328) - :doc:`Form Validation Library ` didn't properly check the type of the form fields before processing them. - Fixed a bug (#79) - :doc:`Form Validation Library ` didn't properly validate array fields that use associative keys or have custom indexes. - Fixed a bug (#427) - :doc:`Form Validation Library ` method ``strip_image_tags()`` was an alias to a non-existent method. +- Fixed a bug (#1545) - :doc:`Query Builder ` method ``limit()`` wasn't executed properly under Oracle. Version 2.1.1 ============= -- cgit v1.2.3-24-g4f1b From 58dfc089bf5b0ca35c2ff244e5bfdff726f9adcd Mon Sep 17 00:00:00 2001 From: Melounek Date: Fri, 29 Jun 2012 08:43:47 +0200 Subject: added parameter for returned-path in Email::from() --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/libraries/email.rst | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 28e2f94bb..4f5915de8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -138,6 +138,7 @@ Release Date: Not Released - CI_Loader::_ci_autoloader() is now a protected method. - Added custom filename to Email::attach() as $this->email->attach($filename, $disposition, $newname). - Added possibility to send attachment as buffer string in Email::attach() as $this->email->attach($buffer, $disposition, $newname, $mime). + - Added third parameter $return_path for method Email::from(). - :doc:`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". diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index f99eb91df..8d2549d11 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -117,6 +117,13 @@ Sets the email address and name of the person sending the email:: $this->email->from('you@example.com', 'Your Name'); +:: + + $this->email->from('you@example.com', 'Your Name', 'returned_emails@example.com'); + +Third parameter is redirect for undelivered emails (may not be configured with +protocol 'smtp'). + $this->email->reply_to() ------------------------- -- cgit v1.2.3-24-g4f1b From c254792b02cccebb10993feed58fb9ed63a28ebc Mon Sep 17 00:00:00 2001 From: Christopher Guiney Date: Sun, 1 Jul 2012 12:10:29 -0700 Subject: updated the changelog --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d2774ca12..50dab92ac 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -136,7 +136,7 @@ Release Date: Not Released - Added unbuffered_row() method for getting a row without prefetching whole result (consume less memory). - Libraries - + - CI_Session now respects php.ini's session.gc_probability and session.gc_divisor - Added max_filename_increment config setting for Upload library. - CI_Loader::_ci_autoloader() is now a protected method. - Added custom filename to Email::attach() as $this->email->attach($filename, $disposition, $newname). -- cgit v1.2.3-24-g4f1b From ec90216969c2d7bea46a073ecc9c8a95d42f7d92 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 2 Jul 2012 15:57:34 +0300 Subject: Update changelog with changes from 2.1.2 --- user_guide_src/source/changelog.rst | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 50dab92ac..5f38b58b3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -301,10 +301,18 @@ Bug fixes for 3.0 - Fixed a bug (#427) - :doc:`Form Validation Library ` method ``strip_image_tags()`` was an alias to a non-existent method. - Fixed a bug (#1545) - :doc:`Query Builder ` method ``limit()`` wasn't executed properly under Oracle. +Version 2.1.2 +============= + +Release Date: June 29, 2012 + +- General Changes + - Improved security in ``xss_clean()``. + Version 2.1.1 ============= -Release Date: June 13, 2012 +Release Date: June 12, 2012 - General Changes - Fixed support for docx, xlsx files in mimes.php. @@ -315,20 +323,20 @@ Release Date: June 13, 2012 - Added support for the IP format parameter to the :doc:`Form Validation Library `. - Helpers - - url_title() performance and output improved. You can now use any string as the word delimiter, but 'dash' and 'underscore' are still supported. + - ``url_title()`` performance and output improved. You can now use any string as the word delimiter, but 'dash' and 'underscore' are still supported. Bug fixes for 2.1.1 ------------------- -- Fixed a bug (#697) - A wrong array key was used in the Upload library to check for mime-types. -- Fixed a bug - form_open() compared $action against site_url() instead of base_url(). -- Fixed a bug - CI_Upload::_file_mime_type() could've failed if mime_content_type() is used for the detection and returns FALSE. +- Fixed a bug (#697) - A wrong array key was used in the :doc:`File Uploading Library ` to check for mime-types. +- Fixed a bug - ``form_open()`` compared $action against ``site_url()`` instead of ``base_url()``. +- Fixed a bug - ``CI_Upload::_file_mime_type()`` could've failed if ``mime_content_type()`` is used for the detection and returns FALSE. - Fixed a bug (#538) - Windows paths were ignored when using the :doc:`Image Manipulation Library ` to create a new file. - Fixed a bug - When database caching was enabled, $this->db->query() checked the cache before binding variables which resulted in cached queries never being found. - Fixed a bug - CSRF cookie value was allowed to be any (non-empty) string before being written to the output, making code injection a risk. - Fixed a bug (#726) - PDO put a 'dbname' argument in it's connection string regardless of the database platform in use, which made it impossible to use SQLite. -- Fixed a bug - CI_DB_pdo_driver::num_rows() was not returning properly value with SELECT queries, cause it was relying on PDOStatement::rowCount(). -- Fixed a bug (#1059) - CI_Image_lib::clear() was not correctly clearing all necessary object properties, namely width and height. +- Fixed a bug - ``CI_DB_pdo_driver::num_rows()`` was not returning properly value with SELECT queries, cause it was relying on ``PDOStatement::rowCount()``. +- Fixed a bug (#1059) - ``CI_Image_lib::clear()`` was not correctly clearing all necessary object properties, namely width and height. Version 2.1.0 ============= -- cgit v1.2.3-24-g4f1b From 0cd553566578dd4c23e1541fc837901bdfefa831 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Mon, 2 Jul 2012 15:20:42 +0200 Subject: Update Array Helper documentation default value of the "default value" parameter has changed in element() and elements() methods --- user_guide_src/source/helpers/array_helper.rst | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/array_helper.rst b/user_guide_src/source/helpers/array_helper.rst index 4308753bb..15b5e17c4 100644 --- a/user_guide_src/source/helpers/array_helper.rst +++ b/user_guide_src/source/helpers/array_helper.rst @@ -21,17 +21,17 @@ The following functions are available: element() ========= -.. php:method:: element($item, $array, $default = FALSE) +.. php:method:: element($item, $array, $default = NULL) :param string $item: Item to fetch from the array :param array $array: Input array :param boolean $default: What to return if the array isn't valid - :returns: FALSE on failure or the array item. + :returns: NULL on failure or the array item. Lets you fetch an item from an array. The function tests whether the array index is set and whether it has a value. If a value exists it is -returned. If a value does not exist it returns FALSE, or whatever you've +returned. If a value does not exist it returns NULL, or whatever you've specified as the default value via the third parameter. Example :: @@ -43,31 +43,31 @@ specified as the default value via the third parameter. Example ); echo element('color', $array); // returns "red" - echo element('size', $array, NULL); // returns NULL + echo element('size', $array, 'foobar'); // returns "foobar" elements() ========== Lets you fetch a number of items from an array. The function tests whether each of the array indices is set. If an index does not exist it -is set to FALSE, or whatever you've specified as the default value via +is set to NULL, or whatever you've specified as the default value via the third parameter. -.. php:method:: elements($items, $array, $default = FALSE) +.. php:method:: elements($items, $array, $default = NULL) :param string $item: Item to fetch from the array :param array $array: Input array :param boolean $default: What to return if the array isn't valid - :returns: FALSE on failure or the array item. + :returns: NULL on failure or the array item. Example :: $array = array( - 'color' => 'red',   - 'shape' => 'round',      - 'radius' => '10',      + 'color' => 'red', + 'shape' => 'round', + 'radius' => '10', 'diameter' => '20' ); @@ -78,25 +78,25 @@ The above will return the following array :: array( - 'color' => 'red',      - 'shape' => 'round',      - 'height' => FALSE + 'color' => 'red', + 'shape' => 'round', + 'height' => NULL ); You can set the third parameter to any default value you like :: - $my_shape = elements(array('color', 'shape', 'height'), $array, NULL); + $my_shape = elements(array('color', 'shape', 'height'), $array, 'foobar'); The above will return the following array :: array(      - 'color' => 'red',      - 'shape' => 'round',      - 'height' => NULL + 'color' => 'red', + 'shape' => 'round', + 'height' => 'foobar' ); This is useful when sending the $_POST array to one of your Models. -- cgit v1.2.3-24-g4f1b From a6ea5721bc34fe8666d403637e3bd84772e73566 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 2 Jul 2012 16:33:11 +0300 Subject: Fix issue #1551 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5f38b58b3..4dc6c3f8e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -300,6 +300,7 @@ Bug fixes for 3.0 - Fixed a bug (#79) - :doc:`Form Validation Library ` didn't properly validate array fields that use associative keys or have custom indexes. - Fixed a bug (#427) - :doc:`Form Validation Library ` method ``strip_image_tags()`` was an alias to a non-existent method. - Fixed a bug (#1545) - :doc:`Query Builder ` method ``limit()`` wasn't executed properly under Oracle. +- Fixed a bug (#1551) - :doc:`Date Helper ` function ``standard_date()`` didn't properly format *W3C* and *ATOM* standard dates. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From c02e7c5d929d17e3448b944e2279a4c6dc338614 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 2 Jul 2012 16:43:43 +0300 Subject: Add changelog entry for pull #1556 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4dc6c3f8e..d8b935252 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -175,6 +175,7 @@ Release Date: Not Released - Added support for setting custom attributes. - Deprecated usage of the "anchor_class" setting (use the new "attributes" setting instead). - Added $config['reuse_query_string'] to allow automatic repopulation of query string arguments, combined with normal URI segments. + - Added the ability to use a proxy with the :doc:`XML-RPC Library `. - Core -- cgit v1.2.3-24-g4f1b From 655cfb789ec2a818ab0c8735224db1a4f79cdef0 Mon Sep 17 00:00:00 2001 From: Omar Date: Mon, 2 Jul 2012 13:53:00 -0300 Subject: Added changelog entry --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d2774ca12..a2446259a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -150,6 +150,7 @@ Release Date: Not Released - Added support for 3-length hex color values for wm_font_color and wm_shadow_color properties, as well as validation for them. - Class properties wm_font_color, wm_shadow_color and wm_use_drop_shadow are now protected, to avoid breaking the text_watermark() method if they are set manually after initialization. - If property maintain_ratio is set to TRUE, image_reproportion() now doesn't need both width and height to be specified. + - Property maintain_ratio is now taken into account when resizing images using ImageMagick library - Removed SHA1 function in the :doc:`Encryption Library `. - Added $config['csrf_regeneration'] to the CSRF protection in the :doc:`Security library `, which makes token regeneration optional. - Added $config['csrf_exclude_uris'] to the CSRF protection in the :doc:`Security library `, which allows you list URIs which will not have the CSRF validation functions run. -- cgit v1.2.3-24-g4f1b From f3ab257d9f4efdb9658135fae89f3c3eec6b6a47 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 2 Jul 2012 11:12:44 -0700 Subject: Adding contribution guidelines to user guide, including new Developer's Certificate of Origin --- user_guide_src/source/DCO.rst | 27 +++ user_guide_src/source/contributing/index.rst | 105 ++++++++++++ user_guide_src/source/index.rst | 11 ++ user_guide_src/source/license_afl.rst | 245 +++++++++++++++++++++++++++ 4 files changed, 388 insertions(+) create mode 100644 user_guide_src/source/DCO.rst create mode 100644 user_guide_src/source/contributing/index.rst create mode 100644 user_guide_src/source/license_afl.rst (limited to 'user_guide_src') diff --git a/user_guide_src/source/DCO.rst b/user_guide_src/source/DCO.rst new file mode 100644 index 000000000..c8f9b49c6 --- /dev/null +++ b/user_guide_src/source/DCO.rst @@ -0,0 +1,27 @@ +##################################### +Developer's Certificate of Origin 1.1 +##################################### + +By making a contribution to this project, I certify that: + +(1) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(2) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(3) The contribution was provided directly to me by some other + person who certified (1), (2) or (3) and I have not modified + it. + +(4) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. diff --git a/user_guide_src/source/contributing/index.rst b/user_guide_src/source/contributing/index.rst new file mode 100644 index 000000000..2ede0e6e5 --- /dev/null +++ b/user_guide_src/source/contributing/index.rst @@ -0,0 +1,105 @@ +########################### +Contributing to CodeIgniter +########################### + +CodeIgniter is a community driven project and accepts contributions of code +and documentation from the community. These contributions are made in the form +of Issues or `Pull Requests `_ on +the `EllisLab CodeIgniter repository +`_ on GitHub. + +Issues are a quick way to point out a bug. If you find a bug or documentation +error in CodeIgniter then please check a few things first: + +- There is not already an open Issue +- The issue has already been fixed (check the develop branch, or look for + closed Issues) +- Is it something really obvious that you fix it yourself? + +Reporting issues is helpful but an even better approach is to send a Pull +Request, which is done by "Forking" the main repository and committing to your +own copy. This will require you to use the version control system called Git. + +********** +Guidelines +********** + +Before we look into how, here are the guidelines. If your Pull Requests fail +to pass these guidelines it will be declined and you will need to re-submit +when you’ve made the changes. This might sound a bit tough, but it is required +for us to maintain quality of the code-base. + +PHP Style +========= + +All code must meet the `Style Guide +`_, which is +essentially the `Allman indent style +`_, underscores and +readable operators. This makes certain that all code is the same format as the +existing code and means it will be as readable as possible. + +Documentation +============= + +If you change anything that requires a change to documentation then you will +need to add it. New classes, methods, parameters, changing default values, etc +are all things that will require a change to documentation. The change-log +must also be updated for every change. Also PHPDoc blocks must be maintained. + +Compatibility +============= + +CodeIgniter is compatible with PHP 5.2.4 so all code supplied must stick to +this requirement. If PHP 5.3 or 5.4 functions or features are used then there +must be a fallback for PHP 5.2.4. + +Branching +========= + +CodeIgniter uses the `Git-Flow +`_ branching model +which requires all pull requests to be sent to the "develop" branch. This is +where the next planned version will be developed. The "master" branch will +always contain the latest stable version and is kept clean so a "hotfix" (e.g: +an emergency security patch) can be applied to master to create a new version, +without worrying about other features holding it up. For this reason all +commits need to be made to "develop" and any sent to "master" will be closed +automatically. If you have multiple changes to submit, please place all +changes into their own branch on your fork. + +One thing at a time: A pull request should only contain one change. That does +not mean only one commit, but one change - however many commits it took. The +reason for this is that if you change X and Y but send a pull request for both +at the same time, we might really want X but disagree with Y, meaning we +cannot merge the request. Using the Git-Flow branching model you can create +new branches for both of these features and send two requests. + +Signing +======= +You must sign your work, certifying that you either wrote the work or +otherwise have the right to pass it on to an open source project. git makes +this trivial as you merely have to use `--signoff` on your commits to your +CodeIgniter fork. + +.. code-block:: bash + + git commit --signoff + +or simply + +.. code-block:: bash + + git commit -s + +This will sign your commits with the information setup in your git config, e.g. + + Signed-off-by: John Q Public + +If you are using Tower there is a "Sign-Off" checkbox in the commit window. You +could even alias git commit to use the -s flag so you don’t have to think about +it. + +By signing your work in this manner, you certify to a "Developer's Certificate +or Origin". The current version of this certificate is in the :doc:`/DCO` file +in the root of this documentation. diff --git a/user_guide_src/source/index.rst b/user_guide_src/source/index.rst index c89b41c74..a349d8bce 100644 --- a/user_guide_src/source/index.rst +++ b/user_guide_src/source/index.rst @@ -91,6 +91,17 @@ Helper Reference helpers/index +*************************** +Contributing to CodeIgniter +*************************** + +.. toctree:: + :glob: + :titlesonly: + + contributing/index + DCO + .. toctree:: :glob: :titlesonly: diff --git a/user_guide_src/source/license_afl.rst b/user_guide_src/source/license_afl.rst new file mode 100644 index 000000000..ca39be9b6 --- /dev/null +++ b/user_guide_src/source/license_afl.rst @@ -0,0 +1,245 @@ +################################### +Academic Free License ("AFL") v 3.0 +################################### + +This Academic Free License (the "License") applies to any original work of +authorship (the "Original Work") whose owner (the "Licensor") has placed the +following licensing notice adjacent to the copyright notice for the Original +Work: + +*Licensed under the Academic Free License version 3.0* + + +***************************** +1) Grant of Copyright License +***************************** + +Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable +license, for the duration of the copyright, to do the following: + + *a)* to reproduce the Original Work in copies, either alone or as part of + a collective work; + + *b)* to translate, adapt, alter, transform, modify, or arrange the + Original Work, thereby creating derivative works ("Derivative Works") + based upon the Original Work; + + *c)* to distribute or communicate copies of the Original Work and + Derivative Works to the public, *under any license of your choice that + does not contradict the terms and conditions, including Licensor's + reserved rights and remedies, in this Academic Free License*; + + *d)* to perform the Original Work publicly; and + + *e)* to display the Original Work publicly. + + +************************** +2) Grant of Patent License +************************** + +Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable +license, under patent claims owned or controlled by the Licensor that are +embodied in the Original Work as furnished by the Licensor, for the duration +of the patents, to make, use, sell, offer for sale, have made, and import the +Original Work and Derivative Works. + + +******************************* +3) Grant of Source Code License +******************************* + +The term "Source Code" means the preferred form of the Original Work for +making modifications to it and all available documentation describing how to +modify the Original Work. Licensor agrees to provide a machine-readable copy +of the Source Code of the Original Work along with each copy of the Original +Work that Licensor distributes. Licensor reserves the right to satisfy this +obligation by placing a machine-readable copy of the Source Code in an +information repository reasonably calculated to permit inexpensive and +convenient access by You for as long as Licensor continues to distribute the +Original Work. + + +******************************** +4) Exclusions From License Grant +******************************** + +Neither the names of Licensor, nor the names of any contributors to the +Original Work, nor any of their trademarks or service marks, may be used to +endorse or promote products derived from this Original Work without express +prior permission of the Licensor. Except as expressly stated herein, nothing +in this License grants any license to Licensor's trademarks, copyrights, +patents, trade secrets or any other intellectual property. No patent license +is granted to make, use, sell, offer for sale, have made, or import +embodiments of any patent claims other than the licensed claims defined in +Section 2) No license is granted to the trademarks of Licensor even if such +marks are included in the Original Work. Nothing in this License shall be +interpreted to prohibit Licensor from licensing under terms different from +this License any Original Work that Licensor otherwise would have a right to +license. + + +********************** +5) External Deployment +********************** + +The term "External Deployment" means the use, distribution, or communication +of the Original Work or Derivative Works in any way such that the Original +Work or Derivative Works may be used by anyone other than You, whether those +works are distributed or communicated to those persons or made available as an +application intended for use over a network. As an express condition for the +grants of license hereunder, You must treat any External Deployment by You of +the Original Work or a Derivative Work as a distribution under section 1(c). + + +********************* +6) Attribution Rights +********************* + +You must retain, in the Source Code of any Derivative Works that You create, +all copyright, patent, or trademark notices from the Source Code of the +Original Work, as well as any notices of licensing and any descriptive text +identified therein as an "Attribution Notice." You must cause the Source Code +for any Derivative Works that You create to carry a prominent Attribution +Notice reasonably calculated to inform recipients that You have modified the +Original Work. + + +**************************************************** +7) Warranty of Provenance and Disclaimer of Warranty +**************************************************** + +Licensor warrants that the copyright in and to the Original Work and the +patent rights granted herein by Licensor are owned by the Licensor or are +sublicensed to You under the terms of this License with the permission of the +contributor(s) of those copyrights and patent rights. Except as expressly +stated in the immediately preceding sentence, the Original Work is provided +under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or +implied, including, without limitation, the warranties of non-infringement, +merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE +QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY +constitutes an essential part of this License. No license to the Original Work +is granted by this License except under this disclaimer. + + +************************** +8) Limitation of Liability +************************** + +Under no circumstances and under no legal theory, whether in tort (including +negligence), contract, or otherwise, shall the Licensor be liable to anyone +for any indirect, special, incidental, or consequential damages of any +character arising as a result of this License or the use of the Original Work +including, without limitation, damages for loss of goodwill, work stoppage, +computer failure or malfunction, or any and all other commercial damages or +losses. This limitation of liability shall not apply to the extent applicable +law prohibits such limitation. + + +***************************** +9) Acceptance and Termination +***************************** + +If, at any time, You expressly assented to this License, that assent indicates +your clear and irrevocable acceptance of this License and all of its terms and +conditions. If You distribute or communicate copies of the Original Work or a +Derivative Work, You must make a reasonable effort under the circumstances to +obtain the express assent of recipients to the terms of this License. This +License conditions your rights to undertake the activities listed in Section +1, including your right to create Derivative Works based upon the Original +Work, and doing so without honoring these terms and conditions is prohibited +by copyright law and international treaty. Nothing in this License is intended +to affect copyright exceptions and limitations (including "fair use" or "fair +dealing"). This License shall terminate immediately and You may no longer +exercise any of the rights granted to You by this License upon your failure to +honor the conditions in Section 1(c). + + +********************************* +10) Termination for Patent Action +********************************* + +This License shall terminate automatically and You may no longer exercise any +of the rights granted to You by this License as of the date You commence an +action, including a cross-claim or counterclaim, against Licensor or any +licensee alleging that the Original Work infringes a patent. This termination +provision shall not apply for an action alleging patent infringement by +combinations of the Original Work with other software or hardware. + + +***************************************** +11) Jurisdiction, Venue and Governing Law +***************************************** + +Any action or suit relating to this License may be brought only in the courts +of a jurisdiction wherein the Licensor resides or in which Licensor conducts +its primary business, and under the laws of that jurisdiction excluding its +conflict-of-law provisions. The application of the United Nations Convention +on Contracts for the International Sale of Goods is expressly excluded. Any +use of the Original Work outside the scope of this License or after its +termination shall be subject to the requirements and penalties of copyright or +patent law in the appropriate jurisdiction. This section shall survive the +termination of this License. + + +******************* +12) Attorneys' Fees +******************* + +In any action to enforce the terms of this License or seeking damages relating +thereto, the prevailing party shall be entitled to recover its costs and +expenses, including, without limitation, reasonable attorneys' fees and costs +incurred in connection with such action, including any appeal of such action. +This section shall survive the termination of this License. + + +***************** +13) Miscellaneous +***************** + +If any provision of this License is held to be unenforceable, such provision +shall be reformed only to the extent necessary to make it enforceable. + + +*************************************** +14) Definition of "You" in This License +*************************************** + +"You" throughout this License, whether in upper or lower case, means an +individual or a legal entity exercising rights under, and complying with all +of the terms of, this License. For legal entities, "You" includes any entity +that controls, is controlled by, or is under common control with you. For +purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + + +**************** +15) Right to Use +**************** + +You may use the Original Work in all ways not otherwise restricted or +conditioned by this License or by law, and Licensor promises not to interfere +with or be responsible for such uses by You. + + +******************************** +16) Modification of This License +******************************** + +This License is Copyright © 2005 Lawrence Rosen. Permission is granted to +copy, distribute, or communicate this License without modification. Nothing in +this License permits You to modify this License as applied to the Original +Work or to Derivative Works. However, You may modify the text of this License +and copy, distribute or communicate your modified version (the "Modified +License") and apply it to other original works of authorship subject to the +following conditions: (i) You may not indicate in any way that your Modified +License is the "Academic Free License" or "AFL" and you may not use those +names in the name of your Modified License; (ii) You must replace the notice +specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly +similar to the notice in this License; and (iii) You may not claim that your +original works are open source software unless your Modified License has been +approved by Open Source Initiative (OSI) and You comply with its license +review and certification process. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From cf9431e294abc921cf9fe4b9228086d65bd27939 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Tue, 3 Jul 2012 07:01:38 +0200 Subject: Document in the 3.0.0 upgrade guide a breaking change in Array Helper The default return value of Array Helper's element() and elements() functions, when the required elements don't exist, has been changed from FALSE to NULL. --- user_guide_src/source/installation/upgrade_300.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 14199092f..676c99e6a 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -45,4 +45,10 @@ need to rename the `$active_record` variable to `$query_builder`. Step 5: Move your errors folder =============================== -In version 3.0.0, the errors folder has been moved from _application/errors* to _application/views/errors*. \ No newline at end of file +In version 3.0.0, the errors folder has been moved from _application/errors* to _application/views/errors*. + +Step 6: Check the calls to Array Helper's element() and elements() functions +============================================================================ + +The default return value of these functions, when the required elements +don't exist, has been changed from FALSE to NULL. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From f2dcca6f9212923e54fb62ae58f79dc713b111ad Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jul 2012 16:05:34 +0300 Subject: Update the upgrade notes --- user_guide_src/source/installation/downloads.rst | 8 +- user_guide_src/source/installation/upgrade_210.rst | 8 +- user_guide_src/source/installation/upgrade_211.rst | 33 ++++++++ user_guide_src/source/installation/upgrade_212.rst | 16 ++++ user_guide_src/source/installation/upgrade_300.rst | 97 ++++++++++++++++++---- user_guide_src/source/installation/upgrading.rst | 3 +- 6 files changed, 141 insertions(+), 24 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_211.rst create mode 100644 user_guide_src/source/installation/upgrade_212.rst (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index a4a6b7fbe..45a8f80a7 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,8 +2,14 @@ Downloading CodeIgniter ####################### -- `CodeIgniter V 2.1.0 (Current +- `CodeIgniter V 3.0.0 (Current version) `_ +- `CodeIgniter V + 2.1.2 `_ +- `CodeIgniter V + 2.1.1 `_ +- `CodeIgniter V + 2.1.0 `_ - `CodeIgniter V 2.0.3 `_ - `CodeIgniter V diff --git a/user_guide_src/source/installation/upgrade_210.rst b/user_guide_src/source/installation/upgrade_210.rst index 9d7e1a265..647537d1f 100644 --- a/user_guide_src/source/installation/upgrade_210.rst +++ b/user_guide_src/source/installation/upgrade_210.rst @@ -12,11 +12,11 @@ Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one. +.. note:: If you have any custom developed files in these folders please + make copies of them first. + Step 2: Replace config/user_agents.php ====================================== This config file has been updated to contain more user agent types, -please copy it to application/config/user_agents.php. - -.. note:: If you have any custom developed files in these folders please - make copies of them first. \ No newline at end of file +please copy it to _application/config/user_agents.php*. \ No newline at end of file diff --git a/user_guide_src/source/installation/upgrade_211.rst b/user_guide_src/source/installation/upgrade_211.rst new file mode 100644 index 000000000..80248a758 --- /dev/null +++ b/user_guide_src/source/installation/upgrade_211.rst @@ -0,0 +1,33 @@ +############################# +Upgrading from 2.1.0 to 2.1.1 +############################# + +Before performing an update you should take your site offline by +replacing the index.php file with a static one. + +Step 1: Update your CodeIgniter files +===================================== + +Replace all files and directories in your "system" folder and replace +your index.php file. If any modifications were made to your index.php +they will need to be made fresh in this new one. + +.. note:: If you have any custom developed files in these folders please + make copies of them first. + +Step 2: Replace config/mimes.php +================================ + +This config file has been updated to contain more user mime-types, please copy +it to _application/config/mimes.php*. + +Step 3: Update your IP address tables +===================================== + +This upgrade adds support for IPv6 IP addresses. In order to store them, you need +to enlarge your ip_address columns to 45 characters. For example, CodeIgniter's +session table will need to change + +:: + + ALTER TABLE ci_sessions CHANGE ip_address ip_address varchar(45) default '0' NOT NULL diff --git a/user_guide_src/source/installation/upgrade_212.rst b/user_guide_src/source/installation/upgrade_212.rst new file mode 100644 index 000000000..cdbf977d7 --- /dev/null +++ b/user_guide_src/source/installation/upgrade_212.rst @@ -0,0 +1,16 @@ +############################# +Upgrading from 2.1.1 to 2.1.2 +############################# + +Before performing an update you should take your site offline by +replacing the index.php file with a static one. + +Step 1: Update your CodeIgniter files +===================================== + +Replace all files and directories in your "system" folder and replace +your index.php file. If any modifications were made to your index.php +they will need to be made fresh in this new one. + +.. note:: If you have any custom developed files in these folders please + make copies of them first. \ No newline at end of file diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 676c99e6a..7b0d8abe9 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -1,15 +1,14 @@ ############################# -Upgrading from 2.1.0 to 3.0.0 +Upgrading from 2.1.2 to 3.0.0 ############################# .. note:: These upgrade notes are for a version that is yet to be released. +Before performing an update you should take your site offline by replacing the index.php file with a static one. -Before performing an update you should take your site offline by -replacing the index.php file with a static one. - +************************************* Step 1: Update your CodeIgniter files -===================================== +************************************* Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php @@ -18,22 +17,23 @@ they will need to be made fresh in this new one. .. note:: If you have any custom developed files in these folders please make copies of them first. -Step 2: Change References to the SHA Library -============================================ - -The previously deprecated SHA library has been removed in CodeIgniter 3.0. -Alter your code to use the native `sha1()` PHP function to generate a sha1 hash. +******************************** +Step 2: Replace config/mimes.php +******************************** -Additionally, the `sha1()` method in the :doc:`Encryption Library <../libraries/encryption>` has been removed. +This config file has been updated to contain more user mime-types, please copy +it to _application/config/mimes.php*. +************************************************************** Step 3: Remove $autoload['core'] from your config/autoload.php -============================================================== +************************************************************** -Use of the `$autoload['core']` config array has been deprecated as of CodeIgniter 1.4.1 and is now removed. -Move any entries that you might have listed there to `$autoload['libraries']` instead. +Use of the ``$autoload['core']`` config array has been deprecated as of CodeIgniter 1.4.1 and is now removed. +Move any entries that you might have listed there to ``$autoload['libraries']`` instead. +*************************************** Step 4: Update your config/database.php -======================================= +*************************************** Due to 3.0.0's renaming of Active Record to Query Builder, inside your `config/database.php`, you will need to rename the `$active_record` variable to `$query_builder`. @@ -42,13 +42,74 @@ need to rename the `$active_record` variable to `$query_builder`. // $active_record = TRUE; $query_builder = TRUE; +******************************* Step 5: Move your errors folder -=============================== +******************************* In version 3.0.0, the errors folder has been moved from _application/errors* to _application/views/errors*. +**************************************************************************** Step 6: Check the calls to Array Helper's element() and elements() functions -============================================================================ +**************************************************************************** The default return value of these functions, when the required elements -don't exist, has been changed from FALSE to NULL. \ No newline at end of file +don't exist, has been changed from FALSE to NULL. + +*************************************************************** +Step 7: Remove usage of (previously) deprecated functionalities +*************************************************************** + +In addition to the ``$autoload['core']`` configuration setting, there's a number of other functionalities +that have been removed in CodeIgniter 3.0.0: + +The SHA1 library +================ + +The previously deprecated SHA1 library has been removed, alter your code to use PHP's native +``sha1()`` function to generate a SHA1 hash. + +Additionally, the ``sha1()`` method in the :doc:`Encryption Library <../libraries/encryption>` has been removed. + +The EXT constant +================ + +Usage of the ``EXT`` constant has been deprecated since dropping support for PHP 4. There's no +longer a need to maintain different filename extensions and in this new CodeIgniter version, +the ``EXT`` constant has been removed. Use just '.php' instead. + +Smiley helper js_insert_smiley() +================================ + +:doc:`Smiley Helper <../helpers/smiley_helper>` function ``js_insert_smiley()`` has been deprecated +since CodeIgniter 1.7.2 and is now removed. You'll need to switch to ``smiley_js()`` instead. + +Security helper do_hash() +========================= + +:doc:`Security Helper <../helpers/security_helper>` function ``do_hash()`` is now just an alias for +PHP's native ``hash()`` function. It is deprecated and scheduled for removal in CodeIgniter 3.1+. + +.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner + rather than later. + +File helper read_file() +======================= + +:doc:`File Helper <../helpers/file_helper>` function ``read_file()`` is now just an alias for +PHP's native ``file_get_contents()`` function. It is deprecated and scheduled for removal in +CodeIgniter 3.1+. + +.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner + rather than later. + +Pagination library 'anchor_class' setting +========================================= + +The :doc:`Pagination Library <../libraries/pagination>` now supports adding pretty much any HTML +attribute to your anchors via the 'attributes' configuration setting. This includes passing the +'class' attribute and using the separate 'anchor_class' setting no longer makes sense. +As a result of that, the 'anchor_class' setting is now deprecated and scheduled for removal in +CodeIgniter 3.1+. + +.. note:: This setting is still available, but you're strongly encouraged to remove it's usage sooner + rather than later. \ No newline at end of file diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 255c6a557..3609e4213 100644 --- a/user_guide_src/source/installation/upgrading.rst +++ b/user_guide_src/source/installation/upgrading.rst @@ -5,7 +5,8 @@ Upgrading From a Previous Version Please read the upgrade notes corresponding to the version you are upgrading from. -- :doc:`Upgrading from 2.1.1 to 3.0.0 ` +- :doc:`Upgrading from 2.1.2 to 3.0.0 ` +- :doc:`Upgrading from 2.1.1 to 2.1.2 ` - :doc:`Upgrading from 2.1.0 to 2.1.1 ` - :doc:`Upgrading from 2.0.2 to 2.0.3 ` - :doc:`Upgrading from 2.0.1 to 2.0.2 ` -- cgit v1.2.3-24-g4f1b From b94b91afc77bcc133ff282559015933602bb2d3f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 4 Jul 2012 12:32:14 +0300 Subject: Some user guide updates --- user_guide_src/source/database/configuration.rst | 122 +++++++++++++---------- user_guide_src/source/database/connecting.rst | 34 ++++--- user_guide_src/source/general/models.rst | 61 ++++++------ 3 files changed, 118 insertions(+), 99 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst index 7a19c840f..c17de600a 100644 --- a/user_guide_src/source/database/configuration.rst +++ b/user_guide_src/source/database/configuration.rst @@ -12,26 +12,44 @@ it the respective environment config folder. The config settings are stored in a multi-dimensional array with this prototype:: - $db['default']['hostname'] = "localhost"; - $db['default']['username'] = "root"; - $db['default']['password'] = ""; - $db['default']['database'] = "database_name"; - $db['default']['dbdriver'] = "mysql"; - $db['default']['dbprefix'] = ""; - $db['default']['pconnect'] = TRUE; - $db['default']['db_debug'] = FALSE; - $db['default']['cache_on'] = FALSE; - $db['default']['cachedir'] = ""; - $db['default']['char_set'] = "utf8"; - $db['default']['dbcollat'] = "utf8_general_ci"; - $db['default']['swap_pre'] = ""; - $db['default']['autoinit'] = TRUE; - $db['default']['stricton'] = FALSE; - -If you use PDO as your dbdriver, you can specify the full DSN string describe a connection to the database like this:: - + $db['default'] = array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'root', + 'password' => '', + 'database' => 'database_name', + 'dbdriver' => 'mysqli', + 'dbprefix' => '', + 'pconnect' => TRUE, + 'db_debug' => TRUE, + 'cache_on' => FALSE, + 'cachedir' => '', + 'char_set' => 'utf8', + 'dbcollat' => 'utf8_general_ci', + 'swap_pre' => '', + 'autoinit' => TRUE, + 'stricton' => FALSE, + 'failover' => array() + ); + +Some database drivers (such as PDO, PostgreSQL, Oracle, ODBC) might +require a full DSN string to be provided. If that is the case, you +should use the 'dsn' configuration setting, as if you're using the +driver's underlying native PHP extension, like this:: + + // PDO $db['default']['dsn'] = 'pgsql:host=localhost;port=5432;dbname=database_name'; + // Oracle + $db['default']['dsn'] = '//localhost/XE'; + +.. note:: If you do not specify a DSN string for a driver that requires it, CodeIgniter + will try to build it with the rest of the provided settings. + +.. note:: If you provide a DSN string and it is missing some valid settings (e.g. the + database character set), which are present in the rest of the configuration + fields, CodeIgniter will append them. + 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:: @@ -41,7 +59,7 @@ These failovers can be specified by setting the failover for a connection like t 'username' => '', 'password' => '', 'database' => '', - 'dbdriver' => 'mysql', + 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => TRUE, 'db_debug' => TRUE, @@ -58,7 +76,7 @@ These failovers can be specified by setting the failover for a connection like t 'username' => '', 'password' => '', 'database' => '', - 'dbdriver' => 'mysql', + 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => TRUE, 'db_debug' => TRUE, @@ -81,30 +99,34 @@ production, test, etc.) under a single installation, you can set up a connection group for each, then switch between groups as needed. For example, to set up a "test" environment you would do this:: - $db['test']['hostname'] = "localhost"; - $db['test']['username'] = "root"; - $db['test']['password'] = ""; - $db['test']['database'] = "database_name"; - $db['test']['dbdriver'] = "mysql"; - $db['test']['dbprefix'] = ""; - $db['test']['pconnect'] = TRUE; - $db['test']['db_debug'] = FALSE; - $db['test']['cache_on'] = FALSE; - $db['test']['cachedir'] = ""; - $db['test']['char_set'] = "utf8"; - $db['test']['dbcollat'] = "utf8_general_ci"; - $db['test']['swap_pre'] = ""; - $db['test']['autoinit'] = TRUE; - $db['test']['stricton'] = FALSE; + $db['test'] = array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'root', + 'password' => '', + 'database' => 'database_name', + 'dbdriver' => 'mysqli', + 'dbprefix' => '', + 'pconnect' => TRUE, + 'db_debug' => TRUE, + 'cache_on' => FALSE, + 'cachedir' => '', + 'char_set' => 'utf8', + 'dbcollat' => 'utf8_general_ci', + 'swap_pre' => '', + 'autoinit' => TRUE, + 'stricton' => FALSE, + 'failover' => array() + ); Then, to globally tell the system to use that group you would set this variable located in the config file:: - $active_group = "test"; + $active_group = 'test'; -Note: The name "test" is arbitrary. It can be anything you want. By -default we've used the word "default" for the primary connection, but it -too can be renamed to something more relevant to your project. +.. note:: The name 'test' is arbitrary. It can be anything you want. By + default we've used the word "default" for the primary connection, + but it too can be renamed to something more relevant to your project. Query Builder ------------- @@ -119,8 +141,8 @@ when the database classes are initialized. $query_builder = TRUE; -.. note:: that some CodeIgniter classes such as Sessions require Active - Records be enabled to access certain functionality. +.. note:: that some CodeIgniter classes such as Sessions require Query + Builder to be enabled to access certain functionality. Explanation of Values: ---------------------- @@ -128,11 +150,12 @@ Explanation of Values: ====================== ================================================================================================== Name Config Description ====================== ================================================================================================== -**hostname** The hostname of your database server. Often this is "localhost". +**dsn** The DSN connect string (an all-in-one configuration sequence). +**hostname** The hostname of your database server. Often this is 'localhost'. **username** The username used to connect to the database. **password** The password used to connect to the database. **database** The name of the database you want to connect to. -**dbdriver** The database type. ie: mysql, postgre, odbc, etc. Must be specified in lower case. +**dbdriver** The database type. ie: mysqli, postgre, odbc, etc. Must be specified in lower case. **dbprefix** An optional table prefix which will added to the table name when running :doc: `Query Builder ` queries. This permits multiple CodeIgniter installations to share one database. @@ -144,14 +167,7 @@ Explanation of Values: **char_set** The character set used in communicating with the database. **dbcollat** The character collation used in communicating with the database - .. note:: For MySQL and MySQLi databases, this setting is only used - as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7 - (and in table creation queries made with DB Forge). There is an - incompatibility in PHP with mysql_real_escape_string() which can - make your site vulnerable to SQL injection if you are using a - multi-byte character set and are running versions lower than these. - Sites using Latin-1 or UTF-8 database character set and collation are - unaffected. + .. note:: Only used in the 'mysql' and 'mysqli' drivers. **swap_pre** A default table prefix that should be swapped with dbprefix. This is useful for distributed applications where you might run manually written queries, and need the prefix to still be @@ -163,11 +179,11 @@ Explanation of Values: **port** The database port number. To use this value you have to add a line to the database config array. :: - $db['default']['port'] = 5432; + $db['default']['port'] = 5432; ====================== ================================================================================================== .. note:: Depending on what database platform you are using (MySQL, PostgreSQL, etc.) not all values will be needed. For example, when using SQLite you will not need to supply a username or password, and the database name will be the path to your database file. The information above assumes - you are using MySQL. + you are using MySQL. \ No newline at end of file diff --git a/user_guide_src/source/database/connecting.rst b/user_guide_src/source/database/connecting.rst index 5822ca62c..9b8117076 100644 --- a/user_guide_src/source/database/connecting.rst +++ b/user_guide_src/source/database/connecting.rst @@ -57,25 +57,28 @@ file. To connect manually to a desired database you can pass an array of values:: - $config['hostname'] = "localhost"; - $config['username'] = "myusername"; - $config['password'] = "mypassword"; - $config['database'] = "mydatabase"; - $config['dbdriver'] = "mysql"; - $config['dbprefix'] = ""; - $config['pconnect'] = FALSE; - $config['db_debug'] = TRUE; - $config['cache_on'] = FALSE; - $config['cachedir'] = ""; - $config['char_set'] = "utf8"; - $config['dbcollat'] = "utf8_general_ci"; + $config['hostname'] = 'localhost'; + $config['username'] = 'myusername'; + $config['password'] = 'mypassword'; + $config['database'] = 'mydatabase'; + $config['dbdriver'] = 'mysqli'; + $config['dbprefix'] = ''; + $config['pconnect'] = FALSE; + $config['db_debug'] = TRUE; + $config['cache_on'] = FALSE; + $config['cachedir'] = ''; + $config['char_set'] = 'utf8'; + $config['dbcollat'] = 'utf8_general_ci'; $this->load->database($config); For information on each of these values please see the :doc:`configuration page `. -.. note:: For the PDO driver, $config['hostname'] should look like - this: 'mysql:host=localhost' +.. note:: For the PDO driver, you should use the $config['dsn'] setting + instead of 'hostname' and 'database': + + | + | $config['dsn'] = 'mysql:host=localhost;dbname=mydatabase'; Or you can submit your database values as a Data Source Name. DSNs must have this prototype:: @@ -149,5 +152,4 @@ connections, you can explicitly close the connection. :: - $this->db->close(); - + $this->db->close(); \ No newline at end of file diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst index 2e1e025ee..4e52a9648 100644 --- a/user_guide_src/source/general/models.rst +++ b/user_guide_src/source/general/models.rst @@ -72,10 +72,11 @@ The basic prototype for a model class is this:: class Model_name extends CI_Model { - function __construct() - { - parent::__construct(); - } + public function __construct() + { + parent::__construct(); + } + } Where **Model_name** is the name of your class. Class names **must** have @@ -87,10 +88,11 @@ example, if your class is this:: class User_model extends CI_Model { - function __construct() - { - parent::__construct(); - } + public function __construct() + { + parent::__construct(); + } + } Your file will be this:: @@ -102,7 +104,7 @@ Loading a Model Your models will typically be loaded and called from within your :doc:`controller ` functions. To load a model you will use -the following function:: +the following method:: $this->load->model('model_name'); @@ -112,33 +114,34 @@ application/models/blog/queries.php you'll load it using:: $this->load->model('blog/queries'); -Once loaded, you will access your model functions using an object with -the same name as your class:: +Once loaded, you will access your model methods using an object with the +same name as your class:: $this->load->model('model_name'); - $this->model_name->function(); + $this->model_name->method(); If you would like your model assigned to a different object name you can -specify it via the second parameter of the loading function:: +specify it via the second parameter of the loading method:: - $this->load->model('model_name', 'fubar'); + $this->load->model('model_name', 'foobar'); - $this->fubar->function(); + $this->foobar->method(); Here is an example of a controller, that loads a model, then serves a view:: class Blog_controller extends CI_Controller { - function blog() - { - $this->load->model('blog'); + public function blog() + { + $this->load->model('blog'); - $data['query'] = $this->Blog->get_last_ten_entries(); + $data['query'] = $this->Blog->get_last_ten_entries(); + + $this->load->view('blog', $data); + } - $this->load->view('blog', $data); - } } @@ -170,15 +173,13 @@ database. The following options for connecting are available to you: - You can manually pass database connectivity settings via the third parameter:: - $config['hostname'] = "localhost"; - $config['username'] = "myusername"; - $config['password'] = "mypassword"; - $config['database'] = "mydatabase"; - $config['dbdriver'] = "mysql"; - $config['dbprefix'] = ""; + $config['hostname'] = 'localhost'; + $config['username'] = 'myusername'; + $config['password'] = 'mypassword'; + $config['database'] = 'mydatabase'; + $config['dbdriver'] = 'mysqli'; + $config['dbprefix'] = ''; $config['pconnect'] = FALSE; $config['db_debug'] = TRUE; - $this->load->model('Model_name', '', $config); - - + $this->load->model('Model_name', '', $config); \ No newline at end of file -- cgit v1.2.3-24-g4f1b From ac57033236d5b62ba553b6bea87623f0dbeb2f49 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 4 Jul 2012 13:04:10 +0300 Subject: Deprecate Date helper standard_date() --- user_guide_src/source/changelog.rst | 8 +++--- user_guide_src/source/helpers/date_helper.rst | 29 ++++++++++++++-------- user_guide_src/source/installation/upgrade_300.rst | 28 ++++++++++++++++++++- 3 files changed, 50 insertions(+), 15 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index efe49cfe0..37063f752 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -52,7 +52,11 @@ Release Date: Not Released - Helpers - - :doc:`Date Helper ` function now() now works with all timezone strings supported by PHP. + - :doc:`Date Helper ` changes include: + - ``now()`` now works with all timezone strings supported by PHP. + - Added an optional third parameter to ``timespan()`` that constrains the number of time units displayed. + - Added an optional parameter to ``timezone_menu()`` that allows more attributes to be added to the generated select tag. + - Deprecated ``standard_date()``, which now just uses the native ``date()`` with `DateTime constants `_. - ``create_captcha()`` accepts additional colors parameter, allowing for color customization. - :doc:`URL Helper ` changes include: - ``url_title()`` will now trim extra dashes from beginning and end. @@ -63,7 +67,6 @@ Release Date: Not Released - Changed ``humanize()`` to include a second param for the separator. - Refactored ``plural()`` and ``singular()`` to avoid double pluralization and support more words. - Added an optional third parameter to ``force_download()`` that enables/disables sending the actual file MIME type in the Content-Type header (disabled by default). - - Added an optional third parameter to ``timespan()`` that constrains the number of time units displayed. - Added a work-around in ``force_download()`` for a bug Android <= 2.1, where the filename extension needs to be in uppercase. - ``form_dropdown()`` will now also take an array for unity with other form helpers. - ``do_hash()`` now uses PHP's native ``hash()`` function (supporting more algorithms) and is deprecated. @@ -72,7 +75,6 @@ Release Date: Not Released - ``set_realpath()`` can now also handle file paths as opposed to just directories. - Added an optional paramater to ``delete_files()`` to enable it to skip deleting files such as .htaccess and index.html. - ``read_file()`` is now a deprecated alias of ``file_get_contents()``. - - Added an optional parameter to :doc:`Date Helper ` function ``timezone_menu()`` that allows more attributes to be added to the generated select tag. - :doc:`Security Helper ` function ``strip_image_tags()`` is now an alias for the same method in the :doc:`Security Library `. - Database diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 5adfb18d2..e332a913f 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -40,7 +40,7 @@ If a timezone is not provided, it will return time() based on "time_reference" s mdate() ======= -This function is identical to PHPs `date() `_ +This function is identical to PHP's `date() `_ function, except that it lets you use MySQL style date codes, where each code letter is preceded with a percent sign: %Y %m %d etc. @@ -85,21 +85,28 @@ Example The first parameter must contain the format, the second parameter must contain the date as a Unix timestamp. +.. note:: This function is DEPRECATED. Use the native ``date()`` combined + with `DateTime's format constants `_ + instead: + + | + | echo date(DATE_RFC822, time()); + Supported formats: =============== ======================= ====================================== Constant Description Example =============== ======================= ====================================== -DATE_ATOM Atom 2005-08-15T16:13:03+0000 -DATE_COOKIE HTTP Cookies Sun, 14 Aug 2005 16:13:03 UTC -DATE_ISO8601 ISO-8601 2005-08-14T16:13:03+00:00 -DATE_RFC822 RFC 822 Sun, 14 Aug 05 16:13:03 UTC -DATE_RFC850 RFC 850 Sunday, 14-Aug-05 16:13:03 UTC -DATE_RFC1036 RFC 1036 Sunday, 14-Aug-05 16:13:03 UTC -DATE_RFC1123 RFC 1123 Sun, 14 Aug 2005 16:13:03 UTC -DATE_RFC2822 RFC 2822 Sun, 14 Aug 2005 16:13:03 +0000 -DATE_RSS RSS Sun, 14 Aug 2005 16:13:03 UTC -DATE_W3C W3C 2005-08-14T16:13:03+0000 +DATE_ATOM Atom 2005-08-15T16:13:03+0000 +DATE_COOKIE HTTP Cookies Sun, 14 Aug 2005 16:13:03 UTC +DATE_ISO8601 ISO-8601 2005-08-14T16:13:03+00:00 +DATE_RFC822 RFC 822 Sun, 14 Aug 05 16:13:03 UTC +DATE_RFC850 RFC 850 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1036 RFC 1036 Sunday, 14-Aug-05 16:13:03 UTC +DATE_RFC1123 RFC 1123 Sun, 14 Aug 2005 16:13:03 UTC +DATE_RFC2822 RFC 2822 Sun, 14 Aug 2005 16:13:03 +0000 +DATE_RSS RSS Sun, 14 Aug 2005 16:13:03 UTC +DATE_W3C W3C 2005-08-14T16:13:03+0000 =============== ======================= ====================================== local_to_gmt() diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 7b0d8abe9..6b93750d1 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -102,6 +102,32 @@ CodeIgniter 3.1+. .. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner rather than later. +Date helper standard_date() +=========================== + +:doc:`Date Helper <../helpers/date_helper>` function ``standard_date()`` is being deprecated due +to the availability of native PHP `constants `_, +which when combined with ``date()`` provide the same functionality. Furthermore, they have the +exact same names as the ones suppored by ``standard_date()``. Here are examples of how to replace +it's usage: + +:: + + // Old way + standard_date(); // defaults to stanard_date('DATE_RFC822', now()); + + // Replacement + date(DATE_RFC822, now()); + + // Old way + standard_date('DATE_ATOM', $time); + + // Replacement + date(DATE_ATOM, $time); + +.. note:: This function is still available, but you're strongly encouraged to remove its' usage sooner + rather than later as it is scheduled for removal in CodeIgniter 3.1+. + Pagination library 'anchor_class' setting ========================================= @@ -111,5 +137,5 @@ attribute to your anchors via the 'attributes' configuration setting. This inclu As a result of that, the 'anchor_class' setting is now deprecated and scheduled for removal in CodeIgniter 3.1+. -.. note:: This setting is still available, but you're strongly encouraged to remove it's usage sooner +.. note:: This setting is still available, but you're strongly encouraged to remove its' usage sooner rather than later. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 9d21400f12bfe3a09d27afb00a22ae96fbbed1d5 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Wed, 4 Jul 2012 13:03:26 +0200 Subject: Fix typos in upgrade_300.rst --- user_guide_src/source/installation/upgrade_300.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 6b93750d1..f304a716f 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -108,13 +108,13 @@ Date helper standard_date() :doc:`Date Helper <../helpers/date_helper>` function ``standard_date()`` is being deprecated due to the availability of native PHP `constants `_, which when combined with ``date()`` provide the same functionality. Furthermore, they have the -exact same names as the ones suppored by ``standard_date()``. Here are examples of how to replace +exact same names as the ones supported by ``standard_date()``. Here are examples of how to replace it's usage: :: // Old way - standard_date(); // defaults to stanard_date('DATE_RFC822', now()); + standard_date(); // defaults to standard_date('DATE_RFC822', now()); // Replacement date(DATE_RFC822, now()); -- cgit v1.2.3-24-g4f1b From 0054750cf2e071cbe6903dba59e43a6bb8e639d1 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 4 Jul 2012 06:51:15 -0700 Subject: Fixing upgrade file references --- user_guide_src/source/installation/upgrade_210.rst | 14 +++++--------- user_guide_src/source/installation/upgrade_211.rst | 18 ++++++++++++++++++ user_guide_src/source/installation/upgrade_212.rst | 18 ++++++++++++++++++ user_guide_src/source/installation/upgrading.rst | 4 +++- 4 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_211.rst create mode 100644 user_guide_src/source/installation/upgrade_212.rst (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/upgrade_210.rst b/user_guide_src/source/installation/upgrade_210.rst index 9d7e1a265..1625c64bd 100644 --- a/user_guide_src/source/installation/upgrade_210.rst +++ b/user_guide_src/source/installation/upgrade_210.rst @@ -8,15 +8,11 @@ replacing the index.php file with a static one. Step 1: Update your CodeIgniter files ===================================== -Replace all files and directories in your "system" folder and replace -your index.php file. If any modifications were made to your index.php -they will need to be made fresh in this new one. +Replace all files and directories in your "system" folder. -Step 2: Replace config/user_agents.php -====================================== +Step 2: Update your user guide +============================== -This config file has been updated to contain more user agent types, -please copy it to application/config/user_agents.php. +Please also replace your local copy of the user guide with the new +version. -.. note:: If you have any custom developed files in these folders please - make copies of them first. \ No newline at end of file diff --git a/user_guide_src/source/installation/upgrade_211.rst b/user_guide_src/source/installation/upgrade_211.rst new file mode 100644 index 000000000..882a520c5 --- /dev/null +++ b/user_guide_src/source/installation/upgrade_211.rst @@ -0,0 +1,18 @@ +############################# +Upgrading from 2.1.0 to 2.1.1 +############################# + +Before performing an update you should take your site offline by +replacing the index.php file with a static one. + +Step 1: Update your CodeIgniter files +===================================== + +Replace all files and directories in your "system" folder. + +Step 2: Update your user guide +============================== + +Please also replace your local copy of the user guide with the new +version. + diff --git a/user_guide_src/source/installation/upgrade_212.rst b/user_guide_src/source/installation/upgrade_212.rst new file mode 100644 index 000000000..fa0fb8073 --- /dev/null +++ b/user_guide_src/source/installation/upgrade_212.rst @@ -0,0 +1,18 @@ +############################# +Upgrading from 2.1.1 to 2.1.2 +############################# + +Before performing an update you should take your site offline by +replacing the index.php file with a static one. + +Step 1: Update your CodeIgniter files +===================================== + +Replace all files and directories in your "system" folder. + +Step 2: Update your user guide +============================== + +Please also replace your local copy of the user guide with the new +version. + diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 255c6a557..545f344ee 100644 --- a/user_guide_src/source/installation/upgrading.rst +++ b/user_guide_src/source/installation/upgrading.rst @@ -5,8 +5,10 @@ Upgrading From a Previous Version Please read the upgrade notes corresponding to the version you are upgrading from. -- :doc:`Upgrading from 2.1.1 to 3.0.0 ` +- :doc:`Upgrading from 2.1.2 to 3.0.0 ` +- :doc:`Upgrading from 2.1.1 to 2.1.2 ` - :doc:`Upgrading from 2.1.0 to 2.1.1 ` +- :doc:`Upgrading from 2.0.3 to 2.1.0 ` - :doc:`Upgrading from 2.0.2 to 2.0.3 ` - :doc:`Upgrading from 2.0.1 to 2.0.2 ` - :doc:`Upgrading from 2.0 to 2.0.1 ` -- cgit v1.2.3-24-g4f1b From a78c6e0cf48b090f9e5ac5f303efe361c10a1881 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 4 Jul 2012 06:52:19 -0700 Subject: Fix URL helper link --- user_guide_src/source/libraries/config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/config.rst b/user_guide_src/source/libraries/config.rst index 694896353..08d9c2905 100644 --- a/user_guide_src/source/libraries/config.rst +++ b/user_guide_src/source/libraries/config.rst @@ -175,7 +175,7 @@ This function retrieves the URL to your site, plus an optional path such as to a stylesheet or image. The two functions above are normally accessed via the corresponding -functions in the :doc:`URL Helper `. +functions in the :doc:`URL Helper `. $this->config->system_url(); ***************************** -- cgit v1.2.3-24-g4f1b From be3177f7614c96ad3137ddb9764d5e1188c6f9bc Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 4 Jul 2012 07:02:55 -0700 Subject: Fixed a change log formatting issue and doc reference --- user_guide_src/source/changelog.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d8b935252..a2788ca77 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -136,6 +136,7 @@ Release Date: Not Released - Added unbuffered_row() method for getting a row without prefetching whole result (consume less memory). - Libraries + - CI_Session now respects php.ini's session.gc_probability and session.gc_divisor - Added max_filename_increment config setting for Upload library. - CI_Loader::_ci_autoloader() is now a protected method. @@ -175,7 +176,7 @@ Release Date: Not Released - Added support for setting custom attributes. - Deprecated usage of the "anchor_class" setting (use the new "attributes" setting instead). - Added $config['reuse_query_string'] to allow automatic repopulation of query string arguments, combined with normal URI segments. - - Added the ability to use a proxy with the :doc:`XML-RPC Library `. + - Added the ability to use a proxy with the :doc:`XML-RPC Library `. - Core -- cgit v1.2.3-24-g4f1b From 1a85653e093d0f9b4028d808b57747cdbff17a65 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 4 Jul 2012 07:06:08 -0700 Subject: added general/welcome to the toctree --- user_guide_src/source/index.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/index.rst b/user_guide_src/source/index.rst index a349d8bce..e42425bab 100644 --- a/user_guide_src/source/index.rst +++ b/user_guide_src/source/index.rst @@ -110,6 +110,7 @@ Contributing to CodeIgniter * overview/index general/requirements + general/welcome installation/index general/index libraries/index -- cgit v1.2.3-24-g4f1b From f3b7fa268d0c10c43e48952c44ad617167c0e387 Mon Sep 17 00:00:00 2001 From: Christopher Guiney Date: Wed, 4 Jul 2012 12:30:37 -0700 Subject: updated the changelog, fixed some whitespace --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d2774ca12..9f759a0ea 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -178,6 +178,7 @@ Release Date: Not Released - Core + - _exception_handler now respects php.ini's display_errors - Changed private methods in the :doc:`URI Library ` to protected so MY_URI can override them. - Removed CI_CORE boolean constant from CodeIgniter.php (no longer Reactor and Core versions). - Added method get_vars() to the :doc:`Loader Library ` to retrieve all variables loaded with $this->load->vars(). -- cgit v1.2.3-24-g4f1b From 626f1a657206a8b33a59c20388d0ec4de4593487 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 4 Jul 2012 22:38:52 +0300 Subject: Add PDO support for list_fields() Signed-off-by: Andrey Andreev --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f69ce5c15..e5c46ff93 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -136,6 +136,7 @@ Release Date: Not Released - Added ODBC support for create_database(), drop_database() and drop_table() in :doc:`Database Forge `. - Added PDO support for create_database(), drop_database and drop_table() in :doc:`Database Forge `. - Added unbuffered_row() method for getting a row without prefetching whole result (consume less memory). + - Added PDO support for ``list_fields()`` in :doc:`Database Results `. - Libraries -- cgit v1.2.3-24-g4f1b From f5a8530cc937d193aa928bc25f2970eae772d6ef Mon Sep 17 00:00:00 2001 From: Rene Brokholm Date: Thu, 5 Jul 2012 09:05:32 +0200 Subject: code cleanup and changelog added --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e5c46ff93..9a7cec320 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -137,6 +137,7 @@ Release Date: Not Released - Added PDO support for create_database(), drop_database and drop_table() in :doc:`Database Forge `. - Added unbuffered_row() method for getting a row without prefetching whole result (consume less memory). - Added PDO support for ``list_fields()`` in :doc:`Database Results `. + - Added capability for packages to hold database.php config files - Libraries -- cgit v1.2.3-24-g4f1b From 26086874ebb5425a38e879018f9a654182f93b40 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 5 Jul 2012 11:21:58 +0300 Subject: Rename the 'interbase' DB driver to 'ibase' in order to match PHP's function prefix --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9a7cec320..bfbb1bf18 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -95,7 +95,7 @@ Release Date: Not Released - Added support for backup() in :doc:`Database Utilities `. - Added 'dsn' configuration setting for drivers that support DSN strings (PDO, PostgreSQL, Oracle, ODBC, CUBRID). - Improved PDO database support. - - Added Interbase/Firebird database support via the "interbase" driver. + - Added Interbase/Firebird database support via the 'ibase' driver. - Added an optional database name parameter to db_select(). - Replaced the _error_message() and _error_number() methods with error(), that returns an array containing the last database error code and message. - Improved version() implementation so that drivers that have a native function to get the version number don't have to be defined in the core DB_driver class. -- cgit v1.2.3-24-g4f1b From c7db6bb9b64c8322af4d727bcb71122cd7f09dbf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 5 Jul 2012 15:11:20 +0300 Subject: Clean-up the separate drivers' DB result classes from no longer needed methods --- user_guide_src/source/changelog.rst | 1 - 1 file changed, 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index bfbb1bf18..716e08f63 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -128,7 +128,6 @@ Release Date: Not Released - Added support for drop_table() in :doc:`Database Forge `. - Added support for list_databases() in :doc:`Database Utilities `. - Generally improved for speed and cleaned up all of its components. - - *Row* result methods now really only fetch only the needed number of rows, instead of depending entirely on result(). - num_rows() is now only called explicitly by the developer and no longer re-executes statements. - Improved support of the SQLite driver, including: - Added support for replace() in :doc:`Query Builder `. -- cgit v1.2.3-24-g4f1b From ed5538d25e32569b96789307816109bcd517c050 Mon Sep 17 00:00:00 2001 From: aditya Date: Fri, 6 Jul 2012 06:47:51 +0530 Subject: t commit -s 'Added info about set_*() functions and form_validation class in the Form Helper documentation.' Signed-off-by: aditya --- user_guide_src/source/helpers/form_helper.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index a110f3c14..fa7b3dbf9 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -543,3 +543,7 @@ This function is identical to the **set_checkbox()** function above. /> /> +.. note:: If you are using the Form Validation class, you must always specify a rule for your field, + even if empty, in order for the set_*() functions to work. This is because if a Form Validation object + is defined, the control for set_*() is handed over to a method of the class instead of the generic helper + function. \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 49aa45b45e1cc83cb61d1524ba32d6c188dac2e1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 6 Jul 2012 16:22:21 +0300 Subject: Fix a few join() bugs --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 716e08f63..75229f91f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -307,6 +307,7 @@ Bug fixes for 3.0 - Fixed a bug (#427) - :doc:`Form Validation Library ` method ``strip_image_tags()`` was an alias to a non-existent method. - Fixed a bug (#1545) - :doc:`Query Builder ` method ``limit()`` wasn't executed properly under Oracle. - Fixed a bug (#1551) - :doc:`Date Helper ` function ``standard_date()`` didn't properly format *W3C* and *ATOM* standard dates. +- Fixed a bug in :doc:`Query Builder ` method join() where literal values were escaped as if they were fields. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From 3d9cec94b7cfd621111cb31808b23a1b6eaccf65 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 8 Jul 2012 21:50:19 +0300 Subject: #1558 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 75229f91f..c2e33e7d2 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -167,6 +167,7 @@ Release Date: Not Released - Removed method is_numeric() as it exists as a native PHP function and _execute() will find and use that (the 'is_numeric' rule itself is deprecated since 1.6.1). - Native PHP functions used as rules can now accept an additional parameter, other than the data itself. - Updated set_rules() to accept an array of rules as well as a string. + - Fields that have empty rules set no longer run through validation (and therefore are not considered erroneous). - Changed the :doc:`Session Library ` to select only one row when using database sessions. - Added all_flashdata() method to session class. Returns an associative array of only flashdata. - Allowed for setting table class defaults in a config file. -- cgit v1.2.3-24-g4f1b From cbb654d9b332b65c5e2ae6f7bf8936b425b709ac Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 10 Jul 2012 11:36:32 +0300 Subject: Follow-up to #1398, #1548 --- user_guide_src/source/changelog.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f3c5cf72a..0e9ec5e50 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -48,7 +48,8 @@ Release Date: Not Released - Global config files are loaded first, then environment ones. Environment config keys overwrite base ones, allowing to only set the keys we want changed per environment. - Changed detection of ``$view_folder`` so that if it's not found in the current path, it will now also be searched for under the application folder. - Path constants BASEPATH, APPPATH and VIEWPATH are now (internally) defined as absolute paths. - - Updated email validation methods to use filter_var() instead of PCRE. + - Updated email validation methods to use ``filter_var()`` instead of PCRE. + - Changed environment defaults to report all errors in 'development' and only fatal ones in 'testing' and 'production' but only display them in 'development'. - Helpers @@ -186,7 +187,6 @@ Release Date: Not Released - Core - - _exception_handler now respects php.ini's display_errors - Changed private methods in the :doc:`URI Library ` to protected so MY_URI can override them. - Removed CI_CORE boolean constant from CodeIgniter.php (no longer Reactor and Core versions). - Added method get_vars() to the :doc:`Loader Library ` to retrieve all variables loaded with $this->load->vars(). @@ -203,6 +203,8 @@ Release Date: Not Released - Added support for HTTP code 303 ("See Other") in set_status_header(). - Changed :doc:`Config Library ` method site_url() to accept an array as well. - Added method ``strip_image_tags()`` to the :doc:`Security Library `. + - Changed ``_exception_handler()`` to respect php.ini 'display_errors' setting. + Bug fixes for 3.0 ------------------ @@ -311,6 +313,7 @@ Bug fixes for 3.0 - Fixed a bug (#1545) - :doc:`Query Builder ` method ``limit()`` wasn't executed properly under Oracle. - Fixed a bug (#1551) - :doc:`Date Helper ` function ``standard_date()`` didn't properly format *W3C* and *ATOM* standard dates. - Fixed a bug in :doc:`Query Builder ` method join() where literal values were escaped as if they were fields. +- Fixed a bug (#135) - PHP Error logging was impossible without the errors being displayed. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From 6b114ae363eb94328b9d367492ae1b555a19a26c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 13 Jul 2012 12:05:52 +0300 Subject: Fix issue #1613 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0e9ec5e50..0c605dc6a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -314,6 +314,7 @@ Bug fixes for 3.0 - Fixed a bug (#1551) - :doc:`Date Helper ` function ``standard_date()`` didn't properly format *W3C* and *ATOM* standard dates. - Fixed a bug in :doc:`Query Builder ` method join() where literal values were escaped as if they were fields. - Fixed a bug (#135) - PHP Error logging was impossible without the errors being displayed. +- Fixed a bug (#1613) - :doc:`Form Helper ` functions ``form_multiselect()``, ``form_dropdown()`` didn't properly handle empty array option groups. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From 685cdd7a28a8e7ec5a3769e2b0d2cdd40c8f6bf9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 13 Jul 2012 20:11:13 +0300 Subject: Add a changelog entry for issue #1605 (pull #1606) and remove some spaces --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0c605dc6a..68719efa7 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -315,6 +315,7 @@ Bug fixes for 3.0 - Fixed a bug in :doc:`Query Builder ` method join() where literal values were escaped as if they were fields. - Fixed a bug (#135) - PHP Error logging was impossible without the errors being displayed. - Fixed a bug (#1613) - :doc:`Form Helper ` functions ``form_multiselect()``, ``form_dropdown()`` didn't properly handle empty array option groups. +- Fixed a bug (#1605) - :doc:`Pagination Library ` produced incorrect *previous* and *next* link values. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From ede49ba66b127535f3430e20aac72ceed2c4611a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 23 Jul 2012 16:06:36 +0300 Subject: Fix a bug in CI_DB_sqlsrv_driver::affected_rows() --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 68719efa7..6ba416856 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -316,6 +316,7 @@ Bug fixes for 3.0 - Fixed a bug (#135) - PHP Error logging was impossible without the errors being displayed. - Fixed a bug (#1613) - :doc:`Form Helper ` functions ``form_multiselect()``, ``form_dropdown()`` didn't properly handle empty array option groups. - Fixed a bug (#1605) - :doc:`Pagination Library ` produced incorrect *previous* and *next* link values. +- Fixed a bug in SQLSRV's ``affected_rows()`` method where an erroneous function name was used. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From 3c13522ebf4e27094ea5947df16b304cd79bd818 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 23 Jul 2012 16:54:48 +0300 Subject: Fix issue #1644 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 6ba416856..5098e9e49 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -36,6 +36,7 @@ Release Date: Not Released - Updated support for doc files in mimes.php. - Updated support for php files in mimes.php. - Updated support for zip files in mimes.php. + - Updated support for csv files in mimes.php. - Added some more doctypes. - Added Romanian and Greek characters in foreign_characters.php. - Changed logger to only chmod when file is first created. -- cgit v1.2.3-24-g4f1b From 27228c97d6f2bc44cf8913c2b0d2e2ee439eb696 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 27 Jul 2012 10:36:29 +0300 Subject: Improve change from f0ecb55dfe8dbfaf4c65dbe9d7e1bba8c131ebf4 and add changelog entries for pull #1654 --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5098e9e49..625127e2a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,7 +22,7 @@ Release Date: Not Released - ``$_SERVER['CI_ENV']`` can now be set to control the ``ENVIRONMENT`` constant. - Added an optional backtrace to php-error template. - Added Android to the list of user agents. - - Added Windows 7, Android, Blackberry and iOS to the list of user platforms. + - Added Windows 7, Windows 8, Android, Blackberry, iOS and PlayStation 3 to the list of user platforms. - Added Fennec (Firefox for mobile) to the list of mobile user agents. - Ability to log certain error types, not all under a threshold. - Added support for pem, p10, p12, p7a, p7c, p7m, p7r, p7s, crt, crl, der, kdb, rsa, cer, sst, csr Certs to mimes.php. -- cgit v1.2.3-24-g4f1b From f9ee005f77ea215d5318a9c5991c37453ef18ca0 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Fri, 27 Jul 2012 17:11:41 -0300 Subject: Change log for IPv4 range mask support --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 68719efa7..0436a8642 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -204,7 +204,7 @@ Release Date: Not Released - Changed :doc:`Config Library ` method site_url() to accept an array as well. - Added method ``strip_image_tags()`` to the :doc:`Security Library `. - Changed ``_exception_handler()`` to respect php.ini 'display_errors' setting. - + - Added support for IPv4 range masks (e.g. 192.168.1.1/24) to specify ranges of IP addresses for use with the proxy_ips setting. Bug fixes for 3.0 ------------------ -- cgit v1.2.3-24-g4f1b From 00b3df41ba0acfd4c6b5d6838c239f857d6033cb Mon Sep 17 00:00:00 2001 From: InFog Date: Sun, 29 Jul 2012 13:42:50 -0300 Subject: Added documentation for mailto function. --- user_guide_src/source/helpers/url_helper.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 82db6a5b3..305454048 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -207,7 +207,12 @@ Creates a standard HTML email link. Usage example echo mailto('me@my-site.com', 'Click Here to Contact Me'); As with the anchor() tab above, you can set attributes using the third -parameter. +parameter: + +:: + + $attributes = array('title' => 'Mail me'); + echo mailto('me@my-site.com', 'Contact Me', $attributes); safe_mailto() ============= -- cgit v1.2.3-24-g4f1b From a473d8009e5ef2043f1570acf632f3b1a1253ed0 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Mon, 30 Jul 2012 09:51:04 +0100 Subject: Updated email library documentation --- user_guide_src/source/libraries/email.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index c5fa68004..f56bc2ff5 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -226,6 +226,14 @@ success or failure, enabling it to be used conditionally:: // Generate error } +This function will automatically clear all parameters if the request was + successful. To stop this behaviour pass FALSE:: + + if ($this->email->send(FALSE)) + { + // Parameters won't be cleared + } + $this->email->attach() ---------------------- -- cgit v1.2.3-24-g4f1b From 5f441eaedf5fecbad29131c5d44e3c2d53c4c4b5 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Mon, 30 Jul 2012 09:53:14 +0100 Subject: Updated changelog --- user_guide_src/source/changelog.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7f428e5db..4d69c4dc3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -176,7 +176,9 @@ Release Date: Not Released - Allowed for setting table class defaults in a config file. - Added a Wincache driver to the :doc:`Caching Library `. - Added a Redis driver to the :doc:`Caching Library `. - - Added dsn (delivery status notification) option to the :doc:`Email Library `. + - :doc:`Email library ` changes include: + - Added dsn (delivery status notification) option. + - Successfully sent emails will automatically clear the parameters. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Added an "index" parameter to the data() method in the :doc:`Upload Library `. - :doc:`Pagination Library ` changes include: -- cgit v1.2.3-24-g4f1b From bdb99999195711903af712fab58fdf4ef3da72ad Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 30 Jul 2012 17:38:05 +0300 Subject: Some clean-up and style changes --- user_guide_src/source/changelog.rst | 10 +++++----- user_guide_src/source/libraries/email.rst | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4d69c4dc3..03df6e3a8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -146,8 +146,6 @@ Release Date: Not Released - CI_Session now respects php.ini's session.gc_probability and session.gc_divisor - Added max_filename_increment config setting for Upload library. - CI_Loader::_ci_autoloader() is now a protected method. - - Added custom filename to Email::attach() as $this->email->attach($filename, $disposition, $newname). - - Added possibility to send attachment as buffer string in Email::attach() as $this->email->attach($buffer, $disposition, $newname, $mime). - :doc:`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". @@ -177,9 +175,11 @@ Release Date: Not Released - Added a Wincache driver to the :doc:`Caching Library `. - Added a Redis driver to the :doc:`Caching Library `. - :doc:`Email library ` changes include: - - Added dsn (delivery status notification) option. - - Successfully sent emails will automatically clear the parameters. - - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. + - Added custom filename to ``Email::attach()`` as ``$this->email->attach($filename, $disposition, $newname)``. + - Added possibility to send attachment as buffer string in ``Email::attach()`` as ``$this->email->attach($buffer, $disposition, $newname, $mime)``. + - Added dsn (delivery status notification) option. + - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. + - Successfully sent emails will automatically clear the parameters. - Added an "index" parameter to the data() method in the :doc:`Upload Library `. - :doc:`Pagination Library ` changes include: - Added support for the anchor "rel" attribute. diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index f56bc2ff5..4403079b6 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -227,7 +227,7 @@ success or failure, enabling it to be used conditionally:: } This function will automatically clear all parameters if the request was - successful. To stop this behaviour pass FALSE:: +successful. To stop this behaviour pass FALSE:: if ($this->email->send(FALSE)) { -- cgit v1.2.3-24-g4f1b From 3a2d573a96241c01124d15c1ce517078e07c6235 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Tue, 31 Jul 2012 11:42:06 +0100 Subject: Added upgrade note about the breaking change in the email library. Problem noticed in #1671 --- user_guide_src/source/installation/upgrade_300.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index f304a716f..f3a637326 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -138,4 +138,16 @@ As a result of that, the 'anchor_class' setting is now deprecated and scheduled CodeIgniter 3.1+. .. note:: This setting is still available, but you're strongly encouraged to remove its' usage sooner - rather than later. \ No newline at end of file + rather than later. + +Email library +============= + +The :doc:`Email library <../libraries/email>` will automatically clear the set parameters after successfully sending +emails. To override this behaviour, pass FALSE as the first parameter in the ``send()`` function: + +:: + if ($this->email->send(FALSE)) + { + // Parameters won't be cleared + } \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 3169f26fe6b5e23d5ab5d791143d1dd51d78f80d Mon Sep 17 00:00:00 2001 From: dchill42 Date: Sat, 11 Aug 2012 20:12:05 -0400 Subject: Updated Loader and Session documentation --- user_guide_src/source/index.rst | 3 +- user_guide_src/source/libraries/loader.rst | 71 +++++- user_guide_src/source/libraries/sessions.rst | 338 ++++++++++++++++++++------- 3 files changed, 328 insertions(+), 84 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/index.rst b/user_guide_src/source/index.rst index e42425bab..35089703f 100644 --- a/user_guide_src/source/index.rst +++ b/user_guide_src/source/index.rst @@ -80,6 +80,7 @@ Driver Reference - :doc:`libraries/caching` - :doc:`database/index` - :doc:`libraries/javascript` +- :doc:`libraries/sessions` **************** Helper Reference @@ -119,4 +120,4 @@ Contributing to CodeIgniter documentation/index tutorial/index general/quick_reference - general/credits \ No newline at end of file + general/credits diff --git a/user_guide_src/source/libraries/loader.rst b/user_guide_src/source/libraries/loader.rst index aadf9740a..5a17629d2 100644 --- a/user_guide_src/source/libraries/loader.rst +++ b/user_guide_src/source/libraries/loader.rst @@ -4,6 +4,7 @@ Loader Class Loader, as the name suggests, is used to load elements. These elements can be libraries (classes) :doc:`View files <../general/views>`, +:doc:`Drivers <../general/drivers>`, :doc:`Helpers <../general/helpers>`, :doc:`Models <../general/models>`, or your own files. @@ -74,6 +75,70 @@ Assigning a Library to a different object name If the third (optional) parameter is blank, the library will usually be assigned to an object with the same name as the library. For example, if +the library is named Calendar, it will be assigned to a variable named +$this->calendar. + +If you prefer to set your own class names you can pass its value to the +third parameter:: + + $this->load->library('calendar', '', 'my_calendar'); + + // Session class is now accessed using: + + $this->my_calendar + +Please take note, when multiple libraries are supplied in an array for +the first parameter, this parameter is discarded. + +$this->load->driver('parent_name', $config, 'object name') +=========================================================== + +This function is used to load driver libraries. Where parent_name is the +name of the parent class you want to load. + +As an example, if you would like to use sessions with CodeIgniter, the first +step is to load the session driver within your controller:: + + $this->load->driver('session'); + +Once loaded, the library will be ready for use, using +$this->session->*some_function*(). + +Driver files must be stored in a subdirectory within the main +"libraries" folder, or within your personal application/libraries +folder. The subdirectory must match the parent class name. Read the +:doc:`Drivers <../general/drivers>` description for details. + +Additionally, multiple driver libraries can be loaded at the same time by +passing an array of drivers to the load function. + +:: + + $this->load->driver(array('session', 'cache')); + +Setting options +--------------- + +The second (optional) parameter allows you to optionally pass +configuration settings. You will typically pass these as an array:: + + $config = array ( + 'sess_driver' => 'cookie', + 'sess_encrypt_cookie' => true, + 'encryption_key' => 'mysecretkey' + ); + + $this->load->driver('session', $config); + +Config options can usually also be set via a config file. Each library +is explained in detail in its own page, so please read the information +regarding each one you would like to use. + +Assigning a Driver to a different object name +---------------------------------------------- + +If the third (optional) parameter is blank, the library will be assigned +to an object with the same name as the parent class. For example, if the library is named Session, it will be assigned to a variable named $this->session. @@ -86,8 +151,8 @@ third parameter:: $this->my_session -Please take note, when multiple libraries are supplied in an array for -the first parameter, this parameter is discarded. +.. note:: Driver libraries may also be loaded with the library() method, + but it is faster to use driver() $this->load->view('file_name', $data, true/false) ================================================== @@ -281,4 +346,4 @@ calling add_package_path(). // Again without the second parameter: $this->load->add_package_path(APPPATH.'my_app', TRUE); $this->load->view('my_app_index'); // Loads - $this->load->view('welcome_message'); // Loads \ No newline at end of file + $this->load->view('welcome_message'); // Loads diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index 5400524a9..7a27a8f34 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -1,29 +1,19 @@ -############# -Session Class -############# +############## +Session Driver +############## The Session class permits you maintain a user's "state" and track their -activity while they browse your site. The Session class stores session -information for each user as serialized (and optionally encrypted) data -in a cookie. It can also store the session data in a database table for -added security, as this permits the session ID in the user's cookie to -be matched against the stored session ID. By default only the cookie is -saved. If you choose to use the database option you'll need to create -the session table as indicated below. - -.. note:: The Session class does **not** utilize native PHP sessions. It - generates its own session data, offering more flexibility for - developers. - -.. note:: Even if you are not using encrypted sessions, you must set - an :doc:`encryption key <./encryption>` in your config file which is used - to aid in preventing session data manipulation. +activity while they browse your site. CodeIgniter offers two default +session drivers: the classic `Cookie Driver`_, and the `Native Driver`_, +which supports usage of the native PHP Session mechanism. In addition, +you may create your own `Custom Drivers`_ to store session data however +you wish, while still taking advantage of the features of the Session class. Initializing a Session ====================== Sessions will typically run globally with each page load, so the session -class must either be :doc:`initialized <../general/libraries>` in your +class must either be :doc:`initialized <../general/drivers>` in your :doc:`controller <../general/controllers>` constructors, or it can be :doc:`auto-loaded <../general/autoloader>` by the system. For the most part the session class will run unattended in the background, so simply @@ -31,22 +21,25 @@ initializing the class will cause it to read, create, and update sessions. To initialize the Session class manually in your controller constructor, -use the $this->load->library function:: +use the $this->load->driver function:: - $this->load->library('session'); + $this->load->driver('session'); Once loaded, the Sessions library object will be available using: $this->session +.. note:: For backward compatibility, the Session class may stil be loaded + using the $this->load->library function, but converting your applications + to use $this->load->driver is strongly recommended. + How do Sessions work? ===================== When a page is loaded, the session class will check to see if valid -session data exists in the user's session cookie. If sessions data does -**not** exist (or if it has expired) a new session will be created and -saved in the cookie. If a session does exist, its information will be -updated and the cookie will be updated. With each update, the -session_id will be regenerated. +session data exists in the user's session. If sessions data does **not** +exist (or if it has expired) a new session will be created and saved. +If a session does exist, its information will be updated. With each update, +the session_id will be regenerated. It's important for you to understand that once initialized, the Session class runs automatically. There is nothing you need to do to cause the @@ -79,19 +72,12 @@ prototype:: 'last_activity' => timestamp ) -If you have the encryption option enabled, the serialized array will be -encrypted before being stored in the cookie, making the data highly -secure and impervious to being read or altered by someone. More info -regarding encryption can be :doc:`found here `, although -the Session class will take care of initializing and encrypting the data -automatically. - -Note: Session cookies are only updated every five minutes by default to -reduce processor load. If you repeatedly reload a page you'll notice -that the "last activity" time only updates if five minutes or more has -passed since the last time the cookie was written. This time is -configurable by changing the $config['sess_time_to_update'] line in -your system/config/config.php file. +.. note:: Sessions are only updated every five minutes by default to + reduce processor load. If you repeatedly reload a page you'll notice + that the "last activity" time only updates if five minutes or more has + passed since the last time the cookie was written. This time is + configurable by changing the $config['sess_time_to_update'] line in + your system/config/config.php file. Retrieving Session Data ======================= @@ -106,7 +92,7 @@ fetch. For example, to fetch the session ID you will do this:: $session_id = $this->session->userdata('session_id'); -.. note:: The function returns FALSE (boolean) if the item you are +.. note:: The function returns NULL if the item you are trying to access does not exist. Adding Custom Session Data @@ -117,7 +103,7 @@ to it and it will be stored in the user's cookie. Why would you want to do this? Here's one example: Let's say a particular user logs into your site. Once authenticated, you -could add their username and email address to the session cookie, making +could add their username and email address to the session, making that data globally available to you without having to run a database query when you need it. @@ -144,11 +130,11 @@ supports this syntax. $this->session->set_userdata('some_name', 'some_value'); +If you want to verify that a userdata value exists, call has_userdata(). -.. note:: Cookies can only hold 4KB of data, so be careful not to exceed - the capacity. The encryption process in particular produces a longer - data string than the original so keep careful track of how much data you - are storing. +:: + + $this->session->has_userdata('some_name'); Retrieving All Session Data =========================== @@ -195,8 +181,8 @@ available for the next server request, and are then automatically cleared. These can be very useful, and are typically used for informational or status messages (for example: "record 2 deleted"). -Note: Flash variables are prefaced with "flash\_" so avoid this prefix -in your own session names. +.. note:: Flash variables are prefaced with "flash\_" so avoid this prefix + in your own session names. To add flashdata:: @@ -222,9 +208,162 @@ additional request, you can do so using the keep_flashdata() function. $this->session->keep_flashdata('item'); +Tempdata +======== + +CodeIgniter also supports "tempdata", or session data with a specific +expiration time. After the value expires, or the session expires or is +deleted, the value is automatically removed. + +To add tempdata:: + + $expire = 300; // Expire in 5 minutes + + $this->session->set_tempdata('item', 'value', $expire); + +You can also pass an array to set_tempdata():: + + $tempdata = array('newuser' => TRUE, 'message' => 'Thanks for joining!'); + + $this->session->set_tempdata($tempdata, '', $expire); + +.. note:: If the expiration is omitted or set to 0, the default expiration of + 5 minutes will be used. + +To read a tempdata variable:: + + $this->session->tempdata('item'); + +If you need to remove a tempdata value before it expires, +use unset_tempdata():: + + $this->session->unset_tempdata('item'); + +Destroying a Session +==================== + +To clear the current session:: + + $this->session->sess_destroy(); + +.. note:: This function should be the last one called, and even flash + variables will no longer be available. If you only want some items + destroyed and not all, use unset_userdata(). + +Session Preferences +=================== + +You'll find the following Session related preferences in your +application/config/config.php file: + +=========================== =============== =========================== ========================================================================== +Preference Default Options Description +=========================== =============== =========================== ========================================================================== +**sess_driver** cookie cookie/native/*custom* The initial session driver to load. +**sess_valid_drivers** cookie, native None Additional valid drivers which may be loaded. +**sess_cookie_name** ci_session None The name you want the session cookie saved as (data for Cookie driver or + session ID for Native driver). +**sess_expiration** 7200 None The number of seconds you would like the session to last. The default + value is 2 hours (7200 seconds). If you would like a non-expiring + session set the value to zero: 0 +**sess_expire_on_close** FALSE TRUE/FALSE (boolean) Whether to cause the session to expire automatically when the browser + window is closed. +**sess_encrypt_cookie** FALSE TRUE/FALSE (boolean) Whether to encrypt the session data (Cookie driver only). +**sess_use_database** FALSE TRUE/FALSE (boolean) Whether to save the session data to a database. You must create the + table before enabling this option (Cookie driver only). +**sess_table_name** ci_sessions Any valid SQL table name The name of the session database table (Cookie driver only). +**sess_time_to_update** 300 Time in seconds This options controls how often the session class will regenerate itself + and create a new session id. +**sess_match_ip** FALSE TRUE/FALSE (boolean) Whether to match the user's IP address when reading the session data. + Note that some ISPs dynamically changes the IP, so if you want a + non-expiring session you will likely set this to FALSE. +**sess_match_useragent** TRUE TRUE/FALSE (boolean) Whether to match the User Agent when reading the session data. +=========================== =============== =========================== ========================================================================== + +In addition to the values above, the cookie and native drivers apply the +following configuration values shared by the :doc:`Input ` and +:doc:`Security ` classes: + +=========================== =============== ========================================================================== +Preference Default Description +=========================== =============== ========================================================================== +**cookie_prefix** '' Set a cookie name prefix in order to avoid name collisions +**cookie_domain** '' The domain for which the session is applicable +**cookie_path** / The path to which the session is applicable +=========================== =============== ========================================================================== + +Session Drivers +=============== + +By default, the `Cookie Driver`_ is loaded when a session is initialized. +However, any valid driver may be selected with the $config['sess_driver'] +line in your config.php file. + +The session driver library comes with the cookie and native drivers +installed, and `Custom Drivers`_ may also be installed by the user. + +Typically, only one driver will be used at a time, but CodeIgniter does +support loading multiple drivers. If a specific valid driver is called, it +will be automatically loaded. Or, an additional driver may be explicitly +loaded by calling load_driver():: + + $this->session->load_driver('native'); + +The Session library keeps track of the most recently selected driver to call +for driver methods. Normally, session class methods are called directly on +the parent class, as illustrated above. However, any methods called through +a specific driver will select that driver before invoking the parent method. + +So, alternation between multiple drivers can be achieved by specifying which +driver to use for each call:: + + $this->session->native->set_userdata('foo', 'bar'); + + $this->session->cookie->userdata('foo'); + + $this->session->native->unset_userdata('foo'); + +Notice in the previous example that the *native* userdata value 'foo' +would be set to 'bar', which would NOT be returned by the call for +the *cookie* userdata 'foo', nor would the *cookie* value be unset by +the call to unset the *native* 'foo' value. The drivers maintain independent +sets of values, regardless of key names. + +A specific driver may also be explicitly selected for use by pursuant +methods with the select_driver() call:: + + $this->session->select_driver('native'); + + $this->session->userdata('item'); // Uses the native driver + +Cookie Driver +------------- + +The Cookie driver stores session information for each user as serialized +(and optionally encrypted) data in a cookie. It can also store the session +data in a database table for added security, as this permits the session ID +in the user's cookie to be matched against the stored session ID. By default +only the cookie is saved. If you choose to use the database option you'll +need to create the session table as indicated below. + +If you have the encryption option enabled, the serialized array will be +encrypted before being stored in the cookie, making the data highly +secure and impervious to being read or altered by someone. More info +regarding encryption can be :doc:`found here `, although +the Session class will take care of initializing and encrypting the data +automatically. + +.. note:: Even if you are not using encrypted sessions, you must set + an :doc:`encryption key <./encryption>` in your config file which is used + to aid in preventing session data manipulation. + +.. note:: Cookies can only hold 4KB of data, so be careful not to exceed + the capacity. The encryption process in particular produces a longer + data string than the original so keep careful track of how much data you + are storing. Saving Session Data to a Database -================================= +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ While the session data array stored in the user's cookie contains a Session ID, unless you store session data in a database there is no way @@ -267,44 +406,83 @@ session class:: $config['sess_table_name'] = 'ci_sessions'; -.. note:: The Session class has built-in garbage collection which clears +.. note:: The Cookie driver has built-in garbage collection which clears out expired sessions so you do not need to write your own routine to do it. -Destroying a Session -==================== +Native Driver +------------- -To clear the current session:: +The Native driver relies on native PHP sessions to store data in the +$_SESSION superglobal array. All stored values continue to be available +through $_SESSION, but flash- and temp- data items carry special prefixes. - $this->session->sess_destroy(); +Custom Drivers +-------------- -.. note:: This function should be the last one called, and even flash - variables will no longer be available. If you only want some items - destroyed and not all, use unset_userdata(). +You may also :doc:`create your own <../general/creating_drivers>` custom +session drivers. A session driver basically manages an array of name/value +pairs with some sort of storage mechanism. -Session Preferences -=================== +To make a new driver, extend CI_Session_driver. Overload the initialize +method and read or create session data. Then implement a save handler to +write changed data to storage (sess_save), a destroy handler to remove +deleted data (sess_destroy), a regenerate handler to make a new session ID, +and an access handler to expose the data (get_userdata). Your initial class +might look like:: -You'll find the following Session related preferences in your -application/config/config.php file: + class CI_Session_custom extends CI_Session_driver { + protected function initialize() + { + // Read existing session data or create a new one + } + + public function sess_save() + { + // Save current data to storage + } + + public function sess_destroy() + { + // Destroy the current session and clean up storage + } + + public function sess_regenerate() + { + // Create new session ID + } + + public function &get_userdata() + { + // Return a reference to your userdata array + } + } + +Notice that get_userdata() returns a reference so the parent library is +accessing the same array the driver object is using. This saves memory +and avoids synchronization issues during usage. + +Put your driver in the libraries/Session/drivers folder anywhere in your +package paths. This includes the application directory, the system directory, +or any path you add with $CI->load->add_package_path(). Your driver must be +named CI_Session_, and your filename must be Session_.php, +preferably also capitalized, such as:: + + CI_Session_foo in libraries/Session/drivers/Session_foo.php + +Then specify the driver by setting 'sess_driver' in your config.php file or as a +parameter when loading the CI_Session object:: + + $config['sess_driver'] = 'foo'; + +OR:: + + $CI->load->driver('session', array('sess_driver' => 'foo')); + +The driver specified by 'sess_driver' is automatically included as a valid +driver. However, if you want to make a custom driver available as an option +without making it the initially loaded driver, set 'sess_valid_drivers' in +your config.php file to an array including your driver name:: + + $config['sess_valid_drivers'] = array('sess_driver'); -=========================== =============== =========================== ========================================================================== -Preference Default Options Description -=========================== =============== =========================== ========================================================================== -**sess_cookie_name** ci_session None The name you want the session cookie saved as. -**sess_expiration** 7200 None The number of seconds you would like the session to last. The default - value is 2 hours (7200 seconds). If you would like a non-expiring - session set the value to zero: 0 -**sess_expire_on_close** FALSE TRUE/FALSE (boolean) Whether to cause the session to expire automatically when the browser - window is closed. -**sess_encrypt_cookie** FALSE TRUE/FALSE (boolean) Whether to encrypt the session data. -**sess_use_database** FALSE TRUE/FALSE (boolean) Whether to save the session data to a database. You must create the - table before enabling this option. -**sess_table_name** ci_sessions Any valid SQL table name The name of the session database table. -**sess_time_to_update** 300 Time in seconds This options controls how often the session class will regenerate itself - and create a new session id. -**sess_match_ip** FALSE TRUE/FALSE (boolean) Whether to match the user's IP address when reading the session data. - Note that some ISPs dynamically changes the IP, so if you want a - non-expiring session you will likely set this to FALSE. -**sess_match_useragent** TRUE TRUE/FALSE (boolean) Whether to match the User Agent when reading the session data. -=========================== =============== =========================== ========================================================================== \ No newline at end of file -- cgit v1.2.3-24-g4f1b From b3816b794592873a4e98187e66745544b463e933 Mon Sep 17 00:00:00 2001 From: dchill42 Date: Mon, 13 Aug 2012 09:47:58 -0400 Subject: Minor doc fixes --- user_guide_src/source/libraries/loader.rst | 2 +- user_guide_src/source/libraries/sessions.rst | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/loader.rst b/user_guide_src/source/libraries/loader.rst index 5a17629d2..33c1bafec 100644 --- a/user_guide_src/source/libraries/loader.rst +++ b/user_guide_src/source/libraries/loader.rst @@ -83,7 +83,7 @@ third parameter:: $this->load->library('calendar', '', 'my_calendar'); - // Session class is now accessed using: + // Calendar class is now accessed using: $this->my_calendar diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index 7a27a8f34..dd9e8cbb4 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -424,12 +424,12 @@ You may also :doc:`create your own <../general/creating_drivers>` custom session drivers. A session driver basically manages an array of name/value pairs with some sort of storage mechanism. -To make a new driver, extend CI_Session_driver. Overload the initialize +To make a new driver, extend CI_Session_driver. Overload the initialize() method and read or create session data. Then implement a save handler to write changed data to storage (sess_save), a destroy handler to remove -deleted data (sess_destroy), a regenerate handler to make a new session ID, -and an access handler to expose the data (get_userdata). Your initial class -might look like:: +deleted data (sess_destroy), a regenerate handler to make a new session ID +(sess_regenerate), and an access handler to expose the data (get_userdata). +Your initial class might look like:: class CI_Session_custom extends CI_Session_driver { protected function initialize() -- cgit v1.2.3-24-g4f1b From 670182374d05e05f308d8e30607f5538f322d370 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 15 Aug 2012 11:11:32 +0300 Subject: Add changelog entry for pull #1601 --- user_guide_src/source/changelog.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 03df6e3a8..827b1f090 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -102,12 +102,13 @@ Release Date: Not Released - Replaced the _error_message() and _error_number() methods with error(), that returns an array containing the last database error code and message. - Improved version() implementation so that drivers that have a native function to get the version number don't have to be defined in the core DB_driver class. - Improved support of the PostgreSQL driver, including: - - pg_version() is now used to get the database version number, when possible. - - Added db_set_charset() support. - - Added support for optimize_table() in :doc:`Database Utilities ` (rebuilds table indexes). - - Added boolean data type support in escape(). - - Added update_batch() support. - - Removed limit() and order_by() support for UPDATE and DELETE queries in as PostgreSQL does not support those features. + - ``pg_version()`` is now used to get the database version number, when possible. + - Added ``db_set_charset()`` support. + - Added support for ``optimize_table()`` in :doc:`Database Utilities ` (rebuilds table indexes). + - Added boolean data type support in ``escape()``. + - Added ``update_batch()`` support. + - Removed ``limit()`` and ``order_by()`` support for UPDATE and DELETE queries as PostgreSQL does not support those features. + - Added a work-around for dead persistent connections to be re-created after a database restart. - Added a constructor to the DB_result class and moved all driver-specific properties and logic out of the base DB_driver class to allow better abstraction. - Removed protect_identifiers() and renamed internal method _protect_identifiers() to it instead - it was just an alias. - Renamed internal method _escape_identifiers() to escape_identifiers(). -- cgit v1.2.3-24-g4f1b From 64f470bfb9b4aa4e0abc984dacd543bb7d059260 Mon Sep 17 00:00:00 2001 From: Joe McFrederick Date: Sat, 18 Aug 2012 12:29:56 -0400 Subject: Fix bug #1000 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 827b1f090..0730aafb4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -321,6 +321,7 @@ Bug fixes for 3.0 - Fixed a bug (#1613) - :doc:`Form Helper ` functions ``form_multiselect()``, ``form_dropdown()`` didn't properly handle empty array option groups. - Fixed a bug (#1605) - :doc:`Pagination Library ` produced incorrect *previous* and *next* link values. - Fixed a bug in SQLSRV's ``affected_rows()`` method where an erroneous function name was used. +- Fixed a bug (#1000) - Change syntax of $view_file to $_ci_view_file to prevent being overwritten by application. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From 0afe5d96e08b6b81768910cd0a8f63192115215a Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 20 Aug 2012 11:03:14 -0700 Subject: Fixing code sample styling and footer link --- user_guide_src/source/_themes/eldocs/layout.html | 2 +- user_guide_src/source/_themes/eldocs/static/asset/css/common.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/_themes/eldocs/layout.html b/user_guide_src/source/_themes/eldocs/layout.html index 01db07cac..9be3b853b 100644 --- a/user_guide_src/source/_themes/eldocs/layout.html +++ b/user_guide_src/source/_themes/eldocs/layout.html @@ -125,7 +125,7 @@ {%- block footer %} {%- endblock %} diff --git a/user_guide_src/source/_themes/eldocs/static/asset/css/common.css b/user_guide_src/source/_themes/eldocs/static/asset/css/common.css index 6cabda037..67d90a232 100644 --- a/user_guide_src/source/_themes/eldocs/static/asset/css/common.css +++ b/user_guide_src/source/_themes/eldocs/static/asset/css/common.css @@ -148,6 +148,8 @@ fieldset{ border: 0; } .top{ float: right; } +.highlight{ overflow-x: auto; } + .admonition, .highlight-ee, .highlight-ci, @@ -166,6 +168,8 @@ fieldset{ border: 0; } padding: 10px 10px 8px; } +.highlight-ci{ background-color: #FEFEFE; border-color: #E5E5E5; } + .admonition p{ margin: 0; } .codeblock{ margin: 10px 0; } -- cgit v1.2.3-24-g4f1b From 87687e10c582b085afdc649ec810a2d2cf34e98b Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 20 Aug 2012 11:05:03 -0700 Subject: fixed RST indentation error in 3.0.0 upgrade instructions code sample --- user_guide_src/source/installation/upgrade_300.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index f3a637326..64a237069 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -147,6 +147,7 @@ The :doc:`Email library <../libraries/email>` will automatically clear the set p emails. To override this behaviour, pass FALSE as the first parameter in the ``send()`` function: :: + if ($this->email->send(FALSE)) { // Parameters won't be cleared -- cgit v1.2.3-24-g4f1b From 329834e354d75ed239c83f410adacdd294ae2f64 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 20 Aug 2012 18:10:39 -0700 Subject: Switching to Sphinx's built in JavaScript search - disabled rST source copying, the contextual results for the search don't render, so they look goofy - added .highlighted class to CSS for highlighting search terms - replaced Google search form with native search form (and separated into its own theme file) - added body class to #content div for JS highlighter to hook onto --- user_guide_src/source/_themes/eldocs/layout.html | 14 +++++--------- user_guide_src/source/_themes/eldocs/searchbox.html | 21 +++++++++++++++++++++ .../_themes/eldocs/static/asset/css/common.css | 2 ++ user_guide_src/source/conf.py | 1 + 4 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 user_guide_src/source/_themes/eldocs/searchbox.html (limited to 'user_guide_src') diff --git a/user_guide_src/source/_themes/eldocs/layout.html b/user_guide_src/source/_themes/eldocs/layout.html index 9be3b853b..51d61b849 100644 --- a/user_guide_src/source/_themes/eldocs/layout.html +++ b/user_guide_src/source/_themes/eldocs/layout.html @@ -91,13 +91,7 @@ -
+
+ {%- block body %} {{ body }} + {%- endblock %}
{%- endblock %} @@ -129,4 +125,4 @@
{%- endblock %} - + \ No newline at end of file diff --git a/user_guide_src/source/_themes/eldocs/searchbox.html b/user_guide_src/source/_themes/eldocs/searchbox.html new file mode 100644 index 000000000..039590bd9 --- /dev/null +++ b/user_guide_src/source/_themes/eldocs/searchbox.html @@ -0,0 +1,21 @@ + + + + diff --git a/user_guide_src/source/_themes/eldocs/static/asset/css/common.css b/user_guide_src/source/_themes/eldocs/static/asset/css/common.css index 67d90a232..0a63871c5 100644 --- a/user_guide_src/source/_themes/eldocs/static/asset/css/common.css +++ b/user_guide_src/source/_themes/eldocs/static/asset/css/common.css @@ -185,6 +185,8 @@ fieldset{ border: 0; } } .admonition-title:after{ content: ': '; } + +.highlighted{ background-color: #FFF09B; } #table-contents{ bottom: 0; diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index e972a388b..f68405b36 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -167,6 +167,7 @@ html_last_updated_fmt = '%b %d, %Y' # Output file base name for HTML help builder. htmlhelp_basename = 'CodeIgniterdoc' +html_copy_source = False # -- Options for LaTeX output -------------------------------------------------- -- cgit v1.2.3-24-g4f1b From cdb481b92de54f7069039f6d0aa92b32c4e543fa Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Tue, 21 Aug 2012 10:11:16 +0200 Subject: driver fix + userguide + changelog --- user_guide_src/source/changelog.rst | 3 ++- user_guide_src/source/database/configuration.rst | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 827b1f090..bc88b3c23 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -139,8 +139,9 @@ Release Date: Not Released - Added PDO support for create_database(), drop_database and drop_table() in :doc:`Database Forge `. - Added unbuffered_row() method for getting a row without prefetching whole result (consume less memory). - Added PDO support for ``list_fields()`` in :doc:`Database Results `. - - Added capability for packages to hold database.php config files + - Added capability for packages to hold database.php config files - Added subdrivers support (currently only used by PDO). + - Added support for client compression for MySQL and MySQLi. - Libraries diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst index c17de600a..636b5b5b2 100644 --- a/user_guide_src/source/database/configuration.rst +++ b/user_guide_src/source/database/configuration.rst @@ -28,6 +28,7 @@ prototype:: 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'autoinit' => TRUE, + 'compress' => TRUE, 'stricton' => FALSE, 'failover' => array() ); @@ -69,6 +70,7 @@ These failovers can be specified by setting the failover for a connection like t 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'autoinit' => TRUE, + 'compress' => TRUE, 'stricton' => FALSE ), array( @@ -86,6 +88,7 @@ These failovers can be specified by setting the failover for a connection like t 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'autoinit' => TRUE, + 'compress' => TRUE, 'stricton' => FALSE ) ); @@ -115,6 +118,7 @@ example, to set up a "test" environment you would do this:: 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'autoinit' => TRUE, + 'compress' => TRUE, 'stricton' => FALSE, 'failover' => array() ); @@ -174,11 +178,12 @@ Explanation of Values: customizable by the end user. **autoinit** Whether or not to automatically connect to the database when the library loads. If set to false, the connection will take place prior to executing the first query. +**compress** Whether or not to use client compression for MySQL or MySQLi. **stricton** TRUE/FALSE (boolean) - Whether to force "Strict Mode" connections, good for ensuring strict SQL 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; ====================== ================================================================================================== -- cgit v1.2.3-24-g4f1b From 9819cba2138ce1c32aa1e8a7d5938d03b4becc3e Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Tue, 21 Aug 2012 10:13:36 +0200 Subject: changelog fix --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index bc88b3c23..db074e854 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -141,7 +141,7 @@ Release Date: Not Released - Added PDO support for ``list_fields()`` in :doc:`Database Results `. - Added capability for packages to hold database.php config files - Added subdrivers support (currently only used by PDO). - - Added support for client compression for MySQL and MySQLi. + - Added client compression support for MySQL and MySQLi. - Libraries -- cgit v1.2.3-24-g4f1b From a819580fd7d921bb1687d5690712cd61eed82dd2 Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Tue, 21 Aug 2012 16:32:04 +0200 Subject: docx mimetype added --- user_guide_src/source/changelog.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 827b1f090..77c018a11 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -34,6 +34,7 @@ Release Date: Not Released - Added support for rar archives to mimes.php. - Updated support for xml ('application/xml') and xsl ('application/xml', 'text/xsl') files in mimes.php. - Updated support for doc files in mimes.php. + - Updated support for docx files in mimes.php. - Updated support for php files in mimes.php. - Updated support for zip files in mimes.php. - Updated support for csv files in mimes.php. @@ -139,7 +140,7 @@ Release Date: Not Released - Added PDO support for create_database(), drop_database and drop_table() in :doc:`Database Forge `. - Added unbuffered_row() method for getting a row without prefetching whole result (consume less memory). - Added PDO support for ``list_fields()`` in :doc:`Database Results `. - - Added capability for packages to hold database.php config files + - Added capability for packages to hold database.php config files - Added subdrivers support (currently only used by PDO). - Libraries -- cgit v1.2.3-24-g4f1b From 19ac8bc3fc55460660cca618b6cce0ef212e7bdc Mon Sep 17 00:00:00 2001 From: RecoilUK Date: Thu, 23 Aug 2012 20:43:48 +0200 Subject: Update user_guide_src/source/libraries/form_validation.rst --- user_guide_src/source/libraries/form_validation.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 3bcad7ba6..bc25d8292 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -488,6 +488,15 @@ the name of the function:: $this->form_validation->set_message('username_check') +If you are using an error message that can accept two $s in your error string, +such as .. + + $this->form_validation->set_message('min_length', 'The $s field must contain at least $s characters.'); + +Then you can also use %1$s and %2$s: + + $this->form_validation->set_message('min_length', 'This field must contain at least %2$s characters.'); + You can also override any error message found in the language file. For example, to change the message for the "required" rule you will do this:: -- cgit v1.2.3-24-g4f1b From f8f36db2d967efe8178b78a59ead14c05f50dc12 Mon Sep 17 00:00:00 2001 From: dchill42 Date: Thu, 30 Aug 2012 14:17:28 -0400 Subject: Added autoload drivers config, added Session and Loader changes to changelog, added Session config items to upgrade guide Signed-off-by: dchill42 --- user_guide_src/source/changelog.rst | 24 +++++++++++++++----- user_guide_src/source/installation/upgrade_300.rst | 26 +++++++++++++++++----- 2 files changed, 40 insertions(+), 10 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 77c018a11..d026ca3d3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -145,9 +145,21 @@ Release Date: Not Released - Libraries - - CI_Session now respects php.ini's session.gc_probability and session.gc_divisor + - :doc:`Session Library ` changes include: + - Library changed to :doc:`Driver ` with classic Cookie driver as default. + - Added Native PHP Session driver to work with $_SESSION. + - Custom session drivers can be added anywhere in package paths and loaded with Session library. + - Session drivers interchangeable on the fly. + - New tempdata feature allows setting user data items with an expiration time. + - Added default $config['sess_driver'] and $config['sess_valid_drivers'] items to config.php file. + - Cookie driver now respects php.ini's session.gc_probability and session.gc_divisor + - Changed the Cookie driver to select only one row when using database sessions. + - Cookie driver now only writes to database at end of request when using database. + - Cookie driver now uses PHP functions for faster array manipulation when using database. + - Added all_flashdata() method to session class. Returns an associative array of only flashdata. + - Added has_userdata() method to verify existence of userdata item. + - Added tempdata(), set_tempdata(), and unset_tempdata() methods for manipulating tempdata. - Added max_filename_increment config setting for Upload library. - - CI_Loader::_ci_autoloader() is now a protected method. - :doc:`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". @@ -171,8 +183,6 @@ Release Date: Not Released - Native PHP functions used as rules can now accept an additional parameter, other than the data itself. - Updated set_rules() to accept an array of rules as well as a string. - Fields that have empty rules set no longer run through validation (and therefore are not considered erroneous). - - Changed the :doc:`Session Library ` to select only one row when using database sessions. - - Added all_flashdata() method to session class. Returns an associative array of only flashdata. - Allowed for setting table class defaults in a config file. - Added a Wincache driver to the :doc:`Caching Library `. - Added a Redis driver to the :doc:`Caching Library `. @@ -194,7 +204,11 @@ Release Date: Not Released - Changed private methods in the :doc:`URI Library ` to protected so MY_URI can override them. - Removed CI_CORE boolean constant from CodeIgniter.php (no longer Reactor and Core versions). - - Added method get_vars() to the :doc:`Loader Library ` to retrieve all variables loaded with $this->load->vars(). + - :doc:`Loader Library ` changes include: + - Added method get_vars() to the Loader to retrieve all variables loaded with $this->load->vars(). + - CI_Loader::_ci_autoloader() is now a protected method. + - Added autoloading of drivers with $autoload['drivers']. + - CI_Loader::library() will now load drivers as well, for backward compatibility of converted libraries (like Session). - is_loaded() function from system/core/Commons.php now returns a reference. - $config['rewrite_short_tags'] now has no effect when using PHP 5.4 as *` to retrieve $_SERVER['REQUEST_METHOD']. diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 64a237069..31a5c0761 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -31,8 +31,24 @@ Step 3: Remove $autoload['core'] from your config/autoload.php Use of the ``$autoload['core']`` config array has been deprecated as of CodeIgniter 1.4.1 and is now removed. Move any entries that you might have listed there to ``$autoload['libraries']`` instead. +************************************************************** +Step 4: Add new session driver items to your config/config.php +************************************************************** + +With the change from a single Session Library to the new Session Driver, two new config items have been added: + + - ``$config['sess_driver']`` selects which driver to initially load. Options are: + - 'cookie' (the default) for classic CodeIgniter cookie-based sessions + - 'native' for native PHP Session support + - the name of a custom driver you have provided (see :doc:`Session Driver <../libraries/sessions>` for more info) + - ``$config['sess_valid_drivers']`` provides an array of additional custom drivers to make available for loading + +As the new Session Driver library loads the classic Cookie driver by default and always makes 'cookie' and 'native' +available as valid drivers, neither of these configuration items are required. However, it is recommended that you +add them for clarity and ease of configuration in the future. + *************************************** -Step 4: Update your config/database.php +Step 5: Update your config/database.php *************************************** Due to 3.0.0's renaming of Active Record to Query Builder, inside your `config/database.php`, you will @@ -43,20 +59,20 @@ need to rename the `$active_record` variable to `$query_builder`. $query_builder = TRUE; ******************************* -Step 5: Move your errors folder +Step 6: Move your errors folder ******************************* In version 3.0.0, the errors folder has been moved from _application/errors* to _application/views/errors*. **************************************************************************** -Step 6: Check the calls to Array Helper's element() and elements() functions +Step 7: Check the calls to Array Helper's element() and elements() functions **************************************************************************** The default return value of these functions, when the required elements don't exist, has been changed from FALSE to NULL. *************************************************************** -Step 7: Remove usage of (previously) deprecated functionalities +Step 8: Remove usage of (previously) deprecated functionalities *************************************************************** In addition to the ``$autoload['core']`` configuration setting, there's a number of other functionalities @@ -151,4 +167,4 @@ emails. To override this behaviour, pass FALSE as the first parameter in the ``s if ($this->email->send(FALSE)) { // Parameters won't be cleared - } \ No newline at end of file + } -- cgit v1.2.3-24-g4f1b From f3fddf6e0f4b0b0976c433c139326bdcd45d2da0 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 31 Aug 2012 10:10:16 +0800 Subject: fix issue #1719 and update ip address length on captcha helper Signed-off-by: Bo-Yi Wu --- user_guide_src/source/changelog.rst | 1 + user_guide_src/source/helpers/captcha_helper.rst | 2 +- user_guide_src/source/libraries/trackback.rst | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 827b1f090..cf0d29f1b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -51,6 +51,7 @@ Release Date: Not Released - Path constants BASEPATH, APPPATH and VIEWPATH are now (internally) defined as absolute paths. - Updated email validation methods to use ``filter_var()`` instead of PCRE. - Changed environment defaults to report all errors in 'development' and only fatal ones in 'testing' and 'production' but only display them in 'development'. + - Updated ip_address lengths from 16 to 45 for supporting ipv6 address on trackback library and captcha helper. - Helpers diff --git a/user_guide_src/source/helpers/captcha_helper.rst b/user_guide_src/source/helpers/captcha_helper.rst index 48095a11d..90244739b 100644 --- a/user_guide_src/source/helpers/captcha_helper.rst +++ b/user_guide_src/source/helpers/captcha_helper.rst @@ -102,7 +102,7 @@ Here is a table prototype CREATE TABLE captcha (   captcha_id bigint(13) unsigned NOT NULL auto_increment,   captcha_time int(10) unsigned NOT NULL,   - ip_address varchar(16) default '0' NOT NULL,   + ip_address varchar(45) NOT NULL,   word varchar(20) NOT NULL,   PRIMARY KEY `captcha_id` (`captcha_id`),   KEY `word` (`word`) diff --git a/user_guide_src/source/libraries/trackback.rst b/user_guide_src/source/libraries/trackback.rst index 07b2b2177..f9e0df882 100644 --- a/user_guide_src/source/libraries/trackback.rst +++ b/user_guide_src/source/libraries/trackback.rst @@ -114,7 +114,7 @@ store them. Here is a basic prototype for such a table:: excerpt text NOT NULL, blog_name varchar(100) NOT NULL, tb_date int(10) NOT NULL, - ip_address varchar(16) NOT NULL, + ip_address varchar(45) NOT NULL, PRIMARY KEY `tb_id` (`tb_id`), KEY `entry_id` (`entry_id`) ); -- cgit v1.2.3-24-g4f1b From 7c70d10d699d7f7ecd446bf81c9e05de0811f282 Mon Sep 17 00:00:00 2001 From: pickupman Date: Sun, 2 Sep 2012 23:40:49 -0400 Subject: Fix #1741 is_unique duplicated in documentation for Form_validation --- user_guide_src/source/libraries/form_validation.rst | 1 - 1 file changed, 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 3bcad7ba6..39f787402 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -884,7 +884,6 @@ Rule Parameter Description 0, 1, 2, 3, etc. **is_natural_no_zero** No Returns FALSE if the form element contains anything other than a natural number, but not zero: 1, 2, 3, etc. -**is_unique** Yes Returns FALSE if the form element is not unique in a database table. is_unique[table.field] **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. -- cgit v1.2.3-24-g4f1b From 596e48d30d91c69a3a4a0bfbd059e8fa21d88ad1 Mon Sep 17 00:00:00 2001 From: Joe McFrederick Date: Tue, 4 Sep 2012 14:25:47 -0400 Subject: Add documation to user guide for Migrations class --- user_guide_src/source/libraries/migration.rst | 134 +++++++++++++++++++++++++- 1 file changed, 133 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/migration.rst b/user_guide_src/source/libraries/migration.rst index 5192f1f29..cb7d96a6d 100644 --- a/user_guide_src/source/libraries/migration.rst +++ b/user_guide_src/source/libraries/migration.rst @@ -2,4 +2,136 @@ Migrations Class ################ -Coming soon. \ No newline at end of file +Migrations are a convenient way for you to alter your database in a +structured and organized manner. You could edit fragments of SQL by hand +but you would then be responsible for telling other developers that they +need to go and run them. You would also have to keep track of which changes +need to be run against the production machines next time you deploy. + +The database table **migration** tracks which migrations have already been +run so all you have to do is update your application files and +call **$this->migrate->current()** to work out which migrations should be run. +The current version is found in **config/migration.php**. + +****************** +Create a Migration +****************** + +.. note:: Each Migration is run in numerical order forward or backwards + depending on the method taken. Use a prefix of 3 numbers followed by an + underscore for the filename of your migration. + +This will be the first migration for a new site which has a blog. All +migrations go in the folder **application/migrations/** and have names such +as: **001_add_blog.php**.:: + + defined('BASEPATH') OR exit('No direct script access allowed'); + + class Migration_Add_blog extends CI_Migration { + + public function up() + { + $this->dbforge->add_field(array( + 'blog_id' => array( + 'type' => 'INT', + 'constraint' => 5, + 'unsigned' => TRUE, + 'auto_increment' => TRUE + ), + 'blog_title' => array( + 'type' => 'VARCHAR', + 'constraint' => '100', + ), + 'blog_description' => array( + 'type' => 'TEXT', + 'null' => TRUE, + ), + )); + + $this->dbforge->create_table('blog'); + } + + public function down() + { + $this->dbforge->drop_table('blog'); + } + +Then in **application/config/migration.php** set **$config['migration_version'] = 1;**. + +************* +Usage Example +************* + +In this example some simple code is placed in **application/controllers/migrate.php** +to update the schema.:: + + $this->load->library('migration'); + + if ( ! $this->migration->current()) + { + show_error($this->migration->error_string()); + } + +****************** +Function Reference +****************** + +There are five available methods for the Migration class: + +- $this->migration->current(); +- $this->migration->error_string(); +- $this->migration->find_migrations(); +- $this->migration->latest(); +- $this->migration->version(); + +$this->migration->current() +============================ + +The current migration is whatever is set for **$config['migration_version']** in +**application/config/migration.php**. + +$this->migration->error_string() +================================= + +This returns a string of errors while performing a migration. + +$this->migration->find_migrations() +==================================== + +An array of migration filenames are returned that are found in the **migration_path** +property. + +$this->migration->latest() +=========================== + +This works much the same way as current() but instead of looking for +the **$config['migration_version']** the Migration class will use the very +newest migration found in the filesystem. + +$this->migration->version() +============================ + +Version can be used to roll back changes or step forwards programmatically to +specific versions. It works just like current but ignores **$config['migration_version']**.:: + + $this->load->library('migration'); + + $this->migration->version(5); + +********************* +Migration Preferences +********************* + +The following is a table of all the config options for migrations. + +========================== ====================== ============= ============================================= +Preference Default Options Description +========================== ====================== ============= ============================================= +**migration_enabled** FALSE TRUE / FALSE Enable or disable migrations. +**migration_path** APPPATH.'migrations/' None The path to your migrations folder. +**migration_version** 0 None The current version your database should use. +**migration_table** migrations None The table name for storing the shema + version number. +**migration_auto_latest** FALSE TRUE / FALSE Enable or disable automatically + running migrations. +========================== ====================== ============= ============================================= -- cgit v1.2.3-24-g4f1b From 44558109c8fc0ae7a223e6fae6b44f6598b2d3ad Mon Sep 17 00:00:00 2001 From: Jonathan Bonnefoy Date: Wed, 5 Sep 2012 15:41:42 +0200 Subject: Database display error supporting "Loader.php" and "MY_Loader.php" --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 578e60ec0..ce45f8f03 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -143,6 +143,7 @@ Release Date: Not Released - Added capability for packages to hold database.php config files - Added subdrivers support (currently only used by PDO). - Added client compression support for MySQL and MySQLi. + - Removed Loader class from Database error to better find the likely culprit. - Libraries -- cgit v1.2.3-24-g4f1b From f7e23b3357c73cc9eb50c59f444181fcfaa2267d Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Fri, 7 Sep 2012 09:52:32 +0100 Subject: Removed the   from the default config variables in the pagination class. Fixes #187 and #208 Signed-off-by: Alex Bilbie --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 0835a9c01..f7dfc84ac 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -201,6 +201,7 @@ Release Date: Not Released - Added support for setting custom attributes. - Deprecated usage of the "anchor_class" setting (use the new "attributes" setting instead). - Added $config['reuse_query_string'] to allow automatic repopulation of query string arguments, combined with normal URI segments. + - Removed the default `` `` from a number of the configuration variables. - Added the ability to use a proxy with the :doc:`XML-RPC Library `. - Core -- cgit v1.2.3-24-g4f1b From aab26a12a98ca99d956ef24e36c2262938631d73 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Tue, 11 Sep 2012 13:10:21 +0200 Subject: Better server test in redirect() of URL helper "Location" header bugs are specific to IIS; previous test was matching all HTTP servers under Windows. This test isn't perfect yet ($_SERVER['SERVER_SOFTWARE'], which corresponds to the "Server" header of HTTP response, might be missing), but there is no perfect test. "Refresh" method makes the window blank for quite a noticeable time, so let's not affect other servers because of IIS. --- user_guide_src/source/helpers/url_helper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 305454048..8de7817e4 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -303,7 +303,7 @@ link. The function will build the URL based on your config file values. The optional second parameter allows you to force a particular redirection method. The available methods are "location" or "refresh", with location -being faster but less reliable on Windows servers. The default is "auto", +being faster but less reliable on IIS servers. The default is "auto", which will attempt to intelligently choose the method based on the server environment. -- cgit v1.2.3-24-g4f1b From e3162843d9c2ca7e35f09741b6a361813473d4c5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 12 Sep 2012 14:44:26 +0300 Subject: Minor adjustments --- user_guide_src/source/changelog.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f7dfc84ac..481afeee3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -51,8 +51,8 @@ Release Date: Not Released - Changed detection of ``$view_folder`` so that if it's not found in the current path, it will now also be searched for under the application folder. - Path constants BASEPATH, APPPATH and VIEWPATH are now (internally) defined as absolute paths. - Updated email validation methods to use ``filter_var()`` instead of PCRE. - - Changed environment defaults to report all errors in 'development' and only fatal ones in 'testing' and 'production' but only display them in 'development'. - - Updated ip_address lengths from 16 to 45 for supporting ipv6 address on trackback library and captcha helper. + - Changed environment defaults to report all errors in *development* and only fatal ones in *testing*, *production* but only display them in *development*. + - Updated *ip_address* database field lengths from 16 to 45 for supporting IPv6 address on :doc:`Trackback Library ` and :doc:`Captcha Helper `. - Helpers @@ -144,7 +144,7 @@ Release Date: Not Released - Added capability for packages to hold database.php config files - Added subdrivers support (currently only used by PDO). - Added client compression support for MySQL and MySQLi. - - Removed Loader class from Database error to better find the likely culprit. + - Removed :doc:`Loader Class ` from Database error to better find the likely culprit. - Libraries @@ -201,7 +201,7 @@ Release Date: Not Released - Added support for setting custom attributes. - Deprecated usage of the "anchor_class" setting (use the new "attributes" setting instead). - Added $config['reuse_query_string'] to allow automatic repopulation of query string arguments, combined with normal URI segments. - - Removed the default `` `` from a number of the configuration variables. + - Removed the default `` `` from a number of the configuration variables. - Added the ability to use a proxy with the :doc:`XML-RPC Library `. - Core @@ -340,7 +340,7 @@ Bug fixes for 3.0 - Fixed a bug (#1613) - :doc:`Form Helper ` functions ``form_multiselect()``, ``form_dropdown()`` didn't properly handle empty array option groups. - Fixed a bug (#1605) - :doc:`Pagination Library ` produced incorrect *previous* and *next* link values. - Fixed a bug in SQLSRV's ``affected_rows()`` method where an erroneous function name was used. -- Fixed a bug (#1000) - Change syntax of $view_file to $_ci_view_file to prevent being overwritten by application. +- Fixed a bug (#1000) - Change syntax of ``$view_file`` to ``$_ci_view_file`` to prevent being overwritten by application. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From 8280885499ca4b1cffacc9ad78a9eff07a84de25 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Thu, 13 Sep 2012 05:19:59 +0200 Subject: directory_map() was skipping files and directories named "0" Close #1757. Thanks @BennyC! --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 481afeee3..66dd0ea05 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -341,6 +341,7 @@ Bug fixes for 3.0 - Fixed a bug (#1605) - :doc:`Pagination Library ` produced incorrect *previous* and *next* link values. - Fixed a bug in SQLSRV's ``affected_rows()`` method where an erroneous function name was used. - Fixed a bug (#1000) - Change syntax of ``$view_file`` to ``$_ci_view_file`` to prevent being overwritten by application. +- Fixed a bug (#1757) - :doc:`Directory Helper ` function ``directory_map()`` was skipping files and directories named *0*. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From 5f733c4fd1369a185804cd7b6d27debc50ab1826 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Sat, 15 Sep 2012 10:48:17 +0200 Subject: Update reserved names documentation - EXT removed in 079fbfcde095230f304e889217f897031a948f61 - VIEWPATH added in 8eef9c77512d4fad5357d3cbda83b89f844d7d16 --- user_guide_src/source/general/reserved_names.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/general/reserved_names.rst b/user_guide_src/source/general/reserved_names.rst index 5ce7fc2ff..3354375c5 100644 --- a/user_guide_src/source/general/reserved_names.rst +++ b/user_guide_src/source/general/reserved_names.rst @@ -45,11 +45,11 @@ Constants --------- - ENVIRONMENT -- EXT - FCPATH - SELF - BASEPATH - APPPATH +- VIEWPATH - CI_VERSION - FILE_READ_MODE - FILE_WRITE_MODE -- cgit v1.2.3-24-g4f1b From 530b946191c68886b6e156004742e785bfeef8cc Mon Sep 17 00:00:00 2001 From: vlakoff Date: Mon, 17 Sep 2012 14:18:07 +0200 Subject: redirect() documentation: add a note for IIS users --- user_guide_src/source/helpers/url_helper.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 8de7817e4..1987dfb72 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -325,3 +325,7 @@ engine purposes. The default Response Code is 302. The third parameter is .. note:: For very fine grained control over headers, you should use the `Output Library ` set_header() function. + +.. note:: To IIS users: if you hide the `Server` HTTP header, the "auto" + method won't detect IIS, in that case it is advised you explicitly + use the "refresh" method. -- cgit v1.2.3-24-g4f1b From 035f499a59f9a226fa1223387074ef4e28abd4bb Mon Sep 17 00:00:00 2001 From: vlakoff Date: Mon, 17 Sep 2012 14:45:21 +0200 Subject: Changelog: add entry for the change in "auto" method of redirect() --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f7dfc84ac..ed1b33835 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -67,6 +67,7 @@ Release Date: Not Released - ``anchor_popup()`` will now fill the "href" attribute with the URL and its JS code will return false instead. - Added JS window name support to ``anchor_popup()`` function. - Added support (auto-detection) for HTTP/1.1 response code 303 in ``redirect()``. + - "auto" method in ``redirect()`` now chooses the "refresh" method only on IIS servers, instead of all servers on Windows. - Added XHTML Basic 1.1 doctype to :doc:`HTML Helper `. - Changed ``humanize()`` to include a second param for the separator. - Refactored ``plural()`` and ``singular()`` to avoid double pluralization and support more words. -- cgit v1.2.3-24-g4f1b From 65bdaf5e2636cb7aa8780826529020ab0bfe9252 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 21 Sep 2012 13:49:09 +0800 Subject: Fixed pagination document error. Signed-off-by: Bo-Yi Wu --- user_guide_src/source/libraries/pagination.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/pagination.rst b/user_guide_src/source/libraries/pagination.rst index 7d750bd23..00554c1c7 100644 --- a/user_guide_src/source/libraries/pagination.rst +++ b/user_guide_src/source/libraries/pagination.rst @@ -80,7 +80,7 @@ The number of "digit" links you would like before and after the selected page number. For example, the number 2 will place two digits on either side, as in the example links at the very top of this page. -$config['use_page_number'] = TRUE; +$config['use_page_numbers'] = TRUE; ================================== By default, the URI segment will use the starting index for the items -- cgit v1.2.3-24-g4f1b From a5e329ff95e0308c07b8db04117f056081997796 Mon Sep 17 00:00:00 2001 From: "W. Kristianto" Date: Sun, 23 Sep 2012 22:34:18 +0700 Subject: Update user_guide_src/source/libraries/loader.rst Remove the second parameter --- user_guide_src/source/libraries/loader.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/loader.rst b/user_guide_src/source/libraries/loader.rst index 33c1bafec..615aba1c2 100644 --- a/user_guide_src/source/libraries/loader.rst +++ b/user_guide_src/source/libraries/loader.rst @@ -344,6 +344,6 @@ calling add_package_path(). $this->load->remove_package_path(APPPATH.'my_app'); // Again without the second parameter: - $this->load->add_package_path(APPPATH.'my_app', TRUE); + $this->load->add_package_path(APPPATH.'my_app'); $this->load->view('my_app_index'); // Loads $this->load->view('welcome_message'); // Loads -- cgit v1.2.3-24-g4f1b From 824b4f220ca3dadc8f0945c665a7d7f8105a5dc4 Mon Sep 17 00:00:00 2001 From: Daniel Morris Date: Thu, 4 Oct 2012 10:25:03 +0100 Subject: Updated changelog to include changes to the Encryption library --- user_guide_src/source/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 73d9fb0ec..847b1be3e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -204,6 +204,8 @@ Release Date: Not Released - Added $config['reuse_query_string'] to allow automatic repopulation of query string arguments, combined with normal URI segments. - Removed the default `` `` from a number of the configuration variables. - Added the ability to use a proxy with the :doc:`XML-RPC Library `. + - :doc:`Encryption Library ` changes include: + - Added support for hashing algorithms other than SHA1 and MD5. - Core -- cgit v1.2.3-24-g4f1b From 2ea33c37e9bfa3ff0e029c18a0d2c9ef05016bf0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Oct 2012 12:37:51 +0300 Subject: Fix issue #1789 Signed-off-by: Andrey Andreev --- user_guide_src/source/changelog.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 73d9fb0ec..dd0cb9e35 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -312,12 +312,12 @@ Bug fixes for 3.0 - Fixed a bug (#666) - :doc:`Output library `'s set_content_type() method didn't set the document charset. - Fixed a bug (#784, #861) - :doc:`Database Forge ` method ``create_table()`` used to accept constraints for MSSQL/SQLSRV integer-type columns. - Fixed a bug (#706) - SQLSRV/MSSSQL didn't escape field names. -- Fixed a bug (#1452) - protect_identifiers() didn't properly detect identifiers with spaces in their names. -- Fixed a bug where protect_identifiers() ignored it's extra arguments when the value passed to it is an array. -- Fixed a bug where _has_operator() didn't detect BETWEEN. -- Fixed a bug in :doc:`Query Builder `'s join() method where it failed with identifiers containing dashes. +- Fixed a bug (#1452) - ``protect_identifiers()`` didn't properly detect identifiers with spaces in their names. +- Fixed a bug where ``protect_identifiers()`` ignored it's extra arguments when the value passed to it is an array. +- Fixed a bug where ``_has_operator()`` didn't detect BETWEEN. +- Fixed a bug in :doc:`Query Builder `'s ``join()`` method where it failed with identifiers containing dashes. - Fixed a bug (#1264) - :doc:`Database Forge ` and :doc:`Database Utilities ` didn't update/reset the databases and tables list cache when a table or a database is created, dropped or renamed. -- Fixed a bug (#7) - :doc:`Query Builder `'s join() method only escaped one set of conditions. +- Fixed a bug (#7) - :doc:`Query Builder `'s ``join()`` method only escaped one set of conditions. - Fixed a bug (#1321) - Core Exceptions class couldn't find the errors/ folder in some cases. - Fixed a bug in the File-based :doc:`Cache Library ` driver's get_metadata() method where a non-existent array key was accessed for the TTL value. - Fixed a bug (#1202) - :doc:`Encryption Library ` encode_from_legacy() didn't set back the encrypt mode on failure. @@ -343,6 +343,7 @@ Bug fixes for 3.0 - Fixed a bug in SQLSRV's ``affected_rows()`` method where an erroneous function name was used. - Fixed a bug (#1000) - Change syntax of ``$view_file`` to ``$_ci_view_file`` to prevent being overwritten by application. - Fixed a bug (#1757) - :doc:`Directory Helper ` function ``directory_map()`` was skipping files and directories named *0*. +- Fixed a bug (#1789) - :doc:`Database Library ` method ``escape_str()`` escaped quote characters in LIKE conditions twice under MySQL. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From 5b92ae1dfb6ac99630693d193b0d3f60f9df525f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Oct 2012 13:05:03 +0300 Subject: Misc. style fixes [ci skip] --- user_guide_src/source/changelog.rst | 49 ++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 23 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4d7758659..912f8f8e9 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -145,7 +145,7 @@ Release Date: Not Released - Added capability for packages to hold database.php config files - Added subdrivers support (currently only used by PDO). - Added client compression support for MySQL and MySQLi. - - Removed :doc:`Loader Class ` from Database error to better find the likely culprit. + - Removed :doc:`Loader Class ` from Database error tracing to better find the likely culprit. - Libraries @@ -160,10 +160,12 @@ Release Date: Not Released - Changed the Cookie driver to select only one row when using database sessions. - Cookie driver now only writes to database at end of request when using database. - Cookie driver now uses PHP functions for faster array manipulation when using database. - - Added all_flashdata() method to session class. Returns an associative array of only flashdata. - - Added has_userdata() method to verify existence of userdata item. - - Added tempdata(), set_tempdata(), and unset_tempdata() methods for manipulating tempdata. - - Added max_filename_increment config setting for Upload library. + - Added ``all_flashdata()`` method to session class. Returns an associative array of only flashdata. + - Added ``has_userdata()`` method to verify existence of userdata item. + - Added ``tempdata()``, ``set_tempdata()``, and ``unset_tempdata()`` methods for manipulating tempdata. + - :doc:`File Uploading Library ` changes include: + - Added *max_filename_increment* config setting. + - Added an "index" parameter to the ``data()`` method. - :doc:`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". @@ -174,9 +176,6 @@ Release Date: Not Released - Class properties wm_font_color, wm_shadow_color and wm_use_drop_shadow are now protected, to avoid breaking the text_watermark() method if they are set manually after initialization. - If property maintain_ratio is set to TRUE, image_reproportion() now doesn't need both width and height to be specified. - Property maintain_ratio is now taken into account when resizing images using ImageMagick library - - Removed SHA1 function in the :doc:`Encryption Library `. - - Added $config['csrf_regeneration'] to the CSRF protection in the :doc:`Security library `, which makes token regeneration optional. - - Added $config['csrf_exclude_uris'] to the CSRF protection in the :doc:`Security library `, which allows you list URIs which will not have the CSRF validation functions run. - :doc:`Form Validation library ` changes include: - Added method error_array() to return all error messages as an array. - Added method set_data() to set an alternative data array to be validated instead of the default $_POST. @@ -187,7 +186,7 @@ Release Date: Not Released - Native PHP functions used as rules can now accept an additional parameter, other than the data itself. - Updated set_rules() to accept an array of rules as well as a string. - Fields that have empty rules set no longer run through validation (and therefore are not considered erroneous). - - Allowed for setting table class defaults in a config file. + - Added support for setting :doc:`Table ` class defaults in a config file. - Added a Wincache driver to the :doc:`Caching Library `. - Added a Redis driver to the :doc:`Caching Library `. - :doc:`Email library ` changes include: @@ -196,7 +195,6 @@ Release Date: Not Released - Added dsn (delivery status notification) option. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Successfully sent emails will automatically clear the parameters. - - Added an "index" parameter to the data() method in the :doc:`Upload Library `. - :doc:`Pagination Library ` changes include: - Added support for the anchor "rel" attribute. - Added support for setting custom attributes. @@ -205,32 +203,37 @@ Release Date: Not Released - Removed the default `` `` from a number of the configuration variables. - Added the ability to use a proxy with the :doc:`XML-RPC Library `. - :doc:`Encryption Library ` changes include: - - Added support for hashing algorithms other than SHA1 and MD5. + - Added support for hashing algorithms other than SHA1 and MD5. + - Removed previously deprecated ``sha1()`` method. - Core - Changed private methods in the :doc:`URI Library ` to protected so MY_URI can override them. - - Removed CI_CORE boolean constant from CodeIgniter.php (no longer Reactor and Core versions). + - Removed ``CI_CORE`` boolean constant from CodeIgniter.php (no longer Reactor and Core versions). - :doc:`Loader Library ` changes include: - Added method get_vars() to the Loader to retrieve all variables loaded with $this->load->vars(). - CI_Loader::_ci_autoloader() is now a protected method. - Added autoloading of drivers with $autoload['drivers']. - CI_Loader::library() will now load drivers as well, for backward compatibility of converted libraries (like Session). - - is_loaded() function from system/core/Commons.php now returns a reference. + - ``is_loaded()`` function from *system/core/Commons.php* now returns a reference. - $config['rewrite_short_tags'] now has no effect when using PHP 5.4 as *` to retrieve $_SERVER['REQUEST_METHOD']. + - Added ``method()`` to the :doc:`Input Library ` to retrieve ``$_SERVER['REQUEST_METHOD']``. - Modified valid_ip() to use PHP's filter_var() in the :doc:`Input Library `. - - Added support for HTTP-Only cookies with new config option ``cookie_httponly`` (default FALSE). + - Added support for HTTP-Only cookies with new config option *cookie_httponly* (default FALSE). - Renamed method _call_hook() to call_hook() in the :doc:`Hooks Library `. - - Added get_content_type() method to the :doc:`Output Library `. - - Added get_mimes() function to system/core/Commons.php to return the config/mimes.php array. - - Added a second argument to set_content_type() in the :doc:`Output Library ` that allows setting the document charset as well. - - $config['time_reference'] now supports all timezone strings supported by PHP. - - Added support for HTTP code 303 ("See Other") in set_status_header(). - - Changed :doc:`Config Library ` method site_url() to accept an array as well. - - Added method ``strip_image_tags()`` to the :doc:`Security Library `. + - :doc:`Output Library ` changes include: + - Added method ``get_content_type()``. + - Added a second argument to method ``set_content_type()`` that allows setting the document charset as well. + - Added ``get_mimes()`` function to *system/core/Commons.php* to return the *config/mimes.php* array. + - ``$config['time_reference']`` now supports all timezone strings supported by PHP. + - Added support for HTTP code 303 ("See Other") in ``set_status_header()``. + - Changed :doc:`Config Library ` method ``site_url()`` to accept an array as well. + - :doc:`Security Library ` changes include: + - Added method ``strip_image_tags()``. + - Added ``$config['csrf_regeneration']``, which makes token regeneration optional. + - Added ``$config['csrf_exclude_uris']``, which allows you list URIs which will not have the CSRF validation methods run. - Changed ``_exception_handler()`` to respect php.ini 'display_errors' setting. - - Added support for IPv4 range masks (e.g. 192.168.1.1/24) to specify ranges of IP addresses for use with the proxy_ips setting. + - Added support for IPv4 range masks (e.g. 192.168.1.1/24) to specify ranges of IP addresses for use with the *proxy_ips* setting. Bug fixes for 3.0 ------------------ -- cgit v1.2.3-24-g4f1b From ddb32da0e86510d7e68c5432a1657732a01b5d34 Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Thu, 4 Oct 2012 10:19:57 -0700 Subject: Updated changelog with bugfix (#395) Signed-off-by: Kyle Johnson --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 73d9fb0ec..98ab4aec1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -343,6 +343,7 @@ Bug fixes for 3.0 - Fixed a bug in SQLSRV's ``affected_rows()`` method where an erroneous function name was used. - Fixed a bug (#1000) - Change syntax of ``$view_file`` to ``$_ci_view_file`` to prevent being overwritten by application. - Fixed a bug (#1757) - :doc:`Directory Helper ` function ``directory_map()`` was skipping files and directories named *0*. +- Fixed a bug (#395) - :doc:`Unit Testing Library ` method ``result()`` didn't properly check array result columns against _test_items_visible when called from ``report()`` method. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From 6602cd7b7433b1d514b0f944cc9de563133174cf Mon Sep 17 00:00:00 2001 From: Daniel Morris Date: Thu, 4 Oct 2012 21:06:21 +0100 Subject: DRY determining server protocol Signed-off-by: Daniel Morris --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 847b1be3e..378eec061 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -231,6 +231,7 @@ Release Date: Not Released - Added method ``strip_image_tags()`` to the :doc:`Security Library `. - Changed ``_exception_handler()`` to respect php.ini 'display_errors' setting. - Added support for IPv4 range masks (e.g. 192.168.1.1/24) to specify ranges of IP addresses for use with the proxy_ips setting. + - Removed redundant conditional to determine HTTP server protocol in ``set_status_header()`` Bug fixes for 3.0 ------------------ -- cgit v1.2.3-24-g4f1b From 9438e26671ee1f0b49c8da7a56a0a195788fd5da Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 13:16:27 +0300 Subject: Fix issue #116 + other space/style fixes [ci skip --- user_guide_src/source/changelog.rst | 4 ++-- user_guide_src/source/libraries/image_lib.rst | 23 +++++++++++------------ 2 files changed, 13 insertions(+), 14 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cafdf1083..e2f780c65 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -233,7 +233,7 @@ Release Date: Not Released - Added ``$config['csrf_regeneration']``, which makes token regeneration optional. - Added ``$config['csrf_exclude_uris']``, which allows you list URIs which will not have the CSRF validation methods run. - Changed ``_exception_handler()`` to respect php.ini 'display_errors' setting. - - Removed redundant conditional to determine HTTP server protocol in ``set_status_header()`` + - Removed redundant conditional to determine HTTP server protocol in ``set_status_header()``. - Added support for IPv4 range masks (e.g. 192.168.1.1/24) to specify ranges of IP addresses for use with the *proxy_ips* setting. Bug fixes for 3.0 @@ -349,8 +349,8 @@ Bug fixes for 3.0 - Fixed a bug in SQLSRV's ``affected_rows()`` method where an erroneous function name was used. - Fixed a bug (#1000) - Change syntax of ``$view_file`` to ``$_ci_view_file`` to prevent being overwritten by application. - Fixed a bug (#1757) - :doc:`Directory Helper ` function ``directory_map()`` was skipping files and directories named *0*. -- Fixed a bug (#395) - :doc:`Unit Testing Library ` method ``result()`` didn't properly check array result columns against _test_items_visible when called from ``report()`` method. - Fixed a bug (#1789) - :doc:`Database Library ` method ``escape_str()`` escaped quote characters in LIKE conditions twice under MySQL. +- Fixed a bug (#395) - :doc:`Unit Testing Library ` method ``result()`` didn't properly check array result columns when called from ``report()``. Version 2.1.2 ============= diff --git a/user_guide_src/source/libraries/image_lib.rst b/user_guide_src/source/libraries/image_lib.rst index ed6575c62..dcdccbd92 100644 --- a/user_guide_src/source/libraries/image_lib.rst +++ b/user_guide_src/source/libraries/image_lib.rst @@ -91,9 +91,9 @@ error upon failure, like this:: echo $this->image_lib->display_errors(); } -Note: You can optionally specify the HTML formatting to be applied to -the errors, by submitting the opening/closing tags in the function, like -this:: +.. note:: You can optionally specify the HTML formatting to be applied to + the errors, by submitting the opening/closing tags in the function, + like this:: $this->image_lib->display_errors('

', '

'); @@ -225,8 +225,7 @@ pixels) specifying where to crop, like this:: $config['y_axis'] = '40'; All preferences listed in the table above are available for this -function except these: rotation_angle, width, height, create_thumb, -new_image. +function except these: rotation_angle, create_thumb, new_image. Here's an example showing how you might crop an image:: @@ -243,11 +242,11 @@ Here's an example showing how you might crop an image:: echo $this->image_lib->display_errors(); } -Note: Without a visual interface it is difficult to crop images, so this -function 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. +.. note:: Without a visual interface it is difficult to crop images, so this + function 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. $this->image_lib->rotate() =========================== @@ -338,8 +337,8 @@ The above example will use a 16 pixel True Type font to create the text bottom/center of the image, 20 pixels from the bottom of the image. .. note:: In order for the image class to be allowed to do any - processing, the image file must have "write" file permissions. For - example, 777. + processing, the image file must have "write" file permissions + For example, 777. Watermarking Preferences ======================== -- cgit v1.2.3-24-g4f1b From 241a69be96de350b18d875304eb1e361b710e148 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 14:58:36 +0300 Subject: [ci skip] Add a note to the user guide regarding issue #1010 --- user_guide_src/source/libraries/form_validation.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 39f787402..faf221981 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -861,8 +861,9 @@ 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] -**is_unique** Yes Returns FALSE if the form element is not unique to the is_unique[table.field] - table and field name in the parameter. is_unique[table.field] +**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 ` to be + enabled in order to work. **max_length** Yes Returns FALSE if the form element is longer then the parameter value. max_length[12] **exact_length** Yes Returns FALSE if the form element is not exactly the parameter value. exact_length[8] **greater_than** Yes Returns FALSE if the form element is less than or equal to the parameter value or not greater_than[8] -- cgit v1.2.3-24-g4f1b From 99ae226607fff411bae3b69475bd1b0e3981d563 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 15:14:30 +0300 Subject: Add PNG transparency support in CI_Image_lib::text_watermark() (originally from pull #1317, partially fixes #1139) --- user_guide_src/source/changelog.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e2f780c65..b3fbe718b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -172,10 +172,11 @@ Release Date: Not Released - Added function remove() to remove a cart item, updating with quantity of 0 seemed like a hack but has remained to retain compatibility. - :doc:`Image Manipulation library ` changes include: - The initialize() method now only sets existing class properties. - - Added support for 3-length hex color values for wm_font_color and wm_shadow_color properties, as well as validation for them. - - Class properties wm_font_color, wm_shadow_color and wm_use_drop_shadow are now protected, to avoid breaking the text_watermark() method if they are set manually after initialization. - - If property maintain_ratio is set to TRUE, image_reproportion() now doesn't need both width and height to be specified. - - Property maintain_ratio is now taken into account when resizing images using ImageMagick library + - Added support for 3-length hex color values for *wm_font_color* and *wm_shadow_color* properties, as well as validation for them. + - Class properties *wm_font_color*, *wm_shadow_color* and *wm_use_drop_shadow* are now protected, to avoid breaking the ``text_watermark()`` method if they are set manually after initialization. + - If property *maintain_ratio* is set to TRUE, ``image_reproportion()`` now doesn't need both width and height to be specified. + - Property *maintain_ratio* is now taken into account when resizing images using ImageMagick library. + - Added support for maintaining transparency for PNG images in method ``text_watermark()``. - :doc:`Form Validation library ` changes include: - Added method error_array() to return all error messages as an array. - Added method set_data() to set an alternative data array to be validated instead of the default $_POST. -- cgit v1.2.3-24-g4f1b From 327e4f7376749f4fe7f0fadb56bd925dc721463a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 15:44:43 +0300 Subject: [ci skip] Fix up the cheatsheets page (original pull #1244) --- .../images/codeigniter_1.7.1_library_reference.png | Bin 111744 -> 111747 bytes user_guide_src/source/overview/cheatsheets.rst | 15 +++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/images/codeigniter_1.7.1_library_reference.png b/user_guide_src/source/images/codeigniter_1.7.1_library_reference.png index 554ae2eed..7f054f95f 100644 Binary files a/user_guide_src/source/images/codeigniter_1.7.1_library_reference.png and b/user_guide_src/source/images/codeigniter_1.7.1_library_reference.png differ diff --git a/user_guide_src/source/overview/cheatsheets.rst b/user_guide_src/source/overview/cheatsheets.rst index 2e277aa9a..80c3112c4 100644 --- a/user_guide_src/source/overview/cheatsheets.rst +++ b/user_guide_src/source/overview/cheatsheets.rst @@ -5,12 +5,19 @@ CodeIgniter Cheatsheets Library Reference ================= -`|CodeIgniter Library -Reference| <../images/codeigniter_1.7.1_library_reference.pdf>`_ +|CodeIgniter Library Reference| + +- :download:`Download PDF <../images/codeigniter_1.7.1_library_reference.pdf>` + Helpers Reference ================= -`|image1| <../images/codeigniter_1.7.1_helper_reference.pdf>`_ +|CodeIgniter Helper Reference| + +- :download:`Download PDF <../images/codeigniter_1.7.1_helper_reference.pdf>` + .. |CodeIgniter Library Reference| image:: ../images/codeigniter_1.7.1_library_reference.png -.. |image1| image:: ../images/codeigniter_1.7.1_helper_reference.png + :target: ../_downloads/codeigniter_1.7.1_library_reference.pdf +.. |CodeIgniter Helper Reference| image:: ../images/codeigniter_1.7.1_helper_reference.png + :target: ../_downloads/codeigniter_1.7.1_helper_reference.pdf -- cgit v1.2.3-24-g4f1b From 6123b61e8ec95ac91f67bfbf442e34021c922319 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 15:54:43 +0300 Subject: Fix issue #1340 [ci skip] --- user_guide_src/source/libraries/file_uploading.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/file_uploading.rst b/user_guide_src/source/libraries/file_uploading.rst index 65cd5c722..1698dcbb9 100644 --- a/user_guide_src/source/libraries/file_uploading.rst +++ b/user_guide_src/source/libraries/file_uploading.rst @@ -197,6 +197,7 @@ Preference Default Value Options Descripti Separate multiple types with a pipe. **file_name** None Desired file name If set CodeIgniter will rename the uploaded file to this name. The extension provided in the file name must also be an allowed file type. + If no extension is provided in the original file_name will be used. **overwrite** FALSE TRUE/FALSE (boolean) If set to true, if a file with the same name as the one you are uploading exists, it will be overwritten. If set to false, a number will be appended to the filename if another with the same name exists. -- cgit v1.2.3-24-g4f1b From 1194ad733135214e9905123258df3600b01735fd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 17:05:46 +0300 Subject: Fix issue #1692 --- user_guide_src/source/changelog.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index b3fbe718b..5cfd795b1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -350,8 +350,9 @@ Bug fixes for 3.0 - Fixed a bug in SQLSRV's ``affected_rows()`` method where an erroneous function name was used. - Fixed a bug (#1000) - Change syntax of ``$view_file`` to ``$_ci_view_file`` to prevent being overwritten by application. - Fixed a bug (#1757) - :doc:`Directory Helper ` function ``directory_map()`` was skipping files and directories named *0*. -- Fixed a bug (#1789) - :doc:`Database Library ` method ``escape_str()`` escaped quote characters in LIKE conditions twice under MySQL. -- Fixed a bug (#395) - :doc:`Unit Testing Library ` method ``result()`` didn't properly check array result columns when called from ``report()``. +- Fixed a bug (#1789) - :doc:`Database Library ` method ``escape_str()`` escaped quote characters in LIKE conditions twice under MySQL. +- Fixed a bug (#395) - :doc:`Unit Testing Library ` method ``result()`` didn't properly check array result columns when called from ``report()``. +- Fixed a bug (#1692) - :doc:`Database Library ` method ``display_error()`` didn't properly trace the possible error source on Windows systems. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b From ccd01c75f5802e4e4b74bb53414a58d2aa0fd0d8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 17:12:55 +0300 Subject: Polish changes from #1586 --- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/libraries/email.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5b123b929..ff7229243 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -196,7 +196,7 @@ Release Date: Not Released - Added dsn (delivery status notification) option. - Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library `. - Successfully sent emails will automatically clear the parameters. - - Added third parameter $return_path in method Email::from(). + - Added a *return_path* parameter to the ``from()`` method. - :doc:`Pagination Library ` changes include: - Added support for the anchor "rel" attribute. - Added support for setting custom attributes. diff --git a/user_guide_src/source/libraries/email.rst b/user_guide_src/source/libraries/email.rst index fc324ffc9..e7ed9f74c 100644 --- a/user_guide_src/source/libraries/email.rst +++ b/user_guide_src/source/libraries/email.rst @@ -117,12 +117,12 @@ Sets the email address and name of the person sending the email:: $this->email->from('you@example.com', 'Your Name'); -:: +You can also set a Return-Path, to help redirect undelivered mail:: $this->email->from('you@example.com', 'Your Name', 'returned_emails@example.com'); -Third parameter is redirect for undelivered emails (may not be configured with -protocol 'smtp'). +.. note:: Return-Path can't be used if you've configured + 'smtp' as your protocol. $this->email->reply_to() ------------------------- -- cgit v1.2.3-24-g4f1b From 9e31f8f1600c6577f46a855eee6a3c7d527aebea Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 17:31:46 +0300 Subject: Fix #1745 --- user_guide_src/source/changelog.rst | 3 ++- user_guide_src/source/libraries/form_validation.rst | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ff7229243..4c3133e92 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -271,7 +271,7 @@ Bug fixes for 3.0 - Fixed a bug (#129) - ODBC's num_rows() returned -1 in some cases, due to not all subdrivers supporting the odbc_num_rows() function. - Fixed a bug (#153) - E_NOTICE being generated by getimagesize() in the :doc:`File Uploading Library `. - Fixed a bug (#611) - SQLSRV's error handling methods used to issue warnings when there's no actual error. -- Fixed a bug (#1036) - is_write_type() method in the :doc:`Database Library ` didn't return TRUE for RENAME queries. +- Fixed a bug (#1036) - ``is_write_type()`` method in the :doc:`Database Library ` didn't return TRUE for RENAME queries. - Fixed a bug in PDO's _version() method where it used to return the client version as opposed to the server one. - Fixed a bug in PDO's insert_id() method where it could've failed if it's used with Postgre versions prior to 8.1. - Fixed a bug in CUBRID's affected_rows() method where a connection resource was passed to cubrid_affected_rows() instead of a result. @@ -354,6 +354,7 @@ Bug fixes for 3.0 - Fixed a bug (#1789) - :doc:`Database Library ` method ``escape_str()`` escaped quote characters in LIKE conditions twice under MySQL. - Fixed a bug (#395) - :doc:`Unit Testing Library ` method ``result()`` didn't properly check array result columns when called from ``report()``. - Fixed a bug (#1692) - :doc:`Database Library ` method ``display_error()`` didn't properly trace the possible error source on Windows systems. +- Fixed a bug (#1745) - ``is_write_type()`` method in the :doc:`Database Library ` didn't return TRUE for LOAD queries. Version 2.1.2 ============= diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index 29e1be032..bc922e69b 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -489,11 +489,13 @@ the name of the function:: $this->form_validation->set_message('username_check') If you are using an error message that can accept two $s in your error string, -such as .. +such as: +:: $this->form_validation->set_message('min_length', 'The $s field must contain at least $s characters.'); Then you can also use %1$s and %2$s: +:: $this->form_validation->set_message('min_length', 'This field must contain at least %2$s characters.'); -- cgit v1.2.3-24-g4f1b From 73766c239318974b7e8ed02ab441794cab7f523f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 20:32:14 +0300 Subject: [ci skip] Small doc fixes, thanks dchill42 --- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/libraries/pagination.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4c3133e92..5a8036128 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -163,7 +163,7 @@ Release Date: Not Released - Added ``all_flashdata()`` method to session class. Returns an associative array of only flashdata. - Added ``has_userdata()`` method to verify existence of userdata item. - Added ``tempdata()``, ``set_tempdata()``, and ``unset_tempdata()`` methods for manipulating tempdata. - - :doc:`File Uploading Library ` changes include: + - :doc:`File Uploading Library ` changes include: - Added *max_filename_increment* config setting. - Added an "index" parameter to the ``data()`` method. - :doc:`Cart library ` changes include: diff --git a/user_guide_src/source/libraries/pagination.rst b/user_guide_src/source/libraries/pagination.rst index 00554c1c7..d9d3f5092 100644 --- a/user_guide_src/source/libraries/pagination.rst +++ b/user_guide_src/source/libraries/pagination.rst @@ -81,7 +81,7 @@ page number. For example, the number 2 will place two digits on either side, as in the example links at the very top of this page. $config['use_page_numbers'] = TRUE; -================================== +=================================== By default, the URI segment will use the starting index for the items you are paginating. If you prefer to show the the actual page number, -- cgit v1.2.3-24-g4f1b From 92f00046751d44b3e938d6be1fc49017dd0e0040 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 20:43:36 +0300 Subject: [ci skip] More doc fixes --- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/libraries/form_validation.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 5a8036128..1311c7fc0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -204,7 +204,7 @@ Release Date: Not Released - Added $config['reuse_query_string'] to allow automatic repopulation of query string arguments, combined with normal URI segments. - Removed the default `` `` from a number of the configuration variables. - Added the ability to use a proxy with the :doc:`XML-RPC Library `. - - :doc:`Encryption Library ` changes include: + - :doc:`Encryption Library ` changes include: - Added support for hashing algorithms other than SHA1 and MD5. - Removed previously deprecated ``sha1()`` method. diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst index bc922e69b..14305b664 100644 --- a/user_guide_src/source/libraries/form_validation.rst +++ b/user_guide_src/source/libraries/form_validation.rst @@ -873,7 +873,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] **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 ` to be + parameter. Note: This rule requires :doc:`Query Builder <../database/query_builder>` to be enabled in order to work. **max_length** Yes Returns FALSE if the form element is longer then the parameter value. max_length[12] **exact_length** Yes Returns FALSE if the form element is not exactly the parameter value. exact_length[8] -- cgit v1.2.3-24-g4f1b From 6775a79ffdb4501ae8a3d88968d9531607ccab14 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 20:54:12 +0300 Subject: [ci skip] Add Vietnamese characters to foreign_chars.php --- user_guide_src/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1311c7fc0..62992d25b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -39,7 +39,7 @@ Release Date: Not Released - Updated support for zip files in mimes.php. - Updated support for csv files in mimes.php. - Added some more doctypes. - - Added Romanian and Greek characters in foreign_characters.php. + - Added Romanian, Greek and Vietnamese characters in *foreign_characters.php*. - Changed logger to only chmod when file is first created. - Removed previously deprecated SHA1 Library. - Removed previously deprecated use of ``$autoload['core']`` in application/config/autoload.php. -- cgit v1.2.3-24-g4f1b From dbad54e09a39a77c7404dee9ca1a6b34299469d0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Oct 2012 21:53:32 +0300 Subject: Fix issue #1765 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 62992d25b..40ba218a8 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -355,6 +355,7 @@ Bug fixes for 3.0 - Fixed a bug (#395) - :doc:`Unit Testing Library ` method ``result()`` didn't properly check array result columns when called from ``report()``. - Fixed a bug (#1692) - :doc:`Database Library ` method ``display_error()`` didn't properly trace the possible error source on Windows systems. - Fixed a bug (#1745) - ``is_write_type()`` method in the :doc:`Database Library ` didn't return TRUE for LOAD queries. +- Fixed a bug (#1765) - :doc:`Database Library ` didn't properly detect connection errors for MySQLi. Version 2.1.2 ============= -- cgit v1.2.3-24-g4f1b