summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/changelog.rst74
-rw-r--r--user_guide_src/source/conf.py2
-rw-r--r--user_guide_src/source/database/configuration.rst24
-rw-r--r--user_guide_src/source/database/connecting.rst2
-rw-r--r--user_guide_src/source/database/examples.rst8
-rw-r--r--user_guide_src/source/database/index.rst4
-rw-r--r--user_guide_src/source/database/queries.rst2
-rw-r--r--user_guide_src/source/database/query_builder.rst (renamed from user_guide_src/source/database/active_record.rst)36
-rw-r--r--user_guide_src/source/general/models.rst2
-rw-r--r--user_guide_src/source/general/requirements.rst2
-rw-r--r--user_guide_src/source/general/styleguide.rst13
-rw-r--r--user_guide_src/source/helpers/date_helper.rst152
-rw-r--r--user_guide_src/source/helpers/directory_helper.rst2
-rw-r--r--user_guide_src/source/installation/upgrade_300.rst10
-rw-r--r--user_guide_src/source/libraries/email.rst19
-rw-r--r--user_guide_src/source/libraries/form_validation.rst11
-rw-r--r--user_guide_src/source/libraries/javascript.rst4
-rw-r--r--user_guide_src/source/libraries/output.rst9
-rw-r--r--user_guide_src/source/overview/features.rst2
-rw-r--r--user_guide_src/source/tutorial/create_news_items.rst2
-rw-r--r--user_guide_src/source/tutorial/index.rst2
-rw-r--r--user_guide_src/source/tutorial/news_section.rst4
22 files changed, 251 insertions, 135 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 37c38f16a..bdb418f86 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -29,6 +29,7 @@ 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
- Updated support for doc files in mimes.php.
- Added application/xml for xml and application/xml, text/xsl for xsl in mimes.php.
- Changed logger to only chmod when file is first created.
@@ -50,16 +51,22 @@ Release Date: Not Released
- 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.
- Database
- - Added new :doc:`Active Record <database/active_record>` methods that return
+ - Renamed the Active Record class to Query Builder to remove confusion with
+ the Active Record design pattern
+ - Added new :doc:`Query Builder <database/query_builder>` methods that return
+ - Added the ability to insert objects with insert_batch() in :doc:`Query Builder <database/query_builder>`.
+ - Added new :doc:`Query Builder <database/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().
- - Taking care of LIKE condition when used with MySQL UPDATE statement.
- Adding $escape parameter to the order_by function, this enables ordering by custom fields.
- - MySQLi driver now uses mysqli_get_server_info() for server version checking.
- - MySQLi driver now supports persistent connections when running on PHP >= 5.3.
+ - 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
@@ -72,23 +79,39 @@ Release Date: Not Released
- Added _optimize_table() support for the :doc:`Database Utility Class <database/utilities>` (rebuilds table indexes).
- 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 _protect_identifiers() to it instead - it was just an alias.
+ - 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 DSN string support (Easy Connect and TNS) for Oracle.
+ - Added random ordering support for MSSQL, SQLSRV.
+ - Added support for SQLite3 database 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 <database/forge>`.
+ - Added support for listing database schemas to :doc:`Database Utilities <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().
+ - Added SQLite support for drop_table() in :doc:`Database Forge <database/forge>`.
+ - Added ODBC support for create_database(), drop_database() and drop_table() in :doc:`Database Forge <database/forge>`.
+ - Added PDO support for create_database(), drop_database and drop_table() in :doc:`Database Forge <database/forge>`.
+ - Added MSSQL, SQLSRV support for optimize_table() in :doc:`Database Utility <database/utilities>`.
+ - Improved CUBRID support for list_databases() in :doc:`Database Utility <database/utilities>` (until now only the currently used database was returned).
- Libraries
- 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 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:
- 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
- - Image manipulation library changes include:
+ - :doc:`Image Manipulation library <libraries/image_lib>` 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
@@ -97,14 +120,18 @@ Release Date: Not Released
- Minor speed optimizations and method & property visibility declarations in the Calendar Library.
- Removed SHA1 function in the :doc:`Encryption Library <libraries/encryption>`.
- Added $config['csrf_regeneration'] to the CSRF protection in the :doc:`Security library <libraries/security>`, which makes token regeneration optional.
+ - :doc:`Form Validation library <libraries/form_validation>` 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.
+ - Added method reset_validation(), which resets internal validation variables in case of multiple validation routines.
+ - Added support for setting error delimiters in the config file via $config['error_prefix'] and $config['error_suffix'].
+ - _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.
+ - Changed the :doc:`Session Library <libraries/sessions>` 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.
- - Form Validation library now allows setting of error delimiters in the config file via $config['error_prefix'] and $config['error_suffix'].
- - Added function error_array() to return all error messages as an array in the Form_validation class.
- - Added function set_data() to Form_validation library, which can be used in place of the default $_POST array.
- - Added function reset_validation() to form validation library, which resets internal validation variables in case of multiple validation routines.
- - Changed the Session library to select only one row when using database sessions.
- - Added a Wincache driver to the `Caching Library <libraries/caching>`.
+ - Added a Wincache driver to the :doc:`Caching Library <libraries/caching>`.
- Added dsn (delivery status notification) option to the :doc:`Email Library <libraries/email>`.
- Core
@@ -117,7 +144,8 @@ Release Date: Not Released
- Added method() to CI_Input to retrieve $_SERVER['REQUEST_METHOD'].
- Modified valid_ip() to use PHP's filter_var() in the :doc:`Input Library <libraries/input>`.
- 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 <general/hooks.html>`.
+ - Renamed method _call_hook() to call_hook() in the :doc:`Hooks Library <general/hooks>`.
+ - Added get_content_type() method to the :doc:`Output Library <libraries/output>`.
Bug fixes for 3.0
------------------
@@ -170,6 +198,22 @@ Bug fixes for 3.0
- 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 <libraries/form_validation>`.
- 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 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 <database/forge>` didn't utilize the configured database character set.
+- Fixed a bug (#23, #1238) - delete_all() in the `Database Caching Library <database/caching>` used to delete .htaccess and index.html files, which is a potential security risk.
+- Fixed a bug in :doc:`Trackback Library <libraries/trackback>` 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 (#1242) - read_dir() in the :doc:`Zip Library <libraries/zip>` 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.
+- Fixed a bug in PDO's trans_commit() method where it failed due to an erroneous property name.
+- Fixed a bug (#798) - update() used to ignore LIKE conditions that were set with like().
+- Fixed a bug in Oracle's and MSSQL's delete() methods where an erroneous SQL statement was generated when used with limit().
+- 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 <libraries/language>` did not correctly keep track of loaded language files.
Version 2.1.1
=============
diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py
index 593ceaf1c..e972a388b 100644
--- a/user_guide_src/source/conf.py
+++ b/user_guide_src/source/conf.py
@@ -121,7 +121,7 @@ html_theme_path = ["./_themes"]
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+#html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst
index 040e7e33f..7a19c840f 100644
--- a/user_guide_src/source/database/configuration.rst
+++ b/user_guide_src/source/database/configuration.rst
@@ -106,18 +106,18 @@ 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.
-Active Record
+Query Builder
-------------
-The :doc:`Active Record Class <active_record>` is globally enabled or
-disabled by setting the $active_record variable in the database
+The :doc:`Query Builder Class <query_builder>` is globally enabled or
+disabled by setting the $query_builder variable in the database
configuration file to TRUE/FALSE (boolean). If you are not using the
-active record class, setting it to FALSE will utilize fewer resources
+query builder class, setting it to FALSE will utilize fewer resources
when the database classes are initialized.
::
- $active_record = TRUE;
+ $query_builder = TRUE;
.. note:: that some CodeIgniter classes such as Sessions require Active
Records be enabled to access certain functionality.
@@ -132,9 +132,9 @@ Explanation of Values:
**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, postgres, odbc, etc. Must be specified in lower case.
+**dbdriver** The database type. ie: mysql, postgre, odbc, etc. Must be specified in lower case.
**dbprefix** An optional table prefix which will added to the table name when running :doc:
- `Active Record <active_record>` queries. This permits multiple CodeIgniter installations
+ `Query Builder <query_builder>` queries. This permits multiple CodeIgniter installations
to share one database.
**pconnect** TRUE/FALSE (boolean) - Whether to use a persistent connection.
**db_debug** TRUE/FALSE (boolean) - Whether database errors should be displayed.
@@ -166,8 +166,8 @@ Explanation of Values:
$db['default']['port'] = 5432;
====================== ==================================================================================================
-.. note:: Depending on what database platform you are using (MySQL,
- Postgres, 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.
+.. 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.
diff --git a/user_guide_src/source/database/connecting.rst b/user_guide_src/source/database/connecting.rst
index fb4524116..5822ca62c 100644
--- a/user_guide_src/source/database/connecting.rst
+++ b/user_guide_src/source/database/connecting.rst
@@ -36,7 +36,7 @@ Available Parameters
string.
#. TRUE/FALSE (boolean). Whether to return the connection ID (see
Connecting to Multiple Databases below).
-#. TRUE/FALSE (boolean). Whether to enable the Active Record class. Set
+#. TRUE/FALSE (boolean). Whether to enable the Query Builder class. Set
to TRUE by default.
Manually Connecting to a Database
diff --git a/user_guide_src/source/database/examples.rst b/user_guide_src/source/database/examples.rst
index d1cd48837..8b3cc4701 100644
--- a/user_guide_src/source/database/examples.rst
+++ b/user_guide_src/source/database/examples.rst
@@ -104,10 +104,10 @@ Standard Insert
$this->db->query($sql);
echo $this->db->affected_rows();
-Active Record Query
+Query Builder Query
===================
-The :doc:`Active Record Pattern <active_record>` gives you a simplified
+The :doc:`Query Builder Pattern <query_builder>` gives you a simplified
means of retrieving data::
$query = $this->db->get('table_name');
@@ -118,10 +118,10 @@ means of retrieving data::
}
The above get() function retrieves all the results from the supplied
-table. The :doc:`Active Record <active_record>` class contains a full
+table. The :doc:`Query Builder <query_builder>` class contains a full
compliment of functions for working with data.
-Active Record Insert
+Query Builder Insert
====================
::
diff --git a/user_guide_src/source/database/index.rst b/user_guide_src/source/database/index.rst
index ab12b7cb7..7ccb8fb00 100644
--- a/user_guide_src/source/database/index.rst
+++ b/user_guide_src/source/database/index.rst
@@ -3,7 +3,7 @@ The Database Class
##################
CodeIgniter comes with a full-featured and very fast abstracted database
-class that supports both traditional structures and Active Record
+class that supports both traditional structures and Query Builder
patterns. The database functions offer clear, simple syntax.
.. toctree::
@@ -15,7 +15,7 @@ patterns. The database functions offer clear, simple syntax.
Running Queries <queries>
Generating Query Results <results>
Query Helper Functions <helpers>
- Active Record Class <active_record>
+ Query Builder Class <query_builder>
Transactions <transactions>
Table MetaData <table_data>
Field MetaData <fields>
diff --git a/user_guide_src/source/database/queries.rst b/user_guide_src/source/database/queries.rst
index 15a73614a..d23efecb3 100644
--- a/user_guide_src/source/database/queries.rst
+++ b/user_guide_src/source/database/queries.rst
@@ -50,7 +50,7 @@ Protecting identifiers
**********************
In many databases it is advisable to protect table and field names - for
-example with backticks in MySQL. **Active Record queries are
+example with backticks in MySQL. **Query Builder queries are
automatically protected**, however if you need to manually protect an
identifier you can use::
diff --git a/user_guide_src/source/database/active_record.rst b/user_guide_src/source/database/query_builder.rst
index e328c11e2..54e8df6b5 100644
--- a/user_guide_src/source/database/active_record.rst
+++ b/user_guide_src/source/database/query_builder.rst
@@ -1,15 +1,15 @@
###################
-Active Record Class
+Query Builder Class
###################
-CodeIgniter uses a modified version of the Active Record Database
-Pattern. This pattern allows information to be retrieved, inserted, and
-updated in your database with minimal scripting. In some cases only one
-or two lines of code are necessary to perform a database action.
+CodeIgniter gives you access to a Query Builder class. This pattern
+allows information to be retrieved, inserted, and updated in your
+database with minimal scripting. In some cases only one or two lines
+of code are necessary to perform a database action.
CodeIgniter does not require that each database table be its own class
file. It instead provides a more simplified interface.
-Beyond simplicity, a major benefit to using the Active Record features
+Beyond simplicity, a major benefit to using the Query Builder features
is that it allows you to create database independent applications, since
the query syntax is generated by each database adapter. It also allows
for safer queries, since the values are escaped automatically by the
@@ -67,8 +67,8 @@ Example::
// Produces string: SELECT * FROM mytable
-The second parameter enables you to set whether or not the active record query
-will be reset (by default it will be just like `$this->db->get()`)::
+The second parameter enables you to set whether or not the query builder query
+will be reset (by default it will be&mdash;just like `$this->db->get()`)::
echo $this->db->limit(10,20)->get_compiled_select('mytable', FALSE);
// Produces string: SELECT * FROM mytable LIMIT 20, 10
@@ -512,7 +512,7 @@ $this->db->count_all_results()
==============================
Permits you to determine the number of rows in a particular Active
-Record query. Queries will accept Active Record restrictors such as
+Record query. Queries will accept Query Builder restrictors such as
where(), or_where(), like(), or_like(), etc. Example::
echo $this->db->count_all_results('my_table'); // Produces an integer, like 25
@@ -636,7 +636,7 @@ Example::
// Produces string: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')
-The second parameter enables you to set whether or not the active record query
+The second parameter enables you to set whether or not the query builder query
will be reset (by default it will be--just like `$this->db->insert()`_)::
echo $this->db->set('title', 'My Title')->get_compiled_insert('mytable', FALSE);
@@ -928,12 +928,12 @@ multiple functions. Consider this example::
.. _ar-caching:
*********************
-Active Record Caching
+Query Builder Caching
*********************
-While not "true" caching, Active Record enables you to save (or "cache")
+While not "true" caching, Query Builder enables you to save (or "cache")
certain parts of your queries for reuse at a later point in your
-script's execution. Normally, when an Active Record call is completed,
+script's execution. Normally, when an Query Builder call is completed,
all stored information is reset for the next call. With caching, you can
prevent this reset, and reuse information easily.
@@ -944,7 +944,7 @@ There are three Caching functions available:
$this->db->start_cache()
========================
-This function must be called to begin caching. All Active Record queries
+This function must be called to begin caching. All Query Builder queries
of the correct type (see below for supported queries) are stored for
later use.
@@ -956,7 +956,7 @@ This function can be called to stop caching.
$this->db->flush_cache()
========================
-This function deletes all items from the Active Record cache.
+This function deletes all items from the Query Builder cache.
Here's a usage example::
@@ -983,12 +983,12 @@ Here's a usage example::
$this->db->reset_query()
========================
-Resetting Active Record allows you to start fresh with your query without
+Resetting Query Builder allows you to start fresh with your query without
executing it first using a method like $this->db->get() or $this->db->insert().
Just like the methods that execute a query, this will *not* reset items you've
-cached using `Active Record Caching`_.
+cached using `Query Builder Caching`_.
-This is useful in situations where you are using Active Record to generate SQL
+This is useful in situations where you are using Query Builder to generate SQL
(ex. ``$this->db->get_compiled_select()``) but then choose to, for instance,
run the query::
diff --git a/user_guide_src/source/general/models.rst b/user_guide_src/source/general/models.rst
index b816f958a..0156b0460 100644
--- a/user_guide_src/source/general/models.rst
+++ b/user_guide_src/source/general/models.rst
@@ -55,7 +55,7 @@ model class might look like::
}
.. note:: The functions in the above example use the :doc:`Active
- Record <../database/active_record>` database functions.
+ Record <../database/query_builder>` database functions.
.. note:: For the sake of simplicity in this example we're using $_POST
directly. This is generally bad practice, and a more common approach
diff --git a/user_guide_src/source/general/requirements.rst b/user_guide_src/source/general/requirements.rst
index 05e87961a..d97b7b4b2 100644
--- a/user_guide_src/source/general/requirements.rst
+++ b/user_guide_src/source/general/requirements.rst
@@ -5,4 +5,4 @@ Server Requirements
- `PHP <http://www.php.net/>`_ 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, CUBRID, Interbase, ODBC and PDO.
+ PostgreSQL, SQLite, SQLite3, CUBRID, Interbase, ODBC and PDO.
diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst
index 2b91d1cc0..925954c03 100644
--- a/user_guide_src/source/general/styleguide.rst
+++ b/user_guide_src/source/general/styleguide.rst
@@ -149,7 +149,7 @@ months down the line. There is not a required format for comments, but
the following are recommended.
`DocBlock <http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblock>`_
-style comments preceding class and method declarations so they can be
+style comments preceding class, method, and property declarations so they can be
picked up by IDEs::
/**
@@ -172,6 +172,17 @@ picked up by IDEs::
* @return string
*/
function xml_encode($str)
+
+::
+
+ /**
+ * Data for class manipulation
+ *
+ * @var array
+ */
+ public $data
+
+
Use single line comments within code, leaving a blank line between large
comment blocks and code.
diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst
index b21d147bd..18216c5a2 100644
--- a/user_guide_src/source/helpers/date_helper.rst
+++ b/user_guide_src/source/helpers/date_helper.rst
@@ -330,36 +330,46 @@ Generates a pull-down menu of timezones, like this one:
<form action="#">
<select name="timezones">
- <option value='UM12'>(UTC - 12:00) Enitwetok, Kwajalien</option>
- <option value='UM11'>(UTC - 11:00) Nome, Midway Island, Samoa</option>
- <option value='UM10'>(UTC - 10:00) Hawaii</option>
- <option value='UM9'>(UTC - 9:00) Alaska</option>
- <option value='UM8'>(UTC - 8:00) Pacific Time</option>
- <option value='UM7'>(UTC - 7:00) Mountain Time</option>
- <option value='UM6'>(UTC - 6:00) Central Time, Mexico City</option>
- <option value='UM5'>(UTC - 5:00) Eastern Time, Bogota, Lima, Quito</option>
- <option value='UM4'>(UTC - 4:00) Atlantic Time, Caracas, La Paz</option>
- <option value='UM25'>(UTC - 3:30) Newfoundland</option>
- <option value='UM3'>(UTC - 3:00) Brazil, Buenos Aires, Georgetown, Falkland Is.</option>
- <option value='UM2'>(UTC - 2:00) Mid-Atlantic, Ascention Is., St Helena</option>
- <option value='UM1'>(UTC - 1:00) Azores, Cape Verde Islands</option>
- <option value='UTC' selected='selected'>(UTC) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia</option>
- <option value='UP1'>(UTC + 1:00) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome</option>
- <option value='UP2'>(UTC + 2:00) Kaliningrad, South Africa, Warsaw</option>
- <option value='UP3'>(UTC + 3:00) Baghdad, Riyadh, Moscow, Nairobi</option>
- <option value='UP25'>(UTC + 3:30) Tehran</option>
- <option value='UP4'>(UTC + 4:00) Adu Dhabi, Baku, Muscat, Tbilisi</option>
- <option value='UP35'>(UTC + 4:30) Kabul</option>
- <option value='UP5'>(UTC + 5:00) Islamabad, Karachi, Tashkent</option>
- <option value='UP45'>(UTC + 5:30) Bombay, Calcutta, Madras, New Delhi</option>
- <option value='UP6'>(UTC + 6:00) Almaty, Colomba, Dhaka</option>
- <option value='UP7'>(UTC + 7:00) Bangkok, Hanoi, Jakarta</option>
- <option value='UP8'>(UTC + 8:00) Beijing, Hong Kong, Perth, Singapore, Taipei</option>
- <option value='UP9'>(UTC + 9:00) Osaka, Sapporo, Seoul, Tokyo, Yakutsk</option>
- <option value='UP85'>(UTC + 9:30) Adelaide, Darwin</option>
- <option value='UP10'>(UTC + 10:00) Melbourne, Papua New Guinea, Sydney, Vladivostok</option>
- <option value='UP11'>(UTC + 11:00) Magadan, New Caledonia, Solomon Islands</option>
- <option value='UP12'>(UTC + 12:00) Auckland, Wellington, Fiji, Marshall Island</option>
+ <option value='UM12'>(UTC -12:00) Baker/Howland Island</option>
+ <option value='UM11'>(UTC -11:00) Samoa Time Zone, Niue</option>
+ <option value='UM10'>(UTC -10:00) Hawaii-Aleutian Standard Time, Cook Islands, Tahiti</option>
+ <option value='UM95'>(UTC -9:30) Marquesas Islands</option>
+ <option value='UM9'>(UTC -9:00) Alaska Standard Time, Gambier Islands</option>
+ <option value='UM8'>(UTC -8:00) Pacific Standard Time, Clipperton Island</option>
+ <option value='UM7'>(UTC -7:00) Mountain Standard Time</option>
+ <option value='UM6'>(UTC -6:00) Central Standard Time</option>
+ <option value='UM5'>(UTC -5:00) Eastern Standard Time, Western Caribbean Standard Time</option>
+ <option value='UM45'>(UTC -4:30) Venezuelan Standard Time</option>
+ <option value='UM4'>(UTC -4:00) Atlantic Standard Time, Eastern Caribbean Standard Time</option>
+ <option value='UM35'>(UTC -3:30) Newfoundland Standard Time</option>
+ <option value='UM3'>(UTC -3:00) Argentina, Brazil, French Guiana, Uruguay</option>
+ <option value='UM2'>(UTC -2:00) South Georgia/South Sandwich Islands</option>
+ <option value='UM1'>(UTC -1:00) Azores, Cape Verde Islands</option>
+ <option value='UTC' selected='selected'>(UTC) Greenwich Mean Time, Western European Time</option>
+ <option value='UP1'>(UTC +1:00) Central European Time, West Africa Time</option>
+ <option value='UP2'>(UTC +2:00) Central Africa Time, Eastern European Time, Kaliningrad Time</option>
+ <option value='UP3'>(UTC +3:00) Moscow Time, East Africa Time</option>
+ <option value='UP35'>(UTC +3:30) Iran Standard Time</option>
+ <option value='UP4'>(UTC +4:00) Azerbaijan Standard Time, Samara Time</option>
+ <option value='UP45'>(UTC +4:30) Afghanistan</option>
+ <option value='UP5'>(UTC +5:00) Pakistan Standard Time, Yekaterinburg Time</option>
+ <option value='UP55'>(UTC +5:30) Indian Standard Time, Sri Lanka Time</option>
+ <option value='UP575'>(UTC +5:45) Nepal Time</option>
+ <option value='UP6'>(UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time</option>
+ <option value='UP65'>(UTC +6:30) Cocos Islands, Myanmar</option>
+ <option value='UP7'>(UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam</option>
+ <option value='UP8'>(UTC +8:00) Australian Western Standard Time, Beijing Time, Irkutsk Time</option>
+ <option value='UP875'>(UTC +8:45) Australian Central Western Standard Time</option>
+ <option value='UP9'>(UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk Time</option>
+ <option value='UP95'>(UTC +9:30) Australian Central Standard Time</option>
+ <option value='UP10'>(UTC +10:00) Australian Eastern Standard Time, Vladivostok Time</option>
+ <option value='UP105'>(UTC +10:30) Lord Howe Island</option>
+ <option value='UP11'>(UTC +11:00) Magadan Time, Solomon Islands, Vanuatu</option>
+ <option value='UP115'>(UTC +11:30) Norfolk Island</option>
+ <option value='UP12'>(UTC +12:00) Fiji, Gilbert Islands, Kamchatka Time, New Zealand Standard Time</option>
+ <option value='UP1275'>(UTC +12:45) Chatham Islands Standard Time</option>
+ <option value='UP13'>(UTC +13:00) Phoenix Islands Time, Tonga</option>
+ <option value='UP14'>(UTC +14:00) Line Islands</option>
</select>
</form>
@@ -396,66 +406,88 @@ Timezone Reference
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) Enitwetok, Kwajalien |
+| 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 |
+------------+----------------------------------------------------------------+
-| UM11 | (UTC - 11:00) Nome, Midway Island, Samoa |
+| UM35 | (UTC - 03:30) Newfoundland Standard Time |
+------------+----------------------------------------------------------------+
-| UM10 | (UTC - 10:00) Hawaii |
+| UM3 | (UTC - 03:00) Argentina, Brazil, French Guiana, Uruguay |
+------------+----------------------------------------------------------------+
-| UM9 | (UTC - 9:00) Alaska |
+| UM2 | (UTC - 02:00) South Georgia/South Sandwich Islands |
+------------+----------------------------------------------------------------+
-| UM8 | (UTC - 8:00) Pacific Time |
+| UM1 | (UTC -1:00) Azores, Cape Verde Islands |
+------------+----------------------------------------------------------------+
-| UM7 | (UTC - 7:00) Mountain Time |
+| UTC | (UTC) Greenwich Mean Time, Western European Time |
+------------+----------------------------------------------------------------+
-| UM6 | (UTC - 6:00) Central Time, Mexico City |
+| UP1 | (UTC +1:00) Central European Time, West Africa Time |
+------------+----------------------------------------------------------------+
-| UM5 | (UTC - 5:00) Eastern Time, Bogota, Lima, Quito |
+| UP2 | (UTC +2:00) Central Africa Time, Eastern European Time |
+------------+----------------------------------------------------------------+
-| UM4 | (UTC - 4:00) Atlantic Time, Caracas, La Paz |
+| UP3 | (UTC +3:00) Moscow Time, East Africa Time |
+------------+----------------------------------------------------------------+
-| UM25 | (UTC - 3:30) Newfoundland |
+| UP35 | (UTC +3:30) Iran Standard Time |
+------------+----------------------------------------------------------------+
-| UM3 | (UTC - 3:00) Brazil, Buenos Aires, Georgetown, Falkland Is. |
+| UP4 | (UTC +4:00) Azerbaijan Standard Time, Samara Time |
+------------+----------------------------------------------------------------+
-| UM2 | (UTC - 2:00) Mid-Atlantic, Ascention Is., St Helena |
+| UP45 | (UTC +4:30) Afghanistan |
+------------+----------------------------------------------------------------+
-| UM1 | (UTC - 1:00) Azores, Cape Verde Islands |
+| UP5 | (UTC +5:00) Pakistan Standard Time, Yekaterinburg Time |
+------------+----------------------------------------------------------------+
-| UTC | (UTC) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia |
+| UP55 | (UTC +5:30) Indian Standard Time, Sri Lanka Time |
+------------+----------------------------------------------------------------+
-| UP1 | (UTC + 1:00) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome |
+| UP575 | (UTC +5:45) Nepal Time |
+------------+----------------------------------------------------------------+
-| UP2 | (UTC + 2:00) Kaliningrad, South Africa, Warsaw |
+| UP6 | (UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time |
+------------+----------------------------------------------------------------+
-| UP3 | (UTC + 3:00) Baghdad, Riyadh, Moscow, Nairobi |
+| UP65 | (UTC +6:30) Cocos Islands, Myanmar |
+------------+----------------------------------------------------------------+
-| UP25 | (UTC + 3:30) Tehran |
+| UP7 | (UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam|
+------------+----------------------------------------------------------------+
-| UP4 | (UTC + 4:00) Adu Dhabi, Baku, Muscat, Tbilisi |
+| UP8 | (UTC +8:00) Australian Western Standard Time, Beijing Time |
+------------+----------------------------------------------------------------+
-| UP35 | (UTC + 4:30) Kabul |
+| UP875 | (UTC +8:45) Australian Central Western Standard Time |
+------------+----------------------------------------------------------------+
-| UP5 | (UTC + 5:00) Islamabad, Karachi, Tashkent |
+| UP9 | (UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk |
+------------+----------------------------------------------------------------+
-| UP45 | (UTC + 5:30) Bombay, Calcutta, Madras, New Delhi |
+| UP95 | (UTC +9:30) Australian Central Standard Time |
+------------+----------------------------------------------------------------+
-| UP6 | (UTC + 6:00) Almaty, Colomba, Dhaka |
+| UP10 | (UTC +10:00) Australian Eastern Standard Time, Vladivostok Time|
+------------+----------------------------------------------------------------+
-| UP7 | (UTC + 7:00) Bangkok, Hanoi, Jakarta |
+| UP105 | (UTC +10:30) Lord Howe Island |
+------------+----------------------------------------------------------------+
-| UP8 | (UTC + 8:00) Beijing, Hong Kong, Perth, Singapore, Taipei |
+| UP11 | (UTC +11:00) Magadan Time, Solomon Islands, Vanuatu |
+------------+----------------------------------------------------------------+
-| UP9 | (UTC + 9:00) Osaka, Sapporo, Seoul, Tokyo, Yakutsk |
+| UP115 | (UTC +11:30) Norfolk Island |
+------------+----------------------------------------------------------------+
-| UP85 | (UTC + 9:30) Adelaide, Darwin |
+| UP12 | (UTC +12:00) Fiji, Gilbert Islands, Kamchatka, New Zealand |
+------------+----------------------------------------------------------------+
-| UP10 | (UTC + 10:00) Melbourne, Papua New Guinea, Sydney, Vladivostok |
+| UP1275 | (UTC +12:45) Chatham Islands Standard Time |
+------------+----------------------------------------------------------------+
-| UP11 | (UTC + 11:00) Magadan, New Caledonia, Solomon Islands |
+| UP13 | (UTC +13:00) Phoenix Islands Time, Tonga |
+------------+----------------------------------------------------------------+
-| UP12 | (UTC + 12:00) Auckland, Wellington, Fiji, Marshall Island |
+| UP14 | (UTC +14:00) Line Islands |
+------------+----------------------------------------------------------------+
diff --git a/user_guide_src/source/helpers/directory_helper.rst b/user_guide_src/source/helpers/directory_helper.rst
index fd169886c..cf88732d3 100644
--- a/user_guide_src/source/helpers/directory_helper.rst
+++ b/user_guide_src/source/helpers/directory_helper.rst
@@ -59,7 +59,7 @@ be numerically indexed. Here is an example of a typical array::
[1] => config.html        
[database] => Array
(              
- [0] => active_record.html              
+ [0] => query_builder.html              
[1] => binds.html              
[2] => configuration.html
[3] => connecting.html              
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index 4c594ab17..e434e8d45 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -31,3 +31,13 @@ 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: 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`.
+
+ $active_group = 'default';
+ // $active_record = TRUE;
+ $query_builder = TRUE; \ 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 d7e40f5c4..daf000907 100644
--- a/user_guide_src/source/libraries/email.rst
+++ b/user_guide_src/source/libraries/email.rst
@@ -229,11 +229,20 @@ use the function multiple times. For example::
$this->email->attach('/path/to/photo2.jpg');
$this->email->attach('/path/to/photo3.jpg');
-If you'd like to change the disposition or add a custom file name, you can use the second and third paramaters. To use the default disposition (attachment), leave the second parameter blank. Here's an example::
-
- $this->email->attach('/path/to/photo1.jpg', 'inline');
- $this->email->attach('/path/to/photo1.jpg', '', 'birthday.jpg');
-
+To use the default disposition (attachment), leave the second parameter blank,
+otherwise use a custom disposition::
+
+ $this->email->attach('image.jpg', 'inline');
+
+If you'd like to use a custom file name, you can use the third paramater::
+
+ $this->email->attach('filename.pdf', 'attachment', 'report.pdf');
+
+If you need to use a buffer string instead of a real - physical - file you can
+use the first parameter as buffer, the third parameter as file name and the fourth
+parameter as mime-type::
+
+ $this->email->attach($buffer, 'attachment', 'report.pdf', 'application/pdf');
$this->email->print_debugger()
-------------------------------
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index 3e8855f60..028b61c4c 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -321,7 +321,7 @@ password to MD5, and running the username through the "xss_clean"
function, which removes malicious data.
**Any native PHP function that accepts one parameter can be used as a
-rule, like htmlspecialchars, trim, MD5, etc.**
+rule, like htmlspecialchars, trim, md5, etc.**
.. note:: You will generally want to use the prepping functions
**after** the validation rules so if there is an error, the original
@@ -608,7 +608,7 @@ call the reset_validation() function before setting up rules and validating the
For more info please see the :ref:`function-reference` section below.
--.. _saving-groups:
+.. _saving-groups:
************************************************
Saving Sets of Validation Rules to a Config File
@@ -892,8 +892,9 @@ Rule Parameter Description
$this->form_validation->required($string);
-.. note:: You can also use any native PHP functions that permit one
- parameter.
+.. note:: You can also use any native PHP functions that permit up
+ to two parameters, where at least one is required (to pass
+ the field data).
******************
Prepping Reference
@@ -976,7 +977,7 @@ $this->form_validation->set_data();
$_POST array.
$this->form_validation->reset_validation();
-========================================
+===========================================
.. php:method:: reset_validation ()
diff --git a/user_guide_src/source/libraries/javascript.rst b/user_guide_src/source/libraries/javascript.rst
index 5e80fb998..d5e09c314 100644
--- a/user_guide_src/source/libraries/javascript.rst
+++ b/user_guide_src/source/libraries/javascript.rst
@@ -86,14 +86,14 @@ The jQuery Class
To initialize the jQuery class manually in your controller constructor,
use the $this->load->library function::
- $this->load->library('jquery');
+ $this->load->library('javascript/jquery');
You may send an optional parameter to determine whether or not a script
tag for the main jQuery file will be automatically included when loading
the library. It will be created by default. To prevent this, load the
library as follows::
- $this->load->library('jquery', FALSE);
+ $this->load->library('javascript/jquery', FALSE);
Once loaded, the jQuery library object will be available using:
$this->jquery
diff --git a/user_guide_src/source/libraries/output.rst b/user_guide_src/source/libraries/output.rst
index 2cf7c0854..baceaae7b 100644
--- a/user_guide_src/source/libraries/output.rst
+++ b/user_guide_src/source/libraries/output.rst
@@ -49,6 +49,15 @@ 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.
+$this->output->get_content_type();
+==========================================
+
+Returns the Content-Type HTTP header that's currently in use.
+
+ $mime = $this->output->get_content_type();
+
+.. note:: If not set, the default return value is 'text/html'.
+
$this->output->get_output();
=============================
diff --git a/user_guide_src/source/overview/features.rst b/user_guide_src/source/overview/features.rst
index 44db08a94..8c27b1436 100644
--- a/user_guide_src/source/overview/features.rst
+++ b/user_guide_src/source/overview/features.rst
@@ -15,7 +15,7 @@ CodeIgniter's main features.
- Model-View-Controller Based System
- Extremely Light Weight
- Full Featured database classes with support for several platforms.
-- Active Record Database Support
+- Query Builder Database Support
- Form and Data Validation
- Security and XSS Filtering
- Session Management
diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst
index 794b67eed..bfaf13537 100644
--- a/user_guide_src/source/tutorial/create_news_items.rst
+++ b/user_guide_src/source/tutorial/create_news_items.rst
@@ -94,7 +94,7 @@ Model
-----
The only thing that remains is writing a method that writes the data to
-the database. You'll use the Active Record class to insert the
+the database. You'll use the Query Builder class to insert the
information and use the input library to get the posted data. Open up
the model created earlier and add the following:
diff --git a/user_guide_src/source/tutorial/index.rst b/user_guide_src/source/tutorial/index.rst
index c959d04d2..b1ab331d1 100644
--- a/user_guide_src/source/tutorial/index.rst
+++ b/user_guide_src/source/tutorial/index.rst
@@ -16,7 +16,7 @@ This tutorial will primarily focus on:
- Model-View-Controller basics
- Routing basics
- Form validation
-- Performing basic database queries using "Active Record"
+- Performing basic database queries using "Query Builder"
The entire tutorial is split up over several pages, each explaining a
small part of the functionality of the CodeIgniter framework. You'll go
diff --git a/user_guide_src/source/tutorial/news_section.rst b/user_guide_src/source/tutorial/news_section.rst
index 38e4214ca..82b3e3b38 100644
--- a/user_guide_src/source/tutorial/news_section.rst
+++ b/user_guide_src/source/tutorial/news_section.rst
@@ -54,7 +54,7 @@ seed records.
Now that the database and a model have been set up, you'll need a method
to get all of our posts from our database. To do this, the database
abstraction layer that is included with CodeIgniter — `Active
-Record <../database/active_record.html>`_ — is used. This makes it
+Record <../database/query_builder.html>`_ — is used. This makes it
possible to write your 'queries' once and make them work on `all
supported database systems <../general/requirements.html>`_. Add the
following code to your model.
@@ -76,7 +76,7 @@ following code to your model.
With this code you can perform two different queries. You can get all
news records, or get a news item by its `slug <#>`_. You might have
noticed that the $slug variable wasn't sanitized before running the
-query; Active Record does this for you.
+query; Query Builder does this for you.
Display the news
----------------