diff options
Diffstat (limited to 'user_guide')
-rw-r--r-- | user_guide/changelog.html | 59 | ||||
-rw-r--r-- | user_guide/database/active_record.html | 50 | ||||
-rw-r--r-- | user_guide/database/results.html | 4 | ||||
-rw-r--r-- | user_guide/database/utilities.html | 7 | ||||
-rw-r--r-- | user_guide/general/cli.html | 6 | ||||
-rw-r--r-- | user_guide/general/common_functions.html | 2 | ||||
-rw-r--r-- | user_guide/general/profiling.html | 5 | ||||
-rw-r--r-- | user_guide/general/requirements.html | 2 | ||||
-rw-r--r-- | user_guide/helpers/form_helper.html | 12 | ||||
-rw-r--r-- | user_guide/helpers/string_helper.html | 8 | ||||
-rw-r--r-- | user_guide/helpers/url_helper.html | 2 | ||||
-rw-r--r-- | user_guide/installation/downloads.html | 12 | ||||
-rw-r--r-- | user_guide/installation/index.html | 6 | ||||
-rw-r--r-- | user_guide/installation/upgrade_201.html | 4 | ||||
-rw-r--r-- | user_guide/installation/upgrade_210.html | 91 | ||||
-rw-r--r-- | user_guide/installation/upgrading.html | 1 | ||||
-rw-r--r-- | user_guide/libraries/loader.html | 4 | ||||
-rw-r--r-- | user_guide/libraries/output.html | 14 | ||||
-rw-r--r-- | user_guide/libraries/pagination.html | 6 | ||||
-rw-r--r-- | user_guide/libraries/security.html | 3 | ||||
-rw-r--r-- | user_guide/libraries/user_agent.html | 4 |
21 files changed, 235 insertions, 67 deletions
diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 9d8fd2b54..7ff2af2f5 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -65,46 +65,73 @@ Change Log <ul> <li>General Changes <ul> - <li class="reactor">Callback validation rules can now accept parameters like any other validation rule.</li> - <li class="reactor">Ability to log certain error types, not all under a threshold.</li> + <li>Added Android to the list of user agents.</li> + <li>Added Windows 7 to the list of user platforms.</li> + <li>Callback validation rules can now accept parameters like any other validation rule.</li> + <li>Ability to log certain error types, not all under a threshold.</li> + <li>Added html_escape() to <a href="general/common_functions.html">Common functions</a> to escape HTML output for preventing XSS.</li> + <li>Added support for pem,p10,p12,p7a,p7c,p7m,p7r,p7s,crt,crl,der,kdb,rsa,cer,sst,csr Certs to mimes.php.</li> + <li>Added support pgp,gpg to mimes.php.</li> + <li>Added support 3gp, 3g2, mp4, wmv, f4v, vlc Video files to mimes.php.</li> + <li>Added support m4a, aac, m4u, xspf, au, ac3, flac, ogg Audio files to mimes.php.</li> </ul> </li> <li>Helpers <ul> - <li class="reactor">Added <samp>increment_string()</samp> to <a href="helpers/string_helper.html">String Helper</a> to turn "foo" into "foo-1" or "foo-1" into "foo-2".</li> - <li>Altered form helper - made action on form_open_multipart helper function call optional. Fixes (#65)</li> + <li>Added <samp>increment_string()</samp> to <a href="helpers/string_helper.html">String Helper</a> to turn "foo" into "foo-1" or "foo-1" into "foo-2".</li> + <li>Altered form helper - made action on form_open_multipart helper function call optional. Fixes (#65)</li> + <li><samp>url_title()</samp> will now trim extra dashes from beginning and end.</li> + <li>Improved speed of <a href="helpers/string_helper.html">String Helper</a>'s <b>random_string()</b> method</li> </ul> </li> <li>Database <ul> - <li class="reactor">Added a <a href="http://www.cubrid.org/" target="_blank">CUBRID</a> driver to the <a href="libraries/database.html">Database Driver</a>. Thanks to the CUBRID team for supplying this patch.</li> - <li class="reactor">Typecast limit and offset in the <a href="database/queries.html">Database Driver</a> to integers to avoid possible injection.</li> - <li class="reactor"> + <li>Added a <a href="http://www.cubrid.org/" target="_blank">CUBRID</a> driver to the <a href="database/index.html">Database Driver</a>. Thanks to the CUBRID team for supplying this patch.</li> + <li>Typecast limit and offset in the <a href="database/queries.html">Database Driver</a> to integers to avoid possible injection.</li> + <li> Added additional option 'none' for the optional third argument for <kbd>$this->db->like()</kbd> in the <a href="database/active_record.html">Database Driver</a>. </li> + <li>Added <kbd>$this->db->insert_batch()</kbd> support to the OCI8 (Oracle) driver.</li> </ul> </li> <li>Libraries <ul> - <li class="reactor">Changed <kbd>$this->cart->insert()</kbd> in the <a href="libraries/cart.html">Cart Library</a> to return the Row ID if a single item was inserted successfully.</li> - <li class="reactor">Added support to set an optional parameter in your callback rules of validation using the <a href="libraries/form_validation.html">Form Validation Library</a>.</li> - <li class="reactor">Added a <a href="libraries/migration.html">Migration Library</a> to assist with applying incremental updates to your database schema.</li> - <li class="reactor">Driver children can be located in any package path.</li> - <li class="reactor">Added max_filename_increment config setting for Upload library.</li> + <li>Changed <kbd>$this->cart->insert()</kbd> in the <a href="libraries/cart.html">Cart Library</a> to return the Row ID if a single item was inserted successfully.</li> + <li>Added support to set an optional parameter in your callback rules of validation using the <a href="libraries/form_validation.html">Form Validation Library</a>.</li> + <li>Added a <a href="libraries/migration.html">Migration Library</a> to assist with applying incremental updates to your database schema.</li> + <li>Driver children can be located in any package path.</li> + <li>Added max_filename_increment config setting for Upload library.</li> + <li><samp>CI_Loader::_ci_autoloader()</samp> is now a protected method.</li> + <li>Added <kbd>is_unique</kbd> to the <a href="libraries/form_validation.html">Form Validation library</a>.</li> + <li>Modified valid_ip() to use PHP's filter_var() when possible (>= PHP 5.2) in the <a href="libraries/form_validation.html">Form Validation</a> library.</li> + <li>Added <kbd>$config['use_page_numbers']</kbd> to the <a href="libraries/pagination.html">Pagination library</a>, which enables real page numbers in the URI.</li> + </ul> + </li> + <li>Core + <ul> + <li>Changed private functions in CI_URI to protected so MY_URI can override them.</li> </ul> </li> </ul> <h3>Bug fixes for 2.1.0</h3> <ul> + <li class="reactor">Unlink raised an error if cache file did not exist when you try to delete it.</li> <li class="reactor">Fixed #378 Robots identified as regular browsers by the User Agent class.</li> <li class="reactor">If a config class was loaded first then a library with the same name is loaded, the config would be ignored.</li> <li class="reactor">Fixed a bug (Reactor #19) where 1) the 404_override route was being ignored in some cases, and 2) auto-loaded libraries were not available to the 404_override controller when a controller existed but the requested method did not.</li> <li class="rector">Fixed a bug (Reactor #89) where MySQL export would fail if the table had hyphens or other non alphanumeric/underscore characters.</li> - <li class="reactor">Fixed a bug (#200) where MySQL queries would be malformed after calling <samp>count_all()</samp> then <samp>db->get()</samp></li> - <li>Fixed a bug (#181) where a mis-spelling was in the form validation language file.</li> + <li class="reactor">Fixed a bug (#200) where MySQL queries would be malformed after calling <samp>count_all()</samp> then <samp>db->get()</samp></li> + <li class="reactor">Fixed bug #105 that stopped query errors from being logged unless database debugging was enabled</li> + <li>Fixed a bug (#181) where a mis-spelling was in the form validation language file.</li> <li>Fixed a bug (#160) - Removed unneeded array copy in the file cache driver.</li> <li>Fixed a bug (#150) - <samp>field_data()</samp> now correctly returns column length.</li> + <li>Fixed a bug (#8) - <samp>load_class()</samp> now looks for core classes in <samp>APPPATH</samp> first, allowing them to be replaced.</li> + <li>Fixed a bug (#24) - ODBC database driver called incorrect parent in __construct().</li> + <li>Fixed a bug (#85) - OCI8 (Oracle) database escape_str() function did not escape correct.</li> + <li>Fixed a bug (#344) - Using schema found in <a href="libraries/sessions.html">Saving Session Data to a Database</a>, system would throw error "user_data does not have a default value" when deleting then creating a session.</li> + <li>Fixed a bug (#112) - OCI8 (Oracle) driver didn't pass the configured database character set when connecting.</li> + <li>Fixed a bug (#182) - OCI8 (Oracle) driver used to re-execute the statement whenever num_rows() is called.</li> </ul> <h2>Version 2.0.3</h2> @@ -124,6 +151,7 @@ Change Log <li>Visual updates to the welcome_message view file and default error templates. Thanks to <a href="https://bitbucket.org/danijelb">danijelb</a> for the pull request.</li> <li class="reactor">Added <samp>insert_batch()</samp> function to the PostgreSQL database driver. Thanks to epallerols for the patch.</li> <li class="reactor">Added "application/x-csv" to mimes.php.</li> + <li class="reactor">Added CSRF protection URI whitelisting.</li> <li>Fixed a bug where <a href="libraries/email.html">Email library</a> attachments with a "." in the name would using invalid MIME-types.</li> </ul> </li> @@ -137,7 +165,6 @@ Change Log <li>Libraries <ul> <li>Altered Session to use a longer match against the user_agent string. See upgrade notes if using database sessions.</li> - <li class="reactor">Added <kbd>is_unique</kbd> to the <a href="libraries/form_validation.html">Form Validation library</a>.</li> <li class="reactor">Added <kbd>$this->db->set_dbprefix()</kbd> to the <a href="database/queries.html">Database Driver</a>.</li> <li class="reactor">Changed <kbd>$this->cart->insert()</kbd> in the <a href="libraries/cart.html">Cart Library</a> to return the Row ID if a single item was inserted successfully.</li> <li class="reactor">Added <kbd>$this->load->get_var()</kbd> to the <a href="libraries/loader.html">Loader library</a> to retrieve global vars set with <kbd>$this->load->view()</kbd> and <kbd>$this->load->vars()</kbd>.</li> @@ -157,7 +184,7 @@ Change Log <li class="reactor">Fixed issue #199 - Attributes passed as string does not include a space between it and the opening tag.</li> <li class="reactor">Fixed a bug where the method <kbd>$this->cart->total_items()</kbd> from <a href="libraries/cart.html">Cart Library</a> now returns the sum of the quantity of all items in the cart instead of your total count.</li> <li class="reactor">Fixed a bug where not setting 'null' when adding fields in db_forge for mysql and mysqli drivers would default to NULL instead of NOT NULL as the docs suggest.</li> - <li class="reactor">Fixed a bug where using <kbd>$this->db->select_max()</kdb>, <kbd>$this->db->select_min()</kdb>, etc could throw notices. Thanks to w43l for the patch.</li> + <li class="reactor">Fixed a bug where using <kbd>$this->db->select_max()</kbd>, <kbd>$this->db->select_min()</kbd>, etc could throw notices. Thanks to w43l for the patch.</li> <li class="reactor">Replace checks for STDIN with php_sapi_name() == 'cli' which on the whole is more reliable. This should get parameters in crontab working.</li> </ul> diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html index 92d9614d5..70aecbdb5 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -79,9 +79,6 @@ is generated by each database adapter. It also allows for safer queries, since <p>The following functions allow you to build SQL <strong>SELECT</strong> statements.</p> -<p><strong>Note: If you are using PHP 5 you can use method chaining for more compact syntax. This is described at the end of the page.</strong></p> - - <h2>$this->db->get();</h2> <p>Runs the selection query and returns the result. Can be used by itself to retrieve all records from a table:</p> @@ -532,8 +529,8 @@ $this->db->insert('mytable', $object); <p>Generates an insert string based on the data you supply, and runs the query. You can either pass an <strong>array</strong> or an <strong>object</strong> to the function. Here is an example using an array:</p> -<code> -$data = array(<br/> +<code> +$data = array(<br /> array(<br /> 'title' => 'My title' ,<br /> 'name' => 'My Name' ,<br /> @@ -543,10 +540,10 @@ $data = array(<br/> 'title' => 'Another title' ,<br /> 'name' => 'Another Name' ,<br /> 'date' => 'Another date'<br /> - )<br/> -);<br /> + )<br /> +);<br /> <br /> -$this->db->update_batch('mytable', $data); +$this->db->insert_batch('mytable', $data); <br /><br /> // Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date'), ('Another title', 'Another name', 'Another date')</code> @@ -669,6 +666,41 @@ You can optionally pass this information directly into the update function as a <p>You may also use the <dfn>$this->db->set()</dfn> function described above when performing updates.</p> +<h2>$this->db->update_batch();</h2> +<p>Generates an update string based on the data you supply, and runs the query. You can either pass an +<strong>array</strong> or an <strong>object</strong> to the function. Here is an example using an array:</p> + +<code> +$data = array(<br/> + array(<br /> + 'title' => 'My title' ,<br /> + 'name' => 'My Name 2' ,<br /> + 'date' => 'My date 2'<br /> + ),<br /> + array(<br /> + 'title' => 'Another title' ,<br /> + 'name' => 'Another Name 2' ,<br /> + 'date' => 'Another date 2'<br /> + )<br/> +);<br /> +<br /> +$this->db->update_batch('mytable', $data, 'title'); +<br /><br /> +// Produces: <br /> +// UPDATE `mytable` SET `name` = CASE<br /> +// WHEN `title` = 'My title' THEN 'My Name 2'<br /> +// WHEN `title` = 'Another title' THEN 'Another Name 2'<br /> +// ELSE `name` END,<br /> +// `date` = CASE <br /> +// WHEN `title` = 'My title' THEN 'My date 2'<br /> +// WHEN `title` = 'Another title' THEN 'Another date 2'<br /> +// ELSE `date` END<br /> +// WHERE `title` IN ('My title','Another title')</code> + +<p>The first parameter will contain the table name, the second is an associative array of values, the third parameter is the where key.</p> + +<p class="important"><strong>Note:</strong> All values are escaped automatically producing safer queries.</p> + <a name="delete"> </a> <h1>Deleting Data</h1> @@ -786,4 +818,4 @@ Next Topic: <a href="transactions.html">Transactions</a> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/user_guide/database/results.html b/user_guide/database/results.html index ec5f97762..a47e335cb 100644 --- a/user_guide/database/results.html +++ b/user_guide/database/results.html @@ -105,8 +105,8 @@ Query Results <br /> foreach ($query->result('User') as $user)<br /> {<br /> - echo $row->name; // call attributes<br /> - echo $row->reverse_name(); // or methods defined on the 'User' class<br /> + echo $user->name; // call attributes<br /> + echo $user->reverse_name(); // or methods defined on the 'User' class<br /> } </code> diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html index 8231c7e78..c80e3d106 100644 --- a/user_guide/database/utilities.html +++ b/user_guide/database/utilities.html @@ -183,14 +183,15 @@ $query = $this->db->query("SELECT * FROM mytable");<br /> echo $this->dbutil->csv_from_result($query); </code> -<p>The second and third parameters allows you to -set the delimiter and newline character. By default tabs are used as the delimiter and "\n" is used as a new line. Example:</p> +<p>The second, third, and fourth parameters allow you to +set the delimiter, newline, and enclosure characters respectively. By default tabs are used as the delimiter, "\n" is used as a new line, and a double-quote is used as the enclosure. Example:</p> <code> $delimiter = ",";<br /> $newline = "\r\n";<br /> +$enclosure = '"';<br /> <br /> -echo $this->dbutil->csv_from_result($query, $delimiter, $newline); +echo $this->dbutil->csv_from_result($query, $delimiter, $newline, $enclosure); </code> <p><strong>Important:</strong> This function will NOT write the CSV file for you. It simply creates the CSV layout. diff --git a/user_guide/general/cli.html b/user_guide/general/cli.html index befc9994a..4e9bf8709 100644 --- a/user_guide/general/cli.html +++ b/user_guide/general/cli.html @@ -83,7 +83,7 @@ Running via the CLI <ul> <li>Run your cron-jobs without needing to use wget or curl</li> - <li>Make your cron-jobs inaccessible from being loaded in the URL by checking for <kbd>IS_CLI</kbd></li> + <li>Make your cron-jobs inaccessible from being loaded in the URL by checking for <kbd>$this->input->is_cli_request()</kbd></li> <li>Make interactive "tasks" that can do things like set permissions, prune cache folders, run backups, etc.</li> <li>Integrate with other applications in other languages. For example, a random C++ script could call one command and run code in your models!</li> </ul> @@ -114,7 +114,7 @@ class Tools extends CI_Controller { <p>Instead, we are going to open Terminal in Mac/Lunix or go to Run > "cmd" in Windows and navigate to our CodeIgniter project.</p> <blockquote> - $ cd /path/to/project;<br/> + $ cd /path/to/project;<br /> $ php index.php tools message </blockquote> @@ -147,4 +147,4 @@ Next Topic: <a href="reserved_names.html">Reserved Names</a></p> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html index 65457759d..7cff6321c 100644 --- a/user_guide/general/common_functions.html +++ b/user_guide/general/common_functions.html @@ -104,6 +104,8 @@ else<br /> <p>This function prevents inserting null characters between ascii characters, like Java\0script.</p> +<h2>html_escape(<var>$mixed</var>)</h2> +<p>This function provides short cut for htmlspecialchars() function. It accepts string and array. To prevent Cross Site Scripting (XSS), it is very useful.</p> </div> diff --git a/user_guide/general/profiling.html b/user_guide/general/profiling.html index 9895b0284..0993da5b4 100644 --- a/user_guide/general/profiling.html +++ b/user_guide/general/profiling.html @@ -155,6 +155,11 @@ This information can be useful during development in order to help with debuggin <td class="td">TRUE</td> </tr> <tr> + <td class="td"><strong>session_data</strong></td> + <td class="td">Data stored in current session</td> + <td class="td">TRUE</td> + </tr> + <tr> <td class="td"><strong>query_toggle_count</strong></td> <td class="td">The number of queries after which the query block will default to hidden.</td> <td class="td">25</td> diff --git a/user_guide/general/requirements.html b/user_guide/general/requirements.html index 405798f04..de0ee76dd 100644 --- a/user_guide/general/requirements.html +++ b/user_guide/general/requirements.html @@ -59,7 +59,7 @@ Server Requirements <ul> <li><a href="http://www.php.net/">PHP</a> version 5.1.6 or newer.</li> - <li>A Database is required for most web application programming. Current supported databases are MySQL (4.1+), MySQLi, MS SQL, Postgres, Oracle, SQLite, and ODBC.</li> + <li>A Database is required for most web application programming. Current supported databases are MySQL (4.1+), MySQLi, MS SQL, Postgres, Oracle, SQLite, ODBC and CUBRID.</li> </ul> diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html index dd935ebd9..511eeab89 100644 --- a/user_guide/helpers/form_helper.html +++ b/user_guide/helpers/form_helper.html @@ -84,7 +84,7 @@ in the event your URLs ever change.</p> <p>The above example would create a form that points to your base URL plus the "email/send" URI segments, like this:</p> -<code><form method="post" accept-charset="utf-8" action="http:/example.com/index.php/email/send" /></code> +<code><form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send" /></code> <h4>Adding Attributes</h4> @@ -97,7 +97,7 @@ echo form_open('email/send', $attributes);</code> <p>The above example would create a form similar to this:</p> -<code><form method="post" accept-charset="utf-8" action="http:/example.com/index.php/email/send" class="email" id="myform" /></code> +<code><form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send" class="email" id="myform" /></code> <h4>Adding Hidden Input Fields</h4> @@ -110,7 +110,7 @@ echo form_open('email/send', '', $hidden);</code> <p>The above example would create a form similar to this:</p> -<code><form method="post" accept-charset="utf-8" action="http:/example.com/index.php/email/send"><br /> +<code><form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send"><br /> <input type="hidden" name="username" value="Joe" /><br /> <input type="hidden" name="member_id" value="234" /></code> @@ -180,12 +180,12 @@ echo form_input('username', 'johndoe', $js);</code> <h2>form_password()</h2> <p>This function is identical in all respects to the <dfn>form_input()</dfn> function above -except that is sets it as a "password" type.</p> +except that it uses the "password" input type.</p> <h2>form_upload()</h2> <p>This function is identical in all respects to the <dfn>form_input()</dfn> function above -except that is sets it as a "file" type, allowing it to be used to upload files.</p> +except that it uses the "file" input type, allowing it to be used to upload files.</p> <h2>form_textarea()</h2> @@ -318,7 +318,7 @@ fourth parameter:</p> <h2>form_radio()</h2> -<p>This function is identical in all respects to the <dfn>form_checkbox()</dfn> function above except that is sets it as a "radio" type.</p> +<p>This function is identical in all respects to the <dfn>form_checkbox()</dfn> function above except that it uses the "radio" input type.</p> <h2>form_submit()</h2> diff --git a/user_guide/helpers/string_helper.html b/user_guide/helpers/string_helper.html index 314124037..ebdbd3ab2 100644 --- a/user_guide/helpers/string_helper.html +++ b/user_guide/helpers/string_helper.html @@ -96,9 +96,9 @@ String Helper <p>Usage example:</p> -<code>echo increment_string('file', '_'); // "file_1"<br/> -echo increment_string('file', '-', 2); // "file-2"<br/> -echo increment_string('file-4'); // "file-5"<br/></code> +<code>echo increment_string('file', '_'); // "file_1"<br /> +echo increment_string('file', '-', 2); // "file-2"<br /> +echo increment_string('file-4'); // "file-5"<br /></code> <h2>alternator()</h2> @@ -186,4 +186,4 @@ Next Topic: <a href="text_helper.html">Text Helper</a> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/user_guide/helpers/url_helper.html b/user_guide/helpers/url_helper.html index ac9d0a68e..e60e96bf0 100644 --- a/user_guide/helpers/url_helper.html +++ b/user_guide/helpers/url_helper.html @@ -27,7 +27,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.2</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> diff --git a/user_guide/installation/downloads.html b/user_guide/installation/downloads.html index f36b2bc0f..bb18f1de2 100644 --- a/user_guide/installation/downloads.html +++ b/user_guide/installation/downloads.html @@ -58,7 +58,9 @@ Downloading CodeIgniter <h1>Downloading CodeIgniter</h1> <ul> - <li><a href="http://codeigniter.com/downloads/">CodeIgniter V 2.0.2 (Current version)</a></li> + <li><a href="http://codeigniter.com/downloads/">CodeIgniter V 2.1.0 (Current version)</a></li> + <li><a href="http://codeigniter.com/download_files/reactor/CodeIgniter_2.0.3.zip">CodeIgniter V 2.0.3</a></li> + <li><a href="http://codeigniter.com/download_files/reactor/CodeIgniter_2.0.2.zip">CodeIgniter V 2.0.2</a></li> <li><a href="http://codeigniter.com/download_files/reactor/CodeIgniter_2.0.1.zip">CodeIgniter V 2.0.1</a></li> <li><a href="http://codeigniter.com/download_files/reactor/CodeIgniter_2.0.0.zip">CodeIgniter V 2.0.0</a></li> <li><a href="http://codeigniter.com/download_files/CodeIgniter_1.7.3.zip">CodeIgniter V 1.7.3</a></li> @@ -86,14 +88,14 @@ Downloading CodeIgniter -<h1 id="hg">Mercurial Server</h1> -<p><a href="http://mercurial.selenic.com">Mercurial</a> is a distributed version control system.</p> +<h1 id="git">Git Server</h1> +<p><a href="http://git-scm.com/about">Git</a> is a distributed version control system.</p> - <p>Public Hg access is available at <a href="http://bitbucket.org/ellislab/codeigniter-reactor/">BitBucket</a>. + <p>Public Git access is available at <a href="https://github.com/EllisLab/CodeIgniter">GitHub</a>. Please note that while every effort is made to keep this code base functional, we cannot guarantee the functionality of code taken from the tip.</p> - <p>Beginning with version 1.6.1, stable tags are also available via BitBucket, simply select the version from the Tags dropdown.</p> + <p>Beginning with version 2.0.3, stable tags are also available via GitHub, simply select the version from the Tags dropdown.</p> </div> <!-- END CONTENT --> diff --git a/user_guide/installation/index.html b/user_guide/installation/index.html index 84338e2e6..ad66ad7a6 100644 --- a/user_guide/installation/index.html +++ b/user_guide/installation/index.html @@ -67,14 +67,14 @@ Installation Instructions </ol> <p>If you wish to increase security by hiding the location of your CodeIgniter files you can rename the <dfn>system</dfn> and <dfn>application</dfn> folders -to something more private. If you do rename them, you must open your main <kbd>index.php</kbd> file and set the <samp>$system_folder</samp> and <samp>$application_folder</samp> +to something more private. If you do rename them, you must open your main <kbd>index.php</kbd> file and set the <samp>$system_path</samp> and <samp>$application_folder</samp> variables at the top of the file with the new name you've chosen.</p> <p>For the best security, both the <dfn>system</dfn> and any <dfn>application</dfn> folders should be placed above web root so that they are not directly accessible via a browser. By default, .htaccess files are included in each folder to help prevent direct access, but it is best to remove them from public access entirely in case the web server configuration changes or doesn't abide by the .htaccess.</p> <p>If you would like to keep your views public it is also possible to move the <dfn>views</dfn> folder out of your application folder.</p> -<p>After moving them, open your main <kdb>index.php</kbd> file and set the <samp>$system_folder</samp>, <samp>$application_folder</samp> and <samp>$view_folder</samp> variables, preferably with a full path, e.g. '<dfn>/www/MyUser/system</dfn>'.</p> +<p>After moving them, open your main <kdb>index.php</kbd> file and set the <samp>$system_path</samp>, <samp>$application_folder</samp> and <samp>$view_folder</samp> variables, preferably with a full path, e.g. '<dfn>/www/MyUser/system</dfn>'.</p> <p> One additional measure to take in production environments is to disable @@ -107,4 +107,4 @@ Next Topic: <a href="upgrading.html">Upgrading from a Previous Versio </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/user_guide/installation/upgrade_201.html b/user_guide/installation/upgrade_201.html index 036ef7c05..7ae29b824 100644 --- a/user_guide/installation/upgrade_201.html +++ b/user_guide/installation/upgrade_201.html @@ -83,7 +83,7 @@ Upgrading from 2.0.0 to 2.0.1 <p>to use either a / or <kbd>base_url()</kbd>:</p> -<code>echo form_open('/'); //<form action="http://example.com/index.php/" method="post" accept-charset="utf-8"><br/> +<code>echo form_open('/'); //<form action="http://example.com/index.php/" method="post" accept-charset="utf-8"><br /> echo form_open(base_url()); //<form action="http://example.com/" method="post" accept-charset="utf-8"></code> </div> @@ -102,4 +102,4 @@ Next Topic: <a href="troubleshooting.html">Troubleshooting</a> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/user_guide/installation/upgrade_210.html b/user_guide/installation/upgrade_210.html new file mode 100644 index 000000000..6e8ddec9d --- /dev/null +++ b/user_guide/installation/upgrade_210.html @@ -0,0 +1,91 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>Upgrading from 2.0.3 to 2.1.0 : CodeIgniter User Guide</title> + +<style type='text/css' media='all'>@import url('../userguide.css');</style> +<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> + +<script type="text/javascript" src="../nav/nav.js"></script> +<script type="text/javascript" src="../nav/prototype.lite.js"></script> +<script type="text/javascript" src="../nav/moo.fx.js"></script> +<script type="text/javascript" src="../nav/user_guide_menu.js"></script> + +<meta http-equiv='expires' content='-1' /> +<meta http-equiv= 'pragma' content='no-cache' /> +<meta name='robots' content='all' /> +<meta name='author' content='ExpressionEngine Dev Team' /> +<meta name='description' content='CodeIgniter User Guide' /> + +</head> +<body> + +<!-- START NAVIGATION --> +<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> +<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> +<div id="masthead"> +<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> +<tr> +<td><h1>CodeIgniter User Guide Version 2.1.0</h1></td> +<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> +</tr> +</table> +</div> +<!-- END NAVIGATION --> + + +<!-- START BREADCRUMB --> +<table cellpadding="0" cellspacing="0" border="0" style="width:100%"> +<tr> +<td id="breadcrumb"> +<a href="http://codeigniter.com/">CodeIgniter Home</a> › +<a href="../index.html">User Guide Home</a> › +Upgrading from 2.0.3 to 2.1.0 +</td> +<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <input type="submit" class="submit" name="sa" value="Go" /></form></td> +</tr> +</table> +<!-- END BREADCRUMB --> + +<br clear="all" /> + + +<!-- START CONTENT --> +<div id="content"> + +<h1>Upgrading from 2.0.3 to 2.1.0</h1> + +<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p> + +<h2>Step 1: Update your CodeIgniter files</h2> + +<p>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.</p> + +<h2>Step 2: Replace config/user_agents.php</h2> + +<p>This config file has been updated to contain more user agent types, please copy it to <kbd>application/config/user_agents.php</kbd>.</p> + +<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p> + + + + +</div> +<!-- END CONTENT --> + + +<div id="footer"> +<p> +Previous Topic: <a href="index.html">Installation Instructions</a> + · +<a href="#top">Top of Page</a> · +<a href="../index.html">User Guide Home</a> · +Next Topic: <a href="troubleshooting.html">Troubleshooting</a> +</p> +<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2011 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> +</div> + +</body> +</html>
\ No newline at end of file diff --git a/user_guide/installation/upgrading.html b/user_guide/installation/upgrading.html index 58a45ee9d..0f4a29bfd 100644 --- a/user_guide/installation/upgrading.html +++ b/user_guide/installation/upgrading.html @@ -60,6 +60,7 @@ Upgrading from a Previous Version <p>Please read the upgrade notes corresponding to the version you are upgrading from.</p> <ul> + <li><a href="upgrade_210.html">Upgrading from 2.0.3 to 2.1.0</a></li> <li><a href="upgrade_203.html">Upgrading from 2.0.2 to 2.0.3</a></li> <li><a href="upgrade_202.html">Upgrading from 2.0.1 to 2.0.2</a></li> <li><a href="upgrade_201.html">Upgrading from 2.0 to 2.0.1</a></li> diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html index af27176ad..98864a700 100644 --- a/user_guide/libraries/loader.html +++ b/user_guide/libraries/loader.html @@ -241,9 +241,9 @@ $this->load->library('foo_bar');</code> <p>In this instance, it is possible for view naming collisions within packages to occur, and possibly the incorrect package being loaded. To ensure against this, set an optional second parameter of <var>FALSE</var> when calling <samp>add_package_path()</samp>.</p> <code> -$this->load->add_package_path(APPPATH.'my_app', TRUE);<br> +$this->load->add_package_path(APPPATH.'my_app', FALSE);<br> $this->load->view('my_app_index'); // Loads<br> -$this->load->view('welcome_message'); // Will not load the default welcome_message b/c the second param to add_package_path is TRUE<br> +$this->load->view('welcome_message'); // Will not load the default welcome_message b/c the second param to add_package_path is FALSE<br> <br> // Reset things<br> $this->load->remove_package_path(APPPATH.'my_app');<br> diff --git a/user_guide/libraries/output.html b/user_guide/libraries/output.html index 7361d7961..64ba482ce 100644 --- a/user_guide/libraries/output.html +++ b/user_guide/libraries/output.html @@ -82,12 +82,12 @@ For example, if you build a page in one of your controller functions, don't set <p>Permits you to set the mime-type of your page so you can serve JSON data, JPEG's, XML, etc easily.</p> -<code>$this->output<br/> - ->set_content_type('application/json')<br/> - ->set_output(json_encode(array('foo' => 'bar')));<br/> -<br/> -$this->output<br/> - ->set_content_type('jpeg') // You could also use ".jpeg" which will have the full stop removed before looking in config/mimes.php<br/> +<code>$this->output<br /> + ->set_content_type('application/json')<br /> + ->set_output(json_encode(array('foo' => 'bar')));<br /> +<br /> +$this->output<br /> + ->set_content_type('jpeg') // You could also use ".jpeg" which will have the full stop removed before looking in config/mimes.php<br /> ->set_output(file_get_contents('files/something.jpg'));</code> <p><strong>Important:</strong> Make sure any non-mime string you pass to this method exists in config/mimes.php or it will have no effect.</p> @@ -174,4 +174,4 @@ Next Topic: <a href="pagination.html">Pagination Class</a> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/user_guide/libraries/pagination.html b/user_guide/libraries/pagination.html index 196555441..6a144114d 100644 --- a/user_guide/libraries/pagination.html +++ b/user_guide/libraries/pagination.html @@ -119,7 +119,11 @@ something different you can specify it.</p> <p>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.</p> -<h4>$config['page_query_string'] = TRUE</h4> + +<h4>$config['use_page_numbers'] = TRUE;</h4> +<p>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, set this to TRUE.</p> + +<h4>$config['page_query_string'] = TRUE;</h4> <p>By default, the pagination library assume you are using <a href="../general/urls.html">URI Segments</a>, and constructs your links something like</p> <p><code>http://example.com/index.php/test/page/20</code></p> <p>If you have $config['enable_query_strings'] set to TRUE your links will automatically be re-written using Query Strings. This option can also be explictly set. Using $config['page_query_string'] set to TRUE, the pagination link will become.</p> diff --git a/user_guide/libraries/security.html b/user_guide/libraries/security.html index dd62a4386..cbe12d852 100644 --- a/user_guide/libraries/security.html +++ b/user_guide/libraries/security.html @@ -116,6 +116,9 @@ Note: This function should only be used to deal with data upon submission. It's <p>If you use the <a href="../helpers/form_helper.html">form helper</a> the <var>form_open()</var> function will automatically insert a hidden csrf field in your forms.</p> +<p>Select URIs can be whitelisted from csrf protection (for example API endpoints expecting externally POSTed content). You can add these URIs by editing the 'csrf_exclude_uris' config parameter:</p> +<code>$config['csrf_exclude_uris'] = array('api/person/add');</code> + </div> <!-- END CONTENT --> diff --git a/user_guide/libraries/user_agent.html b/user_guide/libraries/user_agent.html index e1d3640d3..d6641c883 100644 --- a/user_guide/libraries/user_agent.html +++ b/user_guide/libraries/user_agent.html @@ -133,7 +133,7 @@ You can find this list in <dfn>application/config/user_agents.php</dfn> if you w else if ($this->agent->is_mobile())<br /> {<br /> $this->load->view('mobile/home');<br /> -}<br/> +}<br /> else<br /> {<br /> $this->load->view('web/home');<br /> @@ -223,4 +223,4 @@ Next Topic: <a href="xmlrpc.html">XML-RPC Class</a> </div> </body> -</html>
\ No newline at end of file +</html> |