From 5a0f04e232c3f2c681b99ba6f0a8e383303ec296 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 13 Jan 2018 14:01:06 +0200 Subject: [ci skip] Start 3.1.8-dev --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 6 ++++++ user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 3 ++- user_guide_src/source/installation/upgrade_318.rst | 14 ++++++++++++++ user_guide_src/source/installation/upgrading.rst | 1 + 6 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 user_guide_src/source/installation/upgrade_318.rst diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 962196b6b..4f81a98b6 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - const CI_VERSION = '3.1.7'; + const CI_VERSION = '3.1.8-dev'; /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index e23517a86..686f9b83e 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -2,6 +2,12 @@ Change Log ########## +Version 3.1.8 +============= + +Release Date: Not Released + + Version 3.1.7 ============= diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index fbd81c47e..e03c3168f 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2014 - 2018, British Columbia Institute of Technology' # built documents. # # The short X.Y version. -version = '3.1.7' +version = '3.1.8-dev' # The full version, including alpha/beta/rc tags. -release = '3.1.7' +release = '3.1.8-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 85f5ecf5f..03913159b 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,7 +2,8 @@ Downloading CodeIgniter ####################### -- `CodeIgniter v3.1.7 (Current version) `_ +- `CodeIgniter v3.1.8-dev (Current version) `_ +- `CodeIgniter v3.1.7 `_ - `CodeIgniter v3.1.6 `_ - `CodeIgniter v3.1.5 `_ - `CodeIgniter v3.1.4 `_ diff --git a/user_guide_src/source/installation/upgrade_318.rst b/user_guide_src/source/installation/upgrade_318.rst new file mode 100644 index 000000000..8b13f5c50 --- /dev/null +++ b/user_guide_src/source/installation/upgrade_318.rst @@ -0,0 +1,14 @@ +############################# +Upgrading from 3.1.7 to 3.1.8 +############################# + +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/* directory. + +.. note:: If you have any custom developed files in these directories, + please make copies of them first. diff --git a/user_guide_src/source/installation/upgrading.rst b/user_guide_src/source/installation/upgrading.rst index 1cc249869..a51b128ec 100644 --- a/user_guide_src/source/installation/upgrading.rst +++ b/user_guide_src/source/installation/upgrading.rst @@ -8,6 +8,7 @@ upgrading from. .. toctree:: :titlesonly: + Upgrading from 3.1.7 to 3.1.8 Upgrading from 3.1.6 to 3.1.7 Upgrading from 3.1.5 to 3.1.6 Upgrading from 3.1.4 to 3.1.5 -- cgit v1.2.3-24-g4f1b From 221c09588be796ba352683cd7814af33501d4fa6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Jan 2018 10:29:19 +0200 Subject: Fix a bug where INTL_IDNA_VARIANT_UTS46 was used while undeclared The constant was introduced in PHP 5.4, and is documented that way, but it actually depends on PHP being linked to ICU 4.6+, while the minimum requirement for compilation is 4.0 ... When this happens on PHP 7.2, an E_DEPRECATED notice will be emitted; there's currently a discussion on php-internals to resolve that issue. --- system/libraries/Email.php | 2 +- system/libraries/Form_validation.php | 2 +- user_guide_src/source/changelog.rst | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 6a8bda70e..967a0019a 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1035,7 +1035,7 @@ class CI_Email { if (function_exists('idn_to_ascii') && strpos($email, '@')) { list($account, $domain) = explode('@', $email, 2); - $domain = is_php('5.4') + $domain = defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : idn_to_ascii($domain); $email = $account.'@'.$domain; diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 3444c65a0..6a97ee599 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1231,7 +1231,7 @@ class CI_Form_validation { { if (function_exists('idn_to_ascii') && preg_match('#\A([^@]+)@(.+)\z#', $str, $matches)) { - $domain = is_php('5.4') + $domain = defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($matches[2], 0, INTL_IDNA_VARIANT_UTS46) : idn_to_ascii($matches[2]); $str = $matches[1].'@'.$domain; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 686f9b83e..f74308342 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,12 @@ Version 3.1.8 Release Date: Not Released +- General Changes + +Bug fixes for 3.1.8 +------------------- + +- Fixed a bug where :doc:`Form Validation Library `, :doc:`Email Library ` tried to use ``INTL_IDNA_VARIANT_UTS46`` when it was undeclared. Version 3.1.7 ============= -- cgit v1.2.3-24-g4f1b From 329dd039a211ed7634b45e2c908f7dc375b806a2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Jan 2018 10:54:10 +0200 Subject: [ci skip] If possible, always negotiate for TLS 1.0, TLS 1.1, TLS 1.2 for SMTP connections in CI_Email --- system/libraries/Email.php | 14 +++++++++++++- user_guide_src/source/changelog.rst | 4 +++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 967a0019a..71740ee5e 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -2074,7 +2074,19 @@ class CI_Email { $this->_send_command('hello'); $this->_send_command('starttls'); - $crypto = stream_socket_enable_crypto($this->_smtp_connect, TRUE, STREAM_CRYPTO_METHOD_TLS_CLIENT); + /** + * STREAM_CRYPTO_METHOD_TLS_CLIENT is quite the mess ... + * + * - On PHP <5.6 it doesn't even mean TLS, but SSL 2.0, and there's no option to use actual TLS + * - On PHP 5.6.0-5.6.6, >=7.2 it means negotiation with any of TLS 1.0, 1.1, 1.2 + * - On PHP 5.6.7-7.1.* it means only TLS 1.0 + * + * We want the negotiation, so we'll force it below ... + */ + $method = is_php('5.6') + ? STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT + : STREAM_CRYPTO_METHOD_TLS_CLIENT; + $crypto = stream_socket_enable_crypto($this->_smtp_connect, TRUE, $method); if ($crypto !== TRUE) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f74308342..f6e24e519 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,7 +7,9 @@ Version 3.1.8 Release Date: Not Released -- General Changes +- General Changes + + - Updated :doc:`Email Library ` to always negotiate between TLS 1.0, 1.1, 1.2 when possible (PHP 5.6+) for SMTP connections. Bug fixes for 3.1.8 ------------------- -- cgit v1.2.3-24-g4f1b From 7c71b8f571585655d24ce325fb0ec3deb6caa8e4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 27 Jan 2018 06:09:02 +0200 Subject: [ci skip] Apply the INTL_IDNA_VARIANT_UTS46 fix to CI_Email::_validate_email_for_shell() --- system/libraries/Email.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 71740ee5e..a53e7e72a 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1856,7 +1856,7 @@ class CI_Email { if (function_exists('idn_to_ascii') && strpos($email, '@')) { list($account, $domain) = explode('@', $email, 2); - $domain = is_php('5.4') + $domain = defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : idn_to_ascii($domain); $email = $account.'@'.$domain; -- cgit v1.2.3-24-g4f1b From 7dd6f14073c109a3227d78e30780ab79117bda42 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 30 Jan 2018 15:08:21 +0200 Subject: Fix a QB bug where where(), having() treated values passed to them as arbitrary SQL --- system/database/DB_query_builder.php | 51 ++++++++++++++++++++---------------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index b9bbb5016..8f477e3a1 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -680,7 +680,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { { if ($escape === TRUE) { - $v = ' '.$this->escape($v); + $v = $this->escape($v); } if ( ! $this->_has_operator($k)) @@ -698,10 +698,11 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $k = substr($k, 0, $match[0][1]).($match[1][0] === '=' ? ' IS NULL' : ' IS NOT NULL'); } - $this->{$qb_key}[] = array('condition' => $prefix.$k.$v, 'escape' => $escape); + ${$qb_key} = array('condition' => $prefix.$k, 'value' => $v, 'escape' => $escape); + $this->{$qb_key}[] = ${$qb_key}; if ($this->qb_caching === TRUE) { - $this->{$qb_cache_key}[] = array('condition' => $prefix.$k.$v, 'escape' => $escape); + $this->{$qb_cache_key}[] = ${$qb_key}; $this->qb_cache_exists[] = substr($qb_key, 3); } @@ -834,6 +835,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $where_in = array( 'condition' => $prefix.$key.$not.' IN('.implode(', ', $where_in).')', + 'value' => NULL, 'escape' => $escape ); @@ -962,33 +964,34 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $v = $this->escape_like_str($v); } - if ($side === 'none') + switch ($side) { - $like_statement = "{$prefix} {$k} {$not} LIKE '{$v}'"; - } - elseif ($side === 'before') - { - $like_statement = "{$prefix} {$k} {$not} LIKE '%{$v}'"; - } - elseif ($side === 'after') - { - $like_statement = "{$prefix} {$k} {$not} LIKE '{$v}%'"; - } - else - { - $like_statement = "{$prefix} {$k} {$not} LIKE '%{$v}%'"; + case 'none': + $v = "'{$v}'"; + break; + case 'before': + $v = "%'{$v}'"; + break; + case 'after': + $v = "'{$v}%'"; + break; + case 'both': + default: + $v = "'%{$v}%'"; + break; } // some platforms require an escape sequence definition for LIKE wildcards if ($escape === TRUE && $this->_like_escape_str !== '') { - $like_statement .= sprintf($this->_like_escape_str, $this->_like_escape_chr); + $v .= sprintf($this->_like_escape_str, $this->_like_escape_chr); } - $this->qb_where[] = array('condition' => $like_statement, 'escape' => $escape); + $qb_where = array('condition' => "{$prefix} {$k} {$not} LIKE", 'value' => $v, 'escape' => $escape); + $this->qb_where[] = $qb_where; if ($this->qb_caching === TRUE) { - $this->qb_cache_where[] = array('condition' => $like_statement, 'escape' => $escape); + $this->qb_cache_where[] = $qb_where; $this->qb_cache_exists[] = 'where'; } } @@ -1013,6 +1016,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $prefix = (count($this->qb_where) === 0 && count($this->qb_cache_where) === 0) ? '' : $type; $where = array( 'condition' => $prefix.$not.str_repeat(' ', ++$this->qb_where_group_count).' (', + 'value' => NULL, 'escape' => FALSE ); @@ -1073,6 +1077,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $this->qb_where_group_started = FALSE; $where = array( 'condition' => str_repeat(' ', $this->qb_where_group_count--).')', + 'value' => NULL, 'escape' => FALSE ); @@ -1433,7 +1438,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { // -------------------------------------------------------------------- /** - * Get_Where + * get_where() * * Allows the where clause, limit and offset to be added directly * @@ -2395,7 +2400,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } elseif ($this->{$qb_key}[$i]['escape'] === FALSE) { - $this->{$qb_key}[$i] = $this->{$qb_key}[$i]['condition']; + $this->{$qb_key}[$i] = $this->{$qb_key}[$i]['condition'].(isset($this->{$qb_key}[$i]['value']) ? ' '.$this->{$qb_key}[$i]['value'] : ''); continue; } @@ -2434,7 +2439,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { .' '.trim($matches[3]).$matches[4].$matches[5]; } - $this->{$qb_key}[$i] = implode('', $conditions); + $this->{$qb_key}[$i] = implode('', $conditions).(isset($this->{$qb_key}[$i]['value']) ? ' '.$this->{$qb_key}[$i]['value'] : ''); } return ($qb_key === 'qb_having' ? "\nHAVING " : "\nWHERE ") diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f6e24e519..9b7f0149c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -15,6 +15,7 @@ Bug fixes for 3.1.8 ------------------- - Fixed a bug where :doc:`Form Validation Library `, :doc:`Email Library ` tried to use ``INTL_IDNA_VARIANT_UTS46`` when it was undeclared. +- Fixed a bug where :doc:`Query Builder ` methods ``where()``, ``having()`` treated values passed to them as arbitrary SQL. Version 3.1.7 ============= -- cgit v1.2.3-24-g4f1b From a911daa2775ee9d09404c91c8954c6a216568cb5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 31 Jan 2018 23:58:39 +0200 Subject: [ci skip] Add changelog entry for PR #5391 --- user_guide_src/source/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 9b7f0149c..63de806f6 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.1.8 Release Date: Not Released +- **Security** + + - Updated :doc:`URL Helper ` function :php:func:`auto_link()` to add ``rel="noopener"`` to generated links in order to prevent tab hijacking. + - General Changes - Updated :doc:`Email Library ` to always negotiate between TLS 1.0, 1.1, 1.2 when possible (PHP 5.6+) for SMTP connections. -- cgit v1.2.3-24-g4f1b From 84760562d5bb875af0a33b0d0f636dc3081db7c0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 12 Feb 2018 15:15:47 +0200 Subject: [ci skip] Fix rendering of literal 'http://' strings in the manual --- user_guide_src/source/changelog.rst | 4 ++-- user_guide_src/source/helpers/string_helper.rst | 4 ++-- user_guide_src/source/helpers/url_helper.rst | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 63de806f6..2b82d7b36 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -1938,7 +1938,7 @@ Hg Tag: v2.0.0 precision. - Added alpha, and sha1 string types to random_string() in the :doc:`String Helper `. - - Modified prep_url() so as to not prepend http:// if the supplied + - Modified prep_url() so as to not prepend \http:// if the supplied string already has a scheme. - Modified get_file_info in the file helper, changing filectime() to filemtime() for dates. @@ -2678,7 +2678,7 @@ Bugfixes for 1.6.2 instantiating new Language and Exception objects, and not using the error heading. - Fixed a bug (#4413) where a URI containing slashes only e.g. - 'http://example.com/index.php?//' would result in PHP errors + '\http://example.com/index.php?//' would result in PHP errors - Fixed an array to string conversion error in the Validation library (#4425) - Fixed bug (#4451, #4299, #4339) where failed transactions will not diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst index a1fd7ee15..6dabc60d3 100644 --- a/user_guide_src/source/helpers/string_helper.rst +++ b/user_guide_src/source/helpers/string_helper.rst @@ -127,7 +127,7 @@ The following functions are available: :rtype: string Converts double slashes in a string to a single slash, except those - found in URL protocol prefixes (e.g. http://). + found in URL protocol prefixes (e.g. \http://). Example:: @@ -220,4 +220,4 @@ The following functions are available: Removes single and double quotes from a string. Example:: $string = "Joe's \"dinner\""; - $string = strip_quotes($string); //results in "Joes dinner" \ No newline at end of file + $string = strip_quotes($string); //results in "Joes dinner" diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst index 435a21df4..e117d37c0 100644 --- a/user_guide_src/source/helpers/url_helper.rst +++ b/user_guide_src/source/helpers/url_helper.rst @@ -144,7 +144,7 @@ The following functions are available: be a string or an array. .. note:: If you are building links that are internal to your application - do not include the base URL (http://...). This will be added + do not include the base URL (\http://...). This will be added automatically from the information specified in your config file. Include only the URI segments you wish appended to the URL. @@ -317,7 +317,7 @@ The following functions are available: :returns: Protocol-prefixed URL string :rtype: string - This function will add http:// in the event that a protocol prefix + This function will add \http:// in the event that a protocol prefix is missing from a URL. Pass the URL string to the function like this:: -- cgit v1.2.3-24-g4f1b From 2f1fc71c61ee9c781949d525f27fa1d5f11b9a95 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 28 Feb 2018 22:33:36 +0200 Subject: [ci skip] Fix 5423 --- system/database/drivers/postgre/postgre_driver.php | 7 +++---- user_guide_src/source/changelog.rst | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 7fb258abb..5779c8783 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -224,8 +224,8 @@ class CI_DB_postgre_driver extends CI_DB { * and so we'll have to fall back to running a query in * order to get it. */ - return isset($pg_version['server']) - ? $this->data_cache['version'] = $pg_version['server'] + return (isset($pg_version['server']) && preg_match('#^(\d+\.\d+)#', $pg_version['server'], $match)) + ? $this->data_cache['version'] = $match[1] : parent::version(); } @@ -354,8 +354,7 @@ class CI_DB_postgre_driver extends CI_DB { */ public function insert_id() { - $v = pg_version($this->conn_id); - $v = isset($v['server']) ? $v['server'] : 0; // 'server' key is only available since PosgreSQL 7.4 + $v = $this->version(); $table = (func_num_args() > 0) ? func_get_arg(0) : NULL; $column = (func_num_args() > 1) ? func_get_arg(1) : NULL; diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2b82d7b36..37291e196 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -14,12 +14,14 @@ Release Date: Not Released - General Changes - Updated :doc:`Email Library ` to always negotiate between TLS 1.0, 1.1, 1.2 when possible (PHP 5.6+) for SMTP connections. + - Updated :doc:`Database Library ` method ``version()`` to exclude suffixes to the main version numbers with the 'postgre' driver. Bug fixes for 3.1.8 ------------------- - Fixed a bug where :doc:`Form Validation Library `, :doc:`Email Library ` tried to use ``INTL_IDNA_VARIANT_UTS46`` when it was undeclared. - Fixed a bug where :doc:`Query Builder ` methods ``where()``, ``having()`` treated values passed to them as arbitrary SQL. +- Fixed a bug (#5423) - :doc:`Database Library ` method ``insert_id()`` failed due to incorrect server version parsing with the 'postgre' driver. Version 3.1.7 ============= -- cgit v1.2.3-24-g4f1b From 8ff2b1055e902ef4c66bbb6e3b1a4554872e6659 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 28 Feb 2018 22:44:09 +0200 Subject: [ci skip] Fix #5425 --- system/libraries/Xmlrpc.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 39e4dd37e..c23504de8 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -1181,7 +1181,7 @@ class XML_RPC_Message extends CI_Xmlrpc $data = implode("\r\n", $lines); // Parse XML data - if ( ! xml_parse($parser, $data, count($data))) + if ( ! xml_parse($parser, $data, TRUE)) { $errstr = sprintf('XML error: %s at line %d', xml_error_string(xml_get_error_code($parser)), diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 37291e196..95af9c086 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -22,6 +22,7 @@ Bug fixes for 3.1.8 - Fixed a bug where :doc:`Form Validation Library `, :doc:`Email Library ` tried to use ``INTL_IDNA_VARIANT_UTS46`` when it was undeclared. - Fixed a bug where :doc:`Query Builder ` methods ``where()``, ``having()`` treated values passed to them as arbitrary SQL. - Fixed a bug (#5423) - :doc:`Database Library ` method ``insert_id()`` failed due to incorrect server version parsing with the 'postgre' driver. +- Fixed a bug (#5425) - :doc:`XML-RPC Library ` produced an error message related to ``count()`` on PHP 7.2. Version 3.1.7 ============= -- cgit v1.2.3-24-g4f1b From 0768a406d49f9a7b3ffa32749beaffc55a153902 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 10 Mar 2018 02:08:32 +0200 Subject: [ci skip] Merge pull request #5434 from xims/patch-3 Update Image_lib to avoid setting file permissions when not needed --- system/libraries/Image_lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index b9adcd6e5..a5cb6fb47 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -835,7 +835,10 @@ class CI_Image_lib { imagedestroy($dst_img); imagedestroy($src_img); - chmod($this->full_dst_path, $this->file_permissions); + if ($this->dynamic_output !== TRUE) + { + chmod($this->full_dst_path, $this->file_permissions); + } return TRUE; } -- cgit v1.2.3-24-g4f1b From dc1d71cea3ef0dc35fabdcebbaca6e333051aa40 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 10 Mar 2018 02:12:18 +0200 Subject: [ci skip] Add changelog entry for #5434 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 95af9c086..4eaed24ec 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -23,6 +23,7 @@ Bug fixes for 3.1.8 - Fixed a bug where :doc:`Query Builder ` methods ``where()``, ``having()`` treated values passed to them as arbitrary SQL. - Fixed a bug (#5423) - :doc:`Database Library ` method ``insert_id()`` failed due to incorrect server version parsing with the 'postgre' driver. - Fixed a bug (#5425) - :doc:`XML-RPC Library ` produced an error message related to ``count()`` on PHP 7.2. +- Fixed a bug (#5434) - :doc:`Image Manipulation Library ` attempted to ``chmod()`` while rendering images with the ``dynamic_output`` option. Version 3.1.7 ============= -- cgit v1.2.3-24-g4f1b From 3d204b63df199c7fb41d2602867ac3835776f40a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 10 Mar 2018 02:40:22 +0200 Subject: [ci skip] Fix #5420 --- system/core/Security.php | 12 ++++++++++-- user_guide_src/source/changelog.rst | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 6cdce5d98..89a94c3dd 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -542,6 +542,14 @@ class CI_Security { $str ); + // Same thing, but for "tag functions" (e.g. eval`some code`) + // See https://github.com/bcit-ci/CodeIgniter/issues/5420 + $str = preg_replace( + '#(alert|prompt|confirm|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\s*)`(.*?)`#si', + '\\1\\2`\\3`', + $str + ); + // Final clean up // This adds a bit of extra precaution in case // something got through the above filters @@ -927,7 +935,7 @@ class CI_Security { return str_replace( $match[1], preg_replace( - '#href=.*?(?:(?:alert|prompt|confirm)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes($match[1]) ), @@ -955,7 +963,7 @@ class CI_Security { return str_replace( $match[1], preg_replace( - '#src=.*?(?:(?:alert|prompt|confirm|eval)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes($match[1]) ), diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4eaed24ec..37cd31d72 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,6 +10,7 @@ Release Date: Not Released - **Security** - Updated :doc:`URL Helper ` function :php:func:`auto_link()` to add ``rel="noopener"`` to generated links in order to prevent tab hijacking. + - Updated :doc:`Security Library ` method ``xss_clean()`` to also filter JavaScript tag functions. - General Changes -- cgit v1.2.3-24-g4f1b From 6efd42ebafceda967d1d8def06ee412d3c1f382b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 15 Mar 2018 16:24:42 +0200 Subject: [ci skip] Fix #5435 --- system/database/drivers/oci8/oci8_driver.php | 15 ++++++++++++++- user_guide_src/source/changelog.rst | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 1bd977390..b90db4bd2 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -97,7 +97,7 @@ class CI_DB_oci8_driver extends CI_DB { * * @var bool */ - public $limit_used; + public $limit_used = FALSE; // -------------------------------------------------------------------- @@ -685,4 +685,17 @@ class CI_DB_oci8_driver extends CI_DB { oci_close($this->conn_id); } + // -------------------------------------------------------------------- + + /** + * We need to reset our $limit_used hack flag, so it doesn't propagate + * to subsequent queries. + * + * @return void + */ + protected function _reset_select() + { + $this->limit_used = FALSE; + parent::_reset_select(); + } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 37cd31d72..21f5aae44 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -25,6 +25,7 @@ Bug fixes for 3.1.8 - Fixed a bug (#5423) - :doc:`Database Library ` method ``insert_id()`` failed due to incorrect server version parsing with the 'postgre' driver. - Fixed a bug (#5425) - :doc:`XML-RPC Library ` produced an error message related to ``count()`` on PHP 7.2. - Fixed a bug (#5434) - :doc:`Image Manipulation Library ` attempted to ``chmod()`` while rendering images with the ``dynamic_output`` option. +- Fixed a bug (#5435) - :doc:`Database Results ` method ``field_data()`` hid info about one field if ``limit()`` was previously used with the 'oci8' driver. Version 3.1.7 ============= -- cgit v1.2.3-24-g4f1b From e475b1c9ed1b82b5f4a6a2c31267171f75a82406 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 15 Mar 2018 16:43:35 +0200 Subject: Merge pull request #5431 from CyberSecutor/develop Added parenthesis check around "document" elements and fixed non-existent document.window filter to window.document --- system/core/Security.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 89a94c3dd..31926b466 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -134,7 +134,9 @@ class CI_Security { */ protected $_never_allowed_str = array( 'document.cookie' => '[removed]', + '(document).cookie' => '[removed]', 'document.write' => '[removed]', + '(document).write' => '[removed]', '.parentNode' => '[removed]', '.innerHTML' => '[removed]', '-moz-binding' => '[removed]', @@ -152,7 +154,7 @@ class CI_Security { */ protected $_never_allowed_regex = array( 'javascript\s*:', - '(document|(document\.)?window)\.(location|on\w*)', + '(\(?document\)?|\(?window\)?(\.document)?)\.(location|on\w*)', 'expression\s*(\(|&\#40;)', // CSS and IE 'vbscript\s*:', // IE, surprise! 'wscript\s*:', // IE @@ -861,7 +863,7 @@ class CI_Security { // For other tags, see if their attributes are "evil" and strip those elseif (isset($matches['attributes'])) { - // We'll store the already fitlered attributes here + // We'll store the already filtered attributes here $attributes = array(); // Attribute-catching pattern @@ -935,7 +937,7 @@ class CI_Security { return str_replace( $match[1], preg_replace( - '#href=.*?(?:(?:alert|prompt|confirm)(?:\(|&\#40;|`|&\#96;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes($match[1]) ), @@ -963,7 +965,7 @@ class CI_Security { return str_replace( $match[1], preg_replace( - '#src=.*?(?:(?:alert|prompt|confirm|eval)(?:\(|&\#40;|`|&\#96;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes($match[1]) ), -- cgit v1.2.3-24-g4f1b From bcce0a17f72c9550491a35e35555294943ff7fc1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 15 Mar 2018 16:48:51 +0200 Subject: [ci skip] Add a changelog entry for PR #5431 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 21f5aae44..647ea93a1 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,7 @@ Release Date: Not Released - Updated :doc:`URL Helper ` function :php:func:`auto_link()` to add ``rel="noopener"`` to generated links in order to prevent tab hijacking. - Updated :doc:`Security Library ` method ``xss_clean()`` to also filter JavaScript tag functions. + - Fixed a bug where :doc:`Security Library ` method ``xss_clean()`` didn't check for parentheses around JavaScript's ``document``. - General Changes -- cgit v1.2.3-24-g4f1b From cdf3a9a54fb240bc17fc681b02bd6327ac15d7d0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 15 Mar 2018 16:58:31 +0200 Subject: [ci skip] Merge pull request #5437 from MadGuyyy/develop Docs spelling fix: utlize -> utilize --- user_guide_src/source/database/query_builder.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 1b79c893a..38bc7fcff 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -654,7 +654,7 @@ will be reset (by default it will be--just like $this->db->insert()):: // Produces string: INSERT INTO mytable (`title`, `content`) VALUES ('My Title', 'My Content') The key thing to notice in the above example is that the second query did not -utlize `$this->db->from()` nor did it pass a table name into the first +utilize `$this->db->from()` nor did it pass a table name into the first parameter. The reason this worked is because the query has not been executed using `$this->db->insert()` which resets values or reset directly using `$this->db->reset_query()`. -- cgit v1.2.3-24-g4f1b From b12fbad77bd69ca0c7624a9094c29b7691ea6107 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 22 Mar 2018 16:44:41 +0200 Subject: [ci skip] Prepare 3.1.8 release --- system/core/CodeIgniter.php | 2 +- user_guide_src/source/changelog.rst | 2 +- user_guide_src/source/conf.py | 4 ++-- user_guide_src/source/installation/downloads.rst | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 4f81a98b6..4ad513dd6 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -55,7 +55,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @var string * */ - const CI_VERSION = '3.1.8-dev'; + const CI_VERSION = '3.1.8'; /* * ------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 647ea93a1..371b49529 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -5,7 +5,7 @@ Change Log Version 3.1.8 ============= -Release Date: Not Released +Release Date: Mar 22, 2018 - **Security** diff --git a/user_guide_src/source/conf.py b/user_guide_src/source/conf.py index e03c3168f..553669996 100644 --- a/user_guide_src/source/conf.py +++ b/user_guide_src/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2014 - 2018, British Columbia Institute of Technology' # built documents. # # The short X.Y version. -version = '3.1.8-dev' +version = '3.1.8' # The full version, including alpha/beta/rc tags. -release = '3.1.8-dev' +release = '3.1.8' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/user_guide_src/source/installation/downloads.rst b/user_guide_src/source/installation/downloads.rst index 03913159b..27675a13c 100644 --- a/user_guide_src/source/installation/downloads.rst +++ b/user_guide_src/source/installation/downloads.rst @@ -2,7 +2,7 @@ Downloading CodeIgniter ####################### -- `CodeIgniter v3.1.8-dev (Current version) `_ +- `CodeIgniter v3.1.8 (Current version) `_ - `CodeIgniter v3.1.7 `_ - `CodeIgniter v3.1.6 `_ - `CodeIgniter v3.1.5 `_ -- cgit v1.2.3-24-g4f1b From 71e647782764184e3aab4faffe6d99176758979f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 22 Mar 2018 16:48:55 +0200 Subject: [ci skip] 3.1.8 release --- .travis.yml | 57 - DCO.txt | 25 - build-release.sh | 99 - phpdoc.dist.xml | 21 - tests/Bootstrap.php | 76 - tests/README.md | 226 - tests/codeigniter/Setup_test.php | 13 - tests/codeigniter/core/Benchmark_test.php | 67 - tests/codeigniter/core/Common_test.php | 69 - tests/codeigniter/core/Config_test.php | 240 - tests/codeigniter/core/Input_test.php | 281 - tests/codeigniter/core/Lang_test.php | 101 - tests/codeigniter/core/Loader_test.php | 583 -- tests/codeigniter/core/Log_test.php | 63 - tests/codeigniter/core/Model_test.php | 37 - tests/codeigniter/core/Output_test.php | 63 - tests/codeigniter/core/Security_test.php | 353 - tests/codeigniter/core/URI_test.php | 254 - tests/codeigniter/core/Utf8_test.php | 91 - tests/codeigniter/core/compat/hash_test.php | 77 - tests/codeigniter/core/compat/mbstring_test.php | 54 - tests/codeigniter/core/compat/password_test.php | 159 - tests/codeigniter/core/compat/standard_test.php | 378 - tests/codeigniter/database/DB_driver_test.php | 39 - tests/codeigniter/database/DB_test.php | 61 - .../database/query_builder/count_test.php | 48 - .../database/query_builder/delete_test.php | 64 - .../database/query_builder/distinct_test.php | 33 - .../database/query_builder/empty_test.php | 39 - .../database/query_builder/escape_test.php | 68 - .../database/query_builder/from_test.php | 49 - .../database/query_builder/get_test.php | 53 - .../database/query_builder/group_test.php | 50 - .../database/query_builder/insert_test.php | 66 - .../database/query_builder/join_test.php | 101 - .../database/query_builder/like_test.php | 106 - .../database/query_builder/limit_test.php | 48 - .../database/query_builder/order_test.php | 55 - .../database/query_builder/select_test.php | 95 - .../database/query_builder/truncate_test.php | 56 - .../database/query_builder/update_test.php | 57 - .../database/query_builder/where_test.php | 134 - tests/codeigniter/helpers/array_helper_test.php | 45 - tests/codeigniter/helpers/captcha_helper_test.php | 10 - tests/codeigniter/helpers/cookie_helper_test.php | 59 - tests/codeigniter/helpers/date_helper_test.php | 325 - .../codeigniter/helpers/directory_helper_test.php | 59 - tests/codeigniter/helpers/download_helper_test.php | 10 - tests/codeigniter/helpers/email_helper_test.php | 24 - tests/codeigniter/helpers/file_helper_test.php | 147 - tests/codeigniter/helpers/form_helper_test.php | 290 - tests/codeigniter/helpers/html_helper_test.php | 106 - .../codeigniter/helpers/inflector_helper_test.php | 96 - tests/codeigniter/helpers/language_helper_test.php | 16 - tests/codeigniter/helpers/number_helper_test.php | 63 - tests/codeigniter/helpers/path_helper_test.php | 30 - tests/codeigniter/helpers/security_helper_test.php | 64 - tests/codeigniter/helpers/string_helper_test.php | 148 - tests/codeigniter/helpers/text_helper_test.php | 174 - tests/codeigniter/helpers/url_helper_test.php | 89 - tests/codeigniter/helpers/xml_helper_test.php | 15 - tests/codeigniter/libraries/Calendar_test.php | 222 - tests/codeigniter/libraries/Driver_test.php | 178 - tests/codeigniter/libraries/Encrypt_test.php | 79 - tests/codeigniter/libraries/Encryption_test.php | 400 - .../codeigniter/libraries/Form_validation_test.php | 626 -- tests/codeigniter/libraries/Parser_test.php | 95 - tests/codeigniter/libraries/Session_test.php | 440 - tests/codeigniter/libraries/Table_test.php | 300 - tests/codeigniter/libraries/Typography_test.php | 182 - tests/codeigniter/libraries/Upload_test.php | 299 - tests/codeigniter/libraries/Useragent_test.php | 125 - tests/mocks/autoloader.php | 119 - tests/mocks/ci_testcase.php | 384 - tests/mocks/ci_testconfig.php | 20 - tests/mocks/core/common.php | 153 - tests/mocks/core/input.php | 49 - tests/mocks/core/security.php | 35 - tests/mocks/core/uri.php | 32 - tests/mocks/core/utf8.php | 19 - tests/mocks/database/ci_test.sqlite | Bin 19456 -> 0 bytes tests/mocks/database/config/mysql.php | 34 - tests/mocks/database/config/mysqli.php | 34 - tests/mocks/database/config/pdo/mysql.php | 37 - tests/mocks/database/config/pdo/pgsql.php | 37 - tests/mocks/database/config/pdo/sqlite.php | 37 - tests/mocks/database/config/pgsql.php | 34 - tests/mocks/database/config/sqlite.php | 34 - tests/mocks/database/db.php | 142 - tests/mocks/database/db/driver.php | 40 - tests/mocks/database/drivers/mysql.php | 16 - tests/mocks/database/drivers/mysqli.php | 16 - tests/mocks/database/drivers/pdo.php | 15 - tests/mocks/database/drivers/postgre.php | 16 - tests/mocks/database/drivers/sqlite.php | 16 - tests/mocks/database/schema/skeleton.php | 155 - tests/mocks/libraries/driver.php | 27 - tests/mocks/libraries/encrypt.php | 16 - tests/mocks/libraries/encryption.php | 39 - tests/mocks/libraries/session.php | 38 - tests/mocks/libraries/table.php | 16 - tests/mocks/uploads/ci_logo.gif | Bin 3270 -> 0 bytes tests/phpunit.xml | 24 - tests/travis/mysql.phpunit.xml | 25 - tests/travis/mysqli.phpunit.xml | 25 - tests/travis/pdo/mysql.phpunit.xml | 25 - tests/travis/pdo/pgsql.phpunit.xml | 25 - tests/travis/pdo/sqlite.phpunit.xml | 25 - tests/travis/pgsql.phpunit.xml | 25 - tests/travis/sqlite.phpunit.xml | 25 - user_guide/.buildinfo | 4 + user_guide/DCO.html | 517 + user_guide/_downloads/ELDocs.tmbundle.zip | Bin 0 -> 3932 bytes user_guide/_images/appflowchart.gif | Bin 0 -> 25276 bytes user_guide/_images/smile.gif | Bin 0 -> 1156 bytes user_guide/_static/ajax-loader.gif | Bin 0 -> 673 bytes user_guide/_static/basic.css | 639 ++ user_guide/_static/ci-icon.ico | Bin 0 -> 5430 bytes user_guide/_static/comment-bright.png | Bin 0 -> 756 bytes user_guide/_static/comment-close.png | Bin 0 -> 829 bytes user_guide/_static/comment.png | Bin 0 -> 641 bytes user_guide/_static/css/badge_only.css | 2 + user_guide/_static/css/citheme.css | 88 + user_guide/_static/css/theme.css | 5 + user_guide/_static/doctools.js | 287 + user_guide/_static/down-pressed.png | Bin 0 -> 222 bytes user_guide/_static/down.png | Bin 0 -> 202 bytes user_guide/_static/file.png | Bin 0 -> 286 bytes user_guide/_static/fonts/FontAwesome.otf | Bin 0 -> 62856 bytes user_guide/_static/fonts/fontawesome-webfont.eot | Bin 0 -> 38205 bytes user_guide/_static/fonts/fontawesome-webfont.svg | 414 + user_guide/_static/fonts/fontawesome-webfont.ttf | Bin 0 -> 80652 bytes user_guide/_static/fonts/fontawesome-webfont.woff | Bin 0 -> 44432 bytes user_guide/_static/images/ci-icon.ico | Bin 0 -> 1150 bytes user_guide/_static/jquery-3.1.0.js | 10074 +++++++++++++++++++ user_guide/_static/jquery.js | 4 + user_guide/_static/js/oldtheme.js | 47 + user_guide/_static/js/theme.js | 131 + user_guide/_static/minus.png | Bin 0 -> 90 bytes user_guide/_static/plus.png | Bin 0 -> 90 bytes user_guide/_static/pygments.css | 63 + user_guide/_static/searchtools.js | 758 ++ user_guide/_static/underscore-1.3.1.js | 999 ++ user_guide/_static/underscore.js | 31 + user_guide/_static/up-pressed.png | Bin 0 -> 214 bytes user_guide/_static/up.png | Bin 0 -> 203 bytes user_guide/_static/websupport.js | 808 ++ user_guide/changelog.html | 4183 ++++++++ user_guide/contributing/index.html | 615 ++ user_guide/database/caching.html | 642 ++ user_guide/database/call_function.html | 529 + user_guide/database/configuration.html | 758 ++ user_guide/database/connecting.html | 641 ++ user_guide/database/db_driver_reference.html | 1483 +++ user_guide/database/examples.html | 597 ++ user_guide/database/forge.html | 1034 ++ user_guide/database/helpers.html | 592 ++ user_guide/database/index.html | 514 + user_guide/database/metadata.html | 614 ++ user_guide/database/queries.html | 658 ++ user_guide/database/query_builder.html | 2714 +++++ user_guide/database/results.html | 1231 +++ user_guide/database/transactions.html | 615 ++ user_guide/database/utilities.html | 993 ++ user_guide/documentation/index.html | 702 ++ user_guide/general/alternative_php.html | 566 ++ user_guide/general/ancillary_classes.html | 578 ++ user_guide/general/autoloader.html | 519 + user_guide/general/caching.html | 563 ++ user_guide/general/cli.html | 573 ++ user_guide/general/common_functions.html | 776 ++ user_guide/general/compatibility_functions.html | 914 ++ user_guide/general/controllers.html | 845 ++ user_guide/general/core_classes.html | 607 ++ user_guide/general/creating_drivers.html | 524 + user_guide/general/creating_libraries.html | 754 ++ user_guide/general/credits.html | 502 + user_guide/general/drivers.html | 530 + user_guide/general/environments.html | 538 + user_guide/general/errors.html | 649 ++ user_guide/general/helpers.html | 629 ++ user_guide/general/hooks.html | 617 ++ user_guide/general/index.html | 523 + user_guide/general/libraries.html | 521 + user_guide/general/managing_apps.html | 554 + user_guide/general/models.html | 673 ++ user_guide/general/profiling.html | 624 ++ user_guide/general/requirements.html | 511 + user_guide/general/reserved_names.html | 583 ++ user_guide/general/routing.html | 689 ++ user_guide/general/security.html | 663 ++ user_guide/general/styleguide.html | 1128 +++ user_guide/general/urls.html | 597 ++ user_guide/general/views.html | 704 ++ user_guide/general/welcome.html | 520 + user_guide/genindex.html | 1935 ++++ user_guide/helpers/array_helper.html | 660 ++ user_guide/helpers/captcha_helper.html | 676 ++ user_guide/helpers/cookie_helper.html | 608 ++ user_guide/helpers/date_helper.html | 1256 +++ user_guide/helpers/directory_helper.html | 587 ++ user_guide/helpers/download_helper.html | 556 + user_guide/helpers/email_helper.html | 598 ++ user_guide/helpers/file_helper.html | 829 ++ user_guide/helpers/form_helper.html | 1598 +++ user_guide/helpers/html_helper.html | 1091 ++ user_guide/helpers/index.html | 518 + user_guide/helpers/inflector_helper.html | 680 ++ user_guide/helpers/language_helper.html | 550 + user_guide/helpers/number_helper.html | 559 + user_guide/helpers/path_helper.html | 557 + user_guide/helpers/security_helper.html | 669 ++ user_guide/helpers/smiley_helper.html | 708 ++ user_guide/helpers/string_helper.html | 873 ++ user_guide/helpers/text_helper.html | 847 ++ user_guide/helpers/typography_helper.html | 607 ++ user_guide/helpers/url_helper.html | 1044 ++ user_guide/helpers/xml_helper.html | 559 + user_guide/index.html | 712 ++ user_guide/installation/downloads.html | 535 + user_guide/installation/index.html | 532 + user_guide/installation/troubleshooting.html | 511 + user_guide/installation/upgrade_120.html | 516 + user_guide/installation/upgrade_130.html | 619 ++ user_guide/installation/upgrade_131.html | 527 + user_guide/installation/upgrade_132.html | 525 + user_guide/installation/upgrade_133.html | 539 + user_guide/installation/upgrade_140.html | 567 ++ user_guide/installation/upgrade_141.html | 564 ++ user_guide/installation/upgrade_150.html | 591 ++ user_guide/installation/upgrade_152.html | 536 + user_guide/installation/upgrade_153.html | 523 + user_guide/installation/upgrade_154.html | 547 + user_guide/installation/upgrade_160.html | 566 ++ user_guide/installation/upgrade_161.html | 522 + user_guide/installation/upgrade_162.html | 537 + user_guide/installation/upgrade_163.html | 522 + user_guide/installation/upgrade_170.html | 549 + user_guide/installation/upgrade_171.html | 522 + user_guide/installation/upgrade_172.html | 539 + user_guide/installation/upgrade_200.html | 632 ++ user_guide/installation/upgrade_201.html | 532 + user_guide/installation/upgrade_202.html | 525 + user_guide/installation/upgrade_203.html | 555 + user_guide/installation/upgrade_210.html | 519 + user_guide/installation/upgrade_211.html | 523 + user_guide/installation/upgrade_212.html | 514 + user_guide/installation/upgrade_213.html | 514 + user_guide/installation/upgrade_214.html | 509 + user_guide/installation/upgrade_220.html | 518 + user_guide/installation/upgrade_221.html | 509 + user_guide/installation/upgrade_222.html | 509 + user_guide/installation/upgrade_223.html | 509 + user_guide/installation/upgrade_300.html | 1330 +++ user_guide/installation/upgrade_301.html | 513 + user_guide/installation/upgrade_302.html | 520 + user_guide/installation/upgrade_303.html | 547 + user_guide/installation/upgrade_304.html | 509 + user_guide/installation/upgrade_305.html | 509 + user_guide/installation/upgrade_306.html | 539 + user_guide/installation/upgrade_310.html | 527 + user_guide/installation/upgrade_311.html | 509 + user_guide/installation/upgrade_312.html | 534 + user_guide/installation/upgrade_313.html | 539 + user_guide/installation/upgrade_314.html | 509 + user_guide/installation/upgrade_315.html | 509 + user_guide/installation/upgrade_316.html | 523 + user_guide/installation/upgrade_317.html | 522 + user_guide/installation/upgrade_318.html | 509 + user_guide/installation/upgrade_b11.html | 567 ++ user_guide/installation/upgrading.html | 550 + user_guide/libraries/benchmark.html | 703 ++ user_guide/libraries/caching.html | 895 ++ user_guide/libraries/calendar.html | 972 ++ user_guide/libraries/cart.html | 1025 ++ user_guide/libraries/config.html | 834 ++ user_guide/libraries/email.html | 1218 +++ user_guide/libraries/encrypt.html | 787 ++ user_guide/libraries/encryption.html | 1405 +++ user_guide/libraries/file_uploading.html | 1025 ++ user_guide/libraries/form_validation.html | 1932 ++++ user_guide/libraries/ftp.html | 1016 ++ user_guide/libraries/image_lib.html | 1255 +++ user_guide/libraries/index.html | 527 + user_guide/libraries/input.html | 1191 +++ user_guide/libraries/javascript.html | 802 ++ user_guide/libraries/language.html | 733 ++ user_guide/libraries/loader.html | 1213 +++ user_guide/libraries/migration.html | 758 ++ user_guide/libraries/output.html | 912 ++ user_guide/libraries/pagination.html | 784 ++ user_guide/libraries/parser.html | 850 ++ user_guide/libraries/security.html | 739 ++ user_guide/libraries/sessions.html | 1922 ++++ user_guide/libraries/table.html | 911 ++ user_guide/libraries/trackback.html | 1035 ++ user_guide/libraries/typography.html | 657 ++ user_guide/libraries/unit_testing.html | 846 ++ user_guide/libraries/uri.html | 890 ++ user_guide/libraries/user_agent.html | 931 ++ user_guide/libraries/xmlrpc.html | 1151 +++ user_guide/libraries/zip.html | 846 ++ user_guide/license.html | 509 + user_guide/objects.inv | Bin 0 -> 7332 bytes user_guide/overview/appflow.html | 513 + user_guide/overview/at_a_glance.html | 599 ++ user_guide/overview/features.html | 538 + user_guide/overview/getting_started.html | 512 + user_guide/overview/goals.html | 522 + user_guide/overview/index.html | 504 + user_guide/overview/mvc.html | 519 + user_guide/search.html | 499 + user_guide/searchindex.js | 1 + user_guide/tutorial/conclusion.html | 515 + user_guide/tutorial/create_news_items.html | 629 ++ user_guide/tutorial/index.html | 525 + user_guide/tutorial/news_section.html | 685 ++ user_guide/tutorial/static_pages.html | 633 ++ user_guide_src/Makefile | 130 - user_guide_src/README.rst | 65 - user_guide_src/cilexer/README | 22 - user_guide_src/cilexer/cilexer/__init__.py | 1 - user_guide_src/cilexer/cilexer/cilexer.py | 56 - user_guide_src/cilexer/setup.py | 23 - user_guide_src/source/DCO.rst | 27 - .../source/_themes/sphinx_rtd_theme/LICENSE | 20 - .../source/_themes/sphinx_rtd_theme/__init__.py | 17 - .../_themes/sphinx_rtd_theme/breadcrumbs.html | 22 - .../source/_themes/sphinx_rtd_theme/footer.html | 33 - .../source/_themes/sphinx_rtd_theme/layout.html | 166 - .../_themes/sphinx_rtd_theme/layout_old.html | 205 - .../source/_themes/sphinx_rtd_theme/pulldown.html | 17 - .../source/_themes/sphinx_rtd_theme/search.html | 50 - .../source/_themes/sphinx_rtd_theme/searchbox.html | 9 - .../sphinx_rtd_theme/static/css/badge_only.css | 2 - .../sphinx_rtd_theme/static/css/citheme.css | 88 - .../_themes/sphinx_rtd_theme/static/css/theme.css | 5 - .../sphinx_rtd_theme/static/fonts/FontAwesome.otf | Bin 62856 -> 0 bytes .../static/fonts/fontawesome-webfont.eot | Bin 38205 -> 0 bytes .../static/fonts/fontawesome-webfont.svg | 414 - .../static/fonts/fontawesome-webfont.ttf | Bin 80652 -> 0 bytes .../static/fonts/fontawesome-webfont.woff | Bin 44432 -> 0 bytes .../sphinx_rtd_theme/static/images/ci-icon.ico | Bin 1150 -> 0 bytes .../_themes/sphinx_rtd_theme/static/js/oldtheme.js | 47 - .../_themes/sphinx_rtd_theme/static/js/theme.js | 131 - .../source/_themes/sphinx_rtd_theme/theme.conf | 8 - .../source/_themes/sphinx_rtd_theme/versions.html | 37 - user_guide_src/source/changelog.rst | 3623 ------- user_guide_src/source/conf.py | 263 - user_guide_src/source/contributing/index.rst | 159 - user_guide_src/source/database/caching.rst | 162 - user_guide_src/source/database/call_function.rst | 39 - user_guide_src/source/database/configuration.rst | 207 - user_guide_src/source/database/connecting.rst | 155 - .../source/database/db_driver_reference.rst | 439 - user_guide_src/source/database/examples.rst | 119 - user_guide_src/source/database/forge.rst | 412 - user_guide_src/source/database/helpers.rst | 100 - user_guide_src/source/database/index.rst | 25 - user_guide_src/source/database/metadata.rst | 130 - user_guide_src/source/database/queries.rst | 176 - user_guide_src/source/database/query_builder.rst | 1570 --- user_guide_src/source/database/results.rst | 507 - user_guide_src/source/database/transactions.rst | 127 - user_guide_src/source/database/utilities.rst | 316 - .../source/documentation/ELDocs.tmbundle.zip | Bin 3932 -> 0 bytes user_guide_src/source/documentation/index.rst | 202 - user_guide_src/source/general/alternative_php.rst | 75 - .../source/general/ancillary_classes.rst | 80 - user_guide_src/source/general/autoloader.rst | 27 - user_guide_src/source/general/caching.rst | 71 - user_guide_src/source/general/cli.rst | 78 - user_guide_src/source/general/common_functions.rst | 188 - .../source/general/compatibility_functions.rst | 232 - user_guide_src/source/general/controllers.rst | 340 - user_guide_src/source/general/core_classes.rst | 117 - user_guide_src/source/general/creating_drivers.rst | 25 - .../source/general/creating_libraries.rst | 260 - user_guide_src/source/general/credits.rst | 22 - user_guide_src/source/general/drivers.rst | 40 - user_guide_src/source/general/environments.rst | 52 - user_guide_src/source/general/errors.rst | 120 - user_guide_src/source/general/helpers.rst | 145 - user_guide_src/source/general/hooks.rst | 127 - user_guide_src/source/general/index.rst | 33 - user_guide_src/source/general/libraries.rst | 32 - user_guide_src/source/general/managing_apps.rst | 61 - user_guide_src/source/general/models.rst | 167 - user_guide_src/source/general/profiling.rst | 90 - user_guide_src/source/general/requirements.rst | 21 - user_guide_src/source/general/reserved_names.rst | 88 - user_guide_src/source/general/routing.rst | 207 - user_guide_src/source/general/security.rst | 200 - user_guide_src/source/general/styleguide.rst | 636 -- user_guide_src/source/general/urls.rst | 100 - user_guide_src/source/general/views.rst | 213 - user_guide_src/source/general/welcome.rst | 32 - user_guide_src/source/helpers/array_helper.rst | 133 - user_guide_src/source/helpers/captcha_helper.rst | 168 - user_guide_src/source/helpers/cookie_helper.rst | 79 - user_guide_src/source/helpers/date_helper.rst | 440 - user_guide_src/source/helpers/directory_helper.rst | 83 - user_guide_src/source/helpers/download_helper.rst | 56 - user_guide_src/source/helpers/email_helper.rst | 75 - user_guide_src/source/helpers/file_helper.rst | 202 - user_guide_src/source/helpers/form_helper.rst | 743 -- user_guide_src/source/helpers/html_helper.rst | 407 - user_guide_src/source/helpers/index.rst | 9 - user_guide_src/source/helpers/inflector_helper.rst | 96 - user_guide_src/source/helpers/language_helper.rst | 46 - user_guide_src/source/helpers/number_helper.rst | 52 - user_guide_src/source/helpers/path_helper.rst | 53 - user_guide_src/source/helpers/security_helper.rst | 106 - user_guide_src/source/helpers/smiley_helper.rst | 169 - user_guide_src/source/helpers/string_helper.rst | 223 - user_guide_src/source/helpers/text_helper.rst | 230 - .../source/helpers/typography_helper.rst | 75 - user_guide_src/source/helpers/url_helper.rst | 373 - user_guide_src/source/helpers/xml_helper.rst | 55 - user_guide_src/source/images/appflowchart.gif | Bin 25276 -> 0 bytes user_guide_src/source/images/arrow.gif | Bin 123 -> 0 bytes user_guide_src/source/images/ci-icon.ico | Bin 5430 -> 0 bytes user_guide_src/source/images/ci_logo.jpg | Bin 5602 -> 0 bytes user_guide_src/source/images/ci_logo_flame.jpg | Bin 8589 -> 0 bytes user_guide_src/source/images/file.gif | Bin 370 -> 0 bytes user_guide_src/source/images/folder.gif | Bin 570 -> 0 bytes user_guide_src/source/images/smile.gif | Bin 1156 -> 0 bytes user_guide_src/source/index.rst | 122 - user_guide_src/source/installation/downloads.rst | 45 - user_guide_src/source/installation/index.rst | 57 - .../source/installation/troubleshooting.rst | 18 - user_guide_src/source/installation/upgrade_120.rst | 20 - user_guide_src/source/installation/upgrade_130.rst | 125 - user_guide_src/source/installation/upgrade_131.rst | 30 - user_guide_src/source/installation/upgrade_132.rst | 28 - user_guide_src/source/installation/upgrade_133.rst | 44 - user_guide_src/source/installation/upgrade_140.rst | 72 - user_guide_src/source/installation/upgrade_141.rst | 71 - user_guide_src/source/installation/upgrade_150.rst | 100 - user_guide_src/source/installation/upgrade_152.rst | 39 - user_guide_src/source/installation/upgrade_153.rst | 28 - user_guide_src/source/installation/upgrade_154.rst | 56 - user_guide_src/source/installation/upgrade_160.rst | 87 - user_guide_src/source/installation/upgrade_161.rst | 27 - user_guide_src/source/installation/upgrade_162.rst | 45 - user_guide_src/source/installation/upgrade_163.rst | 27 - user_guide_src/source/installation/upgrade_170.rst | 56 - user_guide_src/source/installation/upgrade_171.rst | 27 - user_guide_src/source/installation/upgrade_172.rst | 48 - user_guide_src/source/installation/upgrade_200.rst | 148 - user_guide_src/source/installation/upgrade_201.rst | 39 - user_guide_src/source/installation/upgrade_202.rst | 33 - user_guide_src/source/installation/upgrade_203.rst | 63 - user_guide_src/source/installation/upgrade_210.rst | 26 - user_guide_src/source/installation/upgrade_211.rst | 31 - user_guide_src/source/installation/upgrade_212.rst | 20 - user_guide_src/source/installation/upgrade_213.rst | 20 - user_guide_src/source/installation/upgrade_214.rst | 14 - user_guide_src/source/installation/upgrade_220.rst | 21 - user_guide_src/source/installation/upgrade_221.rst | 14 - user_guide_src/source/installation/upgrade_222.rst | 14 - user_guide_src/source/installation/upgrade_223.rst | 14 - user_guide_src/source/installation/upgrade_300.rst | 891 -- user_guide_src/source/installation/upgrade_301.rst | 19 - user_guide_src/source/installation/upgrade_302.rst | 24 - user_guide_src/source/installation/upgrade_303.rst | 55 - user_guide_src/source/installation/upgrade_304.rst | 14 - user_guide_src/source/installation/upgrade_305.rst | 14 - user_guide_src/source/installation/upgrade_306.rst | 48 - user_guide_src/source/installation/upgrade_310.rst | 38 - user_guide_src/source/installation/upgrade_311.rst | 14 - user_guide_src/source/installation/upgrade_312.rst | 40 - user_guide_src/source/installation/upgrade_313.rst | 46 - user_guide_src/source/installation/upgrade_314.rst | 14 - user_guide_src/source/installation/upgrade_315.rst | 14 - user_guide_src/source/installation/upgrade_316.rst | 28 - user_guide_src/source/installation/upgrade_317.rst | 27 - user_guide_src/source/installation/upgrade_318.rst | 14 - user_guide_src/source/installation/upgrade_b11.rst | 78 - user_guide_src/source/installation/upgrading.rst | 58 - user_guide_src/source/libraries/benchmark.rst | 168 - user_guide_src/source/libraries/caching.rst | 279 - user_guide_src/source/libraries/calendar.rst | 307 - user_guide_src/source/libraries/cart.rst | 398 - user_guide_src/source/libraries/config.rst | 252 - user_guide_src/source/libraries/email.rst | 405 - user_guide_src/source/libraries/encrypt.rst | 198 - user_guide_src/source/libraries/encryption.rst | 585 -- user_guide_src/source/libraries/file_uploading.rst | 355 - .../source/libraries/form_validation.rst | 1143 --- user_guide_src/source/libraries/ftp.rst | 306 - user_guide_src/source/libraries/image_lib.rst | 475 - user_guide_src/source/libraries/index.rst | 9 - user_guide_src/source/libraries/input.rst | 474 - user_guide_src/source/libraries/javascript.rst | 322 - user_guide_src/source/libraries/language.rst | 210 - user_guide_src/source/libraries/loader.rst | 461 - user_guide_src/source/libraries/migration.rst | 184 - user_guide_src/source/libraries/output.rst | 233 - user_guide_src/source/libraries/pagination.rst | 314 - user_guide_src/source/libraries/parser.rst | 309 - user_guide_src/source/libraries/security.rst | 172 - user_guide_src/source/libraries/sessions.rst | 1062 -- user_guide_src/source/libraries/table.rst | 297 - user_guide_src/source/libraries/trackback.rst | 339 - user_guide_src/source/libraries/typography.rst | 107 - user_guide_src/source/libraries/unit_testing.rst | 245 - user_guide_src/source/libraries/uri.rst | 233 - user_guide_src/source/libraries/user_agent.rst | 248 - user_guide_src/source/libraries/xmlrpc.rst | 582 -- user_guide_src/source/libraries/zip.rst | 243 - user_guide_src/source/license.rst | 23 - user_guide_src/source/overview/appflow.rst | 23 - user_guide_src/source/overview/at_a_glance.rst | 114 - user_guide_src/source/overview/features.rst | 46 - user_guide_src/source/overview/getting_started.rst | 24 - user_guide_src/source/overview/goals.rst | 32 - user_guide_src/source/overview/index.rst | 15 - user_guide_src/source/overview/mvc.rst | 27 - user_guide_src/source/tutorial/conclusion.rst | 26 - .../source/tutorial/create_news_items.rst | 153 - user_guide_src/source/tutorial/index.rst | 46 - user_guide_src/source/tutorial/news_section.rst | 218 - user_guide_src/source/tutorial/static_pages.rst | 170 - 524 files changed, 139227 insertions(+), 44109 deletions(-) delete mode 100644 .travis.yml delete mode 100644 DCO.txt delete mode 100755 build-release.sh delete mode 100644 phpdoc.dist.xml delete mode 100644 tests/Bootstrap.php delete mode 100644 tests/README.md delete mode 100644 tests/codeigniter/Setup_test.php delete mode 100644 tests/codeigniter/core/Benchmark_test.php delete mode 100644 tests/codeigniter/core/Common_test.php delete mode 100644 tests/codeigniter/core/Config_test.php delete mode 100644 tests/codeigniter/core/Input_test.php delete mode 100644 tests/codeigniter/core/Lang_test.php delete mode 100644 tests/codeigniter/core/Loader_test.php delete mode 100644 tests/codeigniter/core/Log_test.php delete mode 100644 tests/codeigniter/core/Model_test.php delete mode 100644 tests/codeigniter/core/Output_test.php delete mode 100644 tests/codeigniter/core/Security_test.php delete mode 100644 tests/codeigniter/core/URI_test.php delete mode 100644 tests/codeigniter/core/Utf8_test.php delete mode 100644 tests/codeigniter/core/compat/hash_test.php delete mode 100644 tests/codeigniter/core/compat/mbstring_test.php delete mode 100644 tests/codeigniter/core/compat/password_test.php delete mode 100644 tests/codeigniter/core/compat/standard_test.php delete mode 100644 tests/codeigniter/database/DB_driver_test.php delete mode 100644 tests/codeigniter/database/DB_test.php delete mode 100644 tests/codeigniter/database/query_builder/count_test.php delete mode 100644 tests/codeigniter/database/query_builder/delete_test.php delete mode 100644 tests/codeigniter/database/query_builder/distinct_test.php delete mode 100644 tests/codeigniter/database/query_builder/empty_test.php delete mode 100644 tests/codeigniter/database/query_builder/escape_test.php delete mode 100644 tests/codeigniter/database/query_builder/from_test.php delete mode 100644 tests/codeigniter/database/query_builder/get_test.php delete mode 100644 tests/codeigniter/database/query_builder/group_test.php delete mode 100644 tests/codeigniter/database/query_builder/insert_test.php delete mode 100644 tests/codeigniter/database/query_builder/join_test.php delete mode 100644 tests/codeigniter/database/query_builder/like_test.php delete mode 100644 tests/codeigniter/database/query_builder/limit_test.php delete mode 100644 tests/codeigniter/database/query_builder/order_test.php delete mode 100644 tests/codeigniter/database/query_builder/select_test.php delete mode 100644 tests/codeigniter/database/query_builder/truncate_test.php delete mode 100644 tests/codeigniter/database/query_builder/update_test.php delete mode 100644 tests/codeigniter/database/query_builder/where_test.php delete mode 100644 tests/codeigniter/helpers/array_helper_test.php delete mode 100644 tests/codeigniter/helpers/captcha_helper_test.php delete mode 100644 tests/codeigniter/helpers/cookie_helper_test.php delete mode 100644 tests/codeigniter/helpers/date_helper_test.php delete mode 100644 tests/codeigniter/helpers/directory_helper_test.php delete mode 100644 tests/codeigniter/helpers/download_helper_test.php delete mode 100644 tests/codeigniter/helpers/email_helper_test.php delete mode 100644 tests/codeigniter/helpers/file_helper_test.php delete mode 100644 tests/codeigniter/helpers/form_helper_test.php delete mode 100644 tests/codeigniter/helpers/html_helper_test.php delete mode 100644 tests/codeigniter/helpers/inflector_helper_test.php delete mode 100644 tests/codeigniter/helpers/language_helper_test.php delete mode 100644 tests/codeigniter/helpers/number_helper_test.php delete mode 100644 tests/codeigniter/helpers/path_helper_test.php delete mode 100644 tests/codeigniter/helpers/security_helper_test.php delete mode 100644 tests/codeigniter/helpers/string_helper_test.php delete mode 100644 tests/codeigniter/helpers/text_helper_test.php delete mode 100644 tests/codeigniter/helpers/url_helper_test.php delete mode 100644 tests/codeigniter/helpers/xml_helper_test.php delete mode 100644 tests/codeigniter/libraries/Calendar_test.php delete mode 100644 tests/codeigniter/libraries/Driver_test.php delete mode 100644 tests/codeigniter/libraries/Encrypt_test.php delete mode 100644 tests/codeigniter/libraries/Encryption_test.php delete mode 100644 tests/codeigniter/libraries/Form_validation_test.php delete mode 100644 tests/codeigniter/libraries/Parser_test.php delete mode 100644 tests/codeigniter/libraries/Session_test.php delete mode 100644 tests/codeigniter/libraries/Table_test.php delete mode 100644 tests/codeigniter/libraries/Typography_test.php delete mode 100644 tests/codeigniter/libraries/Upload_test.php delete mode 100644 tests/codeigniter/libraries/Useragent_test.php delete mode 100644 tests/mocks/autoloader.php delete mode 100644 tests/mocks/ci_testcase.php delete mode 100644 tests/mocks/ci_testconfig.php delete mode 100644 tests/mocks/core/common.php delete mode 100644 tests/mocks/core/input.php delete mode 100644 tests/mocks/core/security.php delete mode 100644 tests/mocks/core/uri.php delete mode 100644 tests/mocks/core/utf8.php delete mode 100755 tests/mocks/database/ci_test.sqlite delete mode 100644 tests/mocks/database/config/mysql.php delete mode 100644 tests/mocks/database/config/mysqli.php delete mode 100644 tests/mocks/database/config/pdo/mysql.php delete mode 100644 tests/mocks/database/config/pdo/pgsql.php delete mode 100644 tests/mocks/database/config/pdo/sqlite.php delete mode 100644 tests/mocks/database/config/pgsql.php delete mode 100644 tests/mocks/database/config/sqlite.php delete mode 100644 tests/mocks/database/db.php delete mode 100644 tests/mocks/database/db/driver.php delete mode 100644 tests/mocks/database/drivers/mysql.php delete mode 100644 tests/mocks/database/drivers/mysqli.php delete mode 100644 tests/mocks/database/drivers/pdo.php delete mode 100644 tests/mocks/database/drivers/postgre.php delete mode 100644 tests/mocks/database/drivers/sqlite.php delete mode 100644 tests/mocks/database/schema/skeleton.php delete mode 100644 tests/mocks/libraries/driver.php delete mode 100644 tests/mocks/libraries/encrypt.php delete mode 100644 tests/mocks/libraries/encryption.php delete mode 100644 tests/mocks/libraries/session.php delete mode 100644 tests/mocks/libraries/table.php delete mode 100644 tests/mocks/uploads/ci_logo.gif delete mode 100644 tests/phpunit.xml delete mode 100644 tests/travis/mysql.phpunit.xml delete mode 100644 tests/travis/mysqli.phpunit.xml delete mode 100644 tests/travis/pdo/mysql.phpunit.xml delete mode 100644 tests/travis/pdo/pgsql.phpunit.xml delete mode 100644 tests/travis/pdo/sqlite.phpunit.xml delete mode 100644 tests/travis/pgsql.phpunit.xml delete mode 100644 tests/travis/sqlite.phpunit.xml create mode 100644 user_guide/.buildinfo create mode 100644 user_guide/DCO.html create mode 100644 user_guide/_downloads/ELDocs.tmbundle.zip create mode 100644 user_guide/_images/appflowchart.gif create mode 100644 user_guide/_images/smile.gif create mode 100644 user_guide/_static/ajax-loader.gif create mode 100644 user_guide/_static/basic.css create mode 100644 user_guide/_static/ci-icon.ico create mode 100644 user_guide/_static/comment-bright.png create mode 100644 user_guide/_static/comment-close.png create mode 100644 user_guide/_static/comment.png create mode 100644 user_guide/_static/css/badge_only.css create mode 100644 user_guide/_static/css/citheme.css create mode 100644 user_guide/_static/css/theme.css create mode 100644 user_guide/_static/doctools.js create mode 100644 user_guide/_static/down-pressed.png create mode 100644 user_guide/_static/down.png create mode 100644 user_guide/_static/file.png create mode 100644 user_guide/_static/fonts/FontAwesome.otf create mode 100644 user_guide/_static/fonts/fontawesome-webfont.eot create mode 100644 user_guide/_static/fonts/fontawesome-webfont.svg create mode 100644 user_guide/_static/fonts/fontawesome-webfont.ttf create mode 100644 user_guide/_static/fonts/fontawesome-webfont.woff create mode 100644 user_guide/_static/images/ci-icon.ico create mode 100644 user_guide/_static/jquery-3.1.0.js create mode 100644 user_guide/_static/jquery.js create mode 100644 user_guide/_static/js/oldtheme.js create mode 100644 user_guide/_static/js/theme.js create mode 100644 user_guide/_static/minus.png create mode 100644 user_guide/_static/plus.png create mode 100644 user_guide/_static/pygments.css create mode 100644 user_guide/_static/searchtools.js create mode 100644 user_guide/_static/underscore-1.3.1.js create mode 100644 user_guide/_static/underscore.js create mode 100644 user_guide/_static/up-pressed.png create mode 100644 user_guide/_static/up.png create mode 100644 user_guide/_static/websupport.js create mode 100644 user_guide/changelog.html create mode 100644 user_guide/contributing/index.html create mode 100644 user_guide/database/caching.html create mode 100644 user_guide/database/call_function.html create mode 100644 user_guide/database/configuration.html create mode 100644 user_guide/database/connecting.html create mode 100644 user_guide/database/db_driver_reference.html create mode 100644 user_guide/database/examples.html create mode 100644 user_guide/database/forge.html create mode 100644 user_guide/database/helpers.html create mode 100644 user_guide/database/index.html create mode 100644 user_guide/database/metadata.html create mode 100644 user_guide/database/queries.html create mode 100644 user_guide/database/query_builder.html create mode 100644 user_guide/database/results.html create mode 100644 user_guide/database/transactions.html create mode 100644 user_guide/database/utilities.html create mode 100644 user_guide/documentation/index.html create mode 100644 user_guide/general/alternative_php.html create mode 100644 user_guide/general/ancillary_classes.html create mode 100644 user_guide/general/autoloader.html create mode 100644 user_guide/general/caching.html create mode 100644 user_guide/general/cli.html create mode 100644 user_guide/general/common_functions.html create mode 100644 user_guide/general/compatibility_functions.html create mode 100644 user_guide/general/controllers.html create mode 100644 user_guide/general/core_classes.html create mode 100644 user_guide/general/creating_drivers.html create mode 100644 user_guide/general/creating_libraries.html create mode 100644 user_guide/general/credits.html create mode 100644 user_guide/general/drivers.html create mode 100644 user_guide/general/environments.html create mode 100644 user_guide/general/errors.html create mode 100644 user_guide/general/helpers.html create mode 100644 user_guide/general/hooks.html create mode 100644 user_guide/general/index.html create mode 100644 user_guide/general/libraries.html create mode 100644 user_guide/general/managing_apps.html create mode 100644 user_guide/general/models.html create mode 100644 user_guide/general/profiling.html create mode 100644 user_guide/general/requirements.html create mode 100644 user_guide/general/reserved_names.html create mode 100644 user_guide/general/routing.html create mode 100644 user_guide/general/security.html create mode 100644 user_guide/general/styleguide.html create mode 100644 user_guide/general/urls.html create mode 100644 user_guide/general/views.html create mode 100644 user_guide/general/welcome.html create mode 100644 user_guide/genindex.html create mode 100644 user_guide/helpers/array_helper.html create mode 100644 user_guide/helpers/captcha_helper.html create mode 100644 user_guide/helpers/cookie_helper.html create mode 100644 user_guide/helpers/date_helper.html create mode 100644 user_guide/helpers/directory_helper.html create mode 100644 user_guide/helpers/download_helper.html create mode 100644 user_guide/helpers/email_helper.html create mode 100644 user_guide/helpers/file_helper.html create mode 100644 user_guide/helpers/form_helper.html create mode 100644 user_guide/helpers/html_helper.html create mode 100644 user_guide/helpers/index.html create mode 100644 user_guide/helpers/inflector_helper.html create mode 100644 user_guide/helpers/language_helper.html create mode 100644 user_guide/helpers/number_helper.html create mode 100644 user_guide/helpers/path_helper.html create mode 100644 user_guide/helpers/security_helper.html create mode 100644 user_guide/helpers/smiley_helper.html create mode 100644 user_guide/helpers/string_helper.html create mode 100644 user_guide/helpers/text_helper.html create mode 100644 user_guide/helpers/typography_helper.html create mode 100644 user_guide/helpers/url_helper.html create mode 100644 user_guide/helpers/xml_helper.html create mode 100644 user_guide/index.html create mode 100644 user_guide/installation/downloads.html create mode 100644 user_guide/installation/index.html create mode 100644 user_guide/installation/troubleshooting.html create mode 100644 user_guide/installation/upgrade_120.html create mode 100644 user_guide/installation/upgrade_130.html create mode 100644 user_guide/installation/upgrade_131.html create mode 100644 user_guide/installation/upgrade_132.html create mode 100644 user_guide/installation/upgrade_133.html create mode 100644 user_guide/installation/upgrade_140.html create mode 100644 user_guide/installation/upgrade_141.html create mode 100644 user_guide/installation/upgrade_150.html create mode 100644 user_guide/installation/upgrade_152.html create mode 100644 user_guide/installation/upgrade_153.html create mode 100644 user_guide/installation/upgrade_154.html create mode 100644 user_guide/installation/upgrade_160.html create mode 100644 user_guide/installation/upgrade_161.html create mode 100644 user_guide/installation/upgrade_162.html create mode 100644 user_guide/installation/upgrade_163.html create mode 100644 user_guide/installation/upgrade_170.html create mode 100644 user_guide/installation/upgrade_171.html create mode 100644 user_guide/installation/upgrade_172.html create mode 100644 user_guide/installation/upgrade_200.html create mode 100644 user_guide/installation/upgrade_201.html create mode 100644 user_guide/installation/upgrade_202.html create mode 100644 user_guide/installation/upgrade_203.html create mode 100644 user_guide/installation/upgrade_210.html create mode 100644 user_guide/installation/upgrade_211.html create mode 100644 user_guide/installation/upgrade_212.html create mode 100644 user_guide/installation/upgrade_213.html create mode 100644 user_guide/installation/upgrade_214.html create mode 100644 user_guide/installation/upgrade_220.html create mode 100644 user_guide/installation/upgrade_221.html create mode 100644 user_guide/installation/upgrade_222.html create mode 100644 user_guide/installation/upgrade_223.html create mode 100644 user_guide/installation/upgrade_300.html create mode 100644 user_guide/installation/upgrade_301.html create mode 100644 user_guide/installation/upgrade_302.html create mode 100644 user_guide/installation/upgrade_303.html create mode 100644 user_guide/installation/upgrade_304.html create mode 100644 user_guide/installation/upgrade_305.html create mode 100644 user_guide/installation/upgrade_306.html create mode 100644 user_guide/installation/upgrade_310.html create mode 100644 user_guide/installation/upgrade_311.html create mode 100644 user_guide/installation/upgrade_312.html create mode 100644 user_guide/installation/upgrade_313.html create mode 100644 user_guide/installation/upgrade_314.html create mode 100644 user_guide/installation/upgrade_315.html create mode 100644 user_guide/installation/upgrade_316.html create mode 100644 user_guide/installation/upgrade_317.html create mode 100644 user_guide/installation/upgrade_318.html create mode 100644 user_guide/installation/upgrade_b11.html create mode 100644 user_guide/installation/upgrading.html create mode 100644 user_guide/libraries/benchmark.html create mode 100644 user_guide/libraries/caching.html create mode 100644 user_guide/libraries/calendar.html create mode 100644 user_guide/libraries/cart.html create mode 100644 user_guide/libraries/config.html create mode 100644 user_guide/libraries/email.html create mode 100644 user_guide/libraries/encrypt.html create mode 100644 user_guide/libraries/encryption.html create mode 100644 user_guide/libraries/file_uploading.html create mode 100644 user_guide/libraries/form_validation.html create mode 100644 user_guide/libraries/ftp.html create mode 100644 user_guide/libraries/image_lib.html create mode 100644 user_guide/libraries/index.html create mode 100644 user_guide/libraries/input.html create mode 100644 user_guide/libraries/javascript.html create mode 100644 user_guide/libraries/language.html create mode 100644 user_guide/libraries/loader.html create mode 100644 user_guide/libraries/migration.html create mode 100644 user_guide/libraries/output.html create mode 100644 user_guide/libraries/pagination.html create mode 100644 user_guide/libraries/parser.html create mode 100644 user_guide/libraries/security.html create mode 100644 user_guide/libraries/sessions.html create mode 100644 user_guide/libraries/table.html create mode 100644 user_guide/libraries/trackback.html create mode 100644 user_guide/libraries/typography.html create mode 100644 user_guide/libraries/unit_testing.html create mode 100644 user_guide/libraries/uri.html create mode 100644 user_guide/libraries/user_agent.html create mode 100644 user_guide/libraries/xmlrpc.html create mode 100644 user_guide/libraries/zip.html create mode 100644 user_guide/license.html create mode 100644 user_guide/objects.inv create mode 100644 user_guide/overview/appflow.html create mode 100644 user_guide/overview/at_a_glance.html create mode 100644 user_guide/overview/features.html create mode 100644 user_guide/overview/getting_started.html create mode 100644 user_guide/overview/goals.html create mode 100644 user_guide/overview/index.html create mode 100644 user_guide/overview/mvc.html create mode 100644 user_guide/search.html create mode 100644 user_guide/searchindex.js create mode 100644 user_guide/tutorial/conclusion.html create mode 100644 user_guide/tutorial/create_news_items.html create mode 100644 user_guide/tutorial/index.html create mode 100644 user_guide/tutorial/news_section.html create mode 100644 user_guide/tutorial/static_pages.html delete mode 100644 user_guide_src/Makefile delete mode 100644 user_guide_src/README.rst delete mode 100644 user_guide_src/cilexer/README delete mode 100644 user_guide_src/cilexer/cilexer/__init__.py delete mode 100644 user_guide_src/cilexer/cilexer/cilexer.py delete mode 100644 user_guide_src/cilexer/setup.py delete mode 100644 user_guide_src/source/DCO.rst delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/LICENSE delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/__init__.py delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/footer.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/layout.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/layout_old.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/pulldown.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/search.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/searchbox.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/css/badge_only.css delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/css/theme.css delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/images/ci-icon.ico delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/js/oldtheme.js delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/theme.conf delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/versions.html delete mode 100644 user_guide_src/source/changelog.rst delete mode 100644 user_guide_src/source/conf.py delete mode 100644 user_guide_src/source/contributing/index.rst delete mode 100644 user_guide_src/source/database/caching.rst delete mode 100644 user_guide_src/source/database/call_function.rst delete mode 100644 user_guide_src/source/database/configuration.rst delete mode 100644 user_guide_src/source/database/connecting.rst delete mode 100644 user_guide_src/source/database/db_driver_reference.rst delete mode 100644 user_guide_src/source/database/examples.rst delete mode 100644 user_guide_src/source/database/forge.rst delete mode 100644 user_guide_src/source/database/helpers.rst delete mode 100644 user_guide_src/source/database/index.rst delete mode 100644 user_guide_src/source/database/metadata.rst delete mode 100644 user_guide_src/source/database/queries.rst delete mode 100644 user_guide_src/source/database/query_builder.rst delete mode 100644 user_guide_src/source/database/results.rst delete mode 100644 user_guide_src/source/database/transactions.rst delete mode 100644 user_guide_src/source/database/utilities.rst delete mode 100644 user_guide_src/source/documentation/ELDocs.tmbundle.zip delete mode 100644 user_guide_src/source/documentation/index.rst delete mode 100644 user_guide_src/source/general/alternative_php.rst delete mode 100644 user_guide_src/source/general/ancillary_classes.rst delete mode 100644 user_guide_src/source/general/autoloader.rst delete mode 100644 user_guide_src/source/general/caching.rst delete mode 100644 user_guide_src/source/general/cli.rst delete mode 100644 user_guide_src/source/general/common_functions.rst delete mode 100644 user_guide_src/source/general/compatibility_functions.rst delete mode 100644 user_guide_src/source/general/controllers.rst delete mode 100644 user_guide_src/source/general/core_classes.rst delete mode 100644 user_guide_src/source/general/creating_drivers.rst delete mode 100644 user_guide_src/source/general/creating_libraries.rst delete mode 100644 user_guide_src/source/general/credits.rst delete mode 100644 user_guide_src/source/general/drivers.rst delete mode 100644 user_guide_src/source/general/environments.rst delete mode 100644 user_guide_src/source/general/errors.rst delete mode 100644 user_guide_src/source/general/helpers.rst delete mode 100644 user_guide_src/source/general/hooks.rst delete mode 100644 user_guide_src/source/general/index.rst delete mode 100644 user_guide_src/source/general/libraries.rst delete mode 100644 user_guide_src/source/general/managing_apps.rst delete mode 100644 user_guide_src/source/general/models.rst delete mode 100644 user_guide_src/source/general/profiling.rst delete mode 100644 user_guide_src/source/general/requirements.rst delete mode 100644 user_guide_src/source/general/reserved_names.rst delete mode 100644 user_guide_src/source/general/routing.rst delete mode 100644 user_guide_src/source/general/security.rst delete mode 100644 user_guide_src/source/general/styleguide.rst delete mode 100644 user_guide_src/source/general/urls.rst delete mode 100644 user_guide_src/source/general/views.rst delete mode 100644 user_guide_src/source/general/welcome.rst delete mode 100644 user_guide_src/source/helpers/array_helper.rst delete mode 100644 user_guide_src/source/helpers/captcha_helper.rst delete mode 100644 user_guide_src/source/helpers/cookie_helper.rst delete mode 100644 user_guide_src/source/helpers/date_helper.rst delete mode 100644 user_guide_src/source/helpers/directory_helper.rst delete mode 100644 user_guide_src/source/helpers/download_helper.rst delete mode 100644 user_guide_src/source/helpers/email_helper.rst delete mode 100644 user_guide_src/source/helpers/file_helper.rst delete mode 100644 user_guide_src/source/helpers/form_helper.rst delete mode 100644 user_guide_src/source/helpers/html_helper.rst delete mode 100644 user_guide_src/source/helpers/index.rst delete mode 100644 user_guide_src/source/helpers/inflector_helper.rst delete mode 100644 user_guide_src/source/helpers/language_helper.rst delete mode 100644 user_guide_src/source/helpers/number_helper.rst delete mode 100644 user_guide_src/source/helpers/path_helper.rst delete mode 100644 user_guide_src/source/helpers/security_helper.rst delete mode 100644 user_guide_src/source/helpers/smiley_helper.rst delete mode 100644 user_guide_src/source/helpers/string_helper.rst delete mode 100644 user_guide_src/source/helpers/text_helper.rst delete mode 100644 user_guide_src/source/helpers/typography_helper.rst delete mode 100644 user_guide_src/source/helpers/url_helper.rst delete mode 100644 user_guide_src/source/helpers/xml_helper.rst delete mode 100644 user_guide_src/source/images/appflowchart.gif delete mode 100644 user_guide_src/source/images/arrow.gif delete mode 100644 user_guide_src/source/images/ci-icon.ico delete mode 100644 user_guide_src/source/images/ci_logo.jpg delete mode 100644 user_guide_src/source/images/ci_logo_flame.jpg delete mode 100644 user_guide_src/source/images/file.gif delete mode 100644 user_guide_src/source/images/folder.gif delete mode 100644 user_guide_src/source/images/smile.gif delete mode 100644 user_guide_src/source/index.rst delete mode 100644 user_guide_src/source/installation/downloads.rst delete mode 100644 user_guide_src/source/installation/index.rst delete mode 100644 user_guide_src/source/installation/troubleshooting.rst delete mode 100644 user_guide_src/source/installation/upgrade_120.rst delete mode 100644 user_guide_src/source/installation/upgrade_130.rst delete mode 100644 user_guide_src/source/installation/upgrade_131.rst delete mode 100644 user_guide_src/source/installation/upgrade_132.rst delete mode 100644 user_guide_src/source/installation/upgrade_133.rst delete mode 100644 user_guide_src/source/installation/upgrade_140.rst delete mode 100644 user_guide_src/source/installation/upgrade_141.rst delete mode 100644 user_guide_src/source/installation/upgrade_150.rst delete mode 100644 user_guide_src/source/installation/upgrade_152.rst delete mode 100644 user_guide_src/source/installation/upgrade_153.rst delete mode 100644 user_guide_src/source/installation/upgrade_154.rst delete mode 100644 user_guide_src/source/installation/upgrade_160.rst delete mode 100644 user_guide_src/source/installation/upgrade_161.rst delete mode 100644 user_guide_src/source/installation/upgrade_162.rst delete mode 100644 user_guide_src/source/installation/upgrade_163.rst delete mode 100644 user_guide_src/source/installation/upgrade_170.rst delete mode 100644 user_guide_src/source/installation/upgrade_171.rst delete mode 100644 user_guide_src/source/installation/upgrade_172.rst delete mode 100644 user_guide_src/source/installation/upgrade_200.rst delete mode 100644 user_guide_src/source/installation/upgrade_201.rst delete mode 100644 user_guide_src/source/installation/upgrade_202.rst delete mode 100644 user_guide_src/source/installation/upgrade_203.rst delete mode 100644 user_guide_src/source/installation/upgrade_210.rst delete mode 100644 user_guide_src/source/installation/upgrade_211.rst delete mode 100644 user_guide_src/source/installation/upgrade_212.rst delete mode 100644 user_guide_src/source/installation/upgrade_213.rst delete mode 100644 user_guide_src/source/installation/upgrade_214.rst delete mode 100644 user_guide_src/source/installation/upgrade_220.rst delete mode 100644 user_guide_src/source/installation/upgrade_221.rst delete mode 100644 user_guide_src/source/installation/upgrade_222.rst delete mode 100644 user_guide_src/source/installation/upgrade_223.rst delete mode 100644 user_guide_src/source/installation/upgrade_300.rst delete mode 100644 user_guide_src/source/installation/upgrade_301.rst delete mode 100644 user_guide_src/source/installation/upgrade_302.rst delete mode 100644 user_guide_src/source/installation/upgrade_303.rst delete mode 100644 user_guide_src/source/installation/upgrade_304.rst delete mode 100644 user_guide_src/source/installation/upgrade_305.rst delete mode 100644 user_guide_src/source/installation/upgrade_306.rst delete mode 100644 user_guide_src/source/installation/upgrade_310.rst delete mode 100644 user_guide_src/source/installation/upgrade_311.rst delete mode 100644 user_guide_src/source/installation/upgrade_312.rst delete mode 100644 user_guide_src/source/installation/upgrade_313.rst delete mode 100644 user_guide_src/source/installation/upgrade_314.rst delete mode 100644 user_guide_src/source/installation/upgrade_315.rst delete mode 100644 user_guide_src/source/installation/upgrade_316.rst delete mode 100644 user_guide_src/source/installation/upgrade_317.rst delete mode 100644 user_guide_src/source/installation/upgrade_318.rst delete mode 100644 user_guide_src/source/installation/upgrade_b11.rst delete mode 100644 user_guide_src/source/installation/upgrading.rst delete mode 100644 user_guide_src/source/libraries/benchmark.rst delete mode 100644 user_guide_src/source/libraries/caching.rst delete mode 100644 user_guide_src/source/libraries/calendar.rst delete mode 100644 user_guide_src/source/libraries/cart.rst delete mode 100644 user_guide_src/source/libraries/config.rst delete mode 100644 user_guide_src/source/libraries/email.rst delete mode 100644 user_guide_src/source/libraries/encrypt.rst delete mode 100644 user_guide_src/source/libraries/encryption.rst delete mode 100644 user_guide_src/source/libraries/file_uploading.rst delete mode 100644 user_guide_src/source/libraries/form_validation.rst delete mode 100644 user_guide_src/source/libraries/ftp.rst delete mode 100644 user_guide_src/source/libraries/image_lib.rst delete mode 100644 user_guide_src/source/libraries/index.rst delete mode 100644 user_guide_src/source/libraries/input.rst delete mode 100644 user_guide_src/source/libraries/javascript.rst delete mode 100644 user_guide_src/source/libraries/language.rst delete mode 100644 user_guide_src/source/libraries/loader.rst delete mode 100644 user_guide_src/source/libraries/migration.rst delete mode 100644 user_guide_src/source/libraries/output.rst delete mode 100644 user_guide_src/source/libraries/pagination.rst delete mode 100644 user_guide_src/source/libraries/parser.rst delete mode 100644 user_guide_src/source/libraries/security.rst delete mode 100644 user_guide_src/source/libraries/sessions.rst delete mode 100644 user_guide_src/source/libraries/table.rst delete mode 100644 user_guide_src/source/libraries/trackback.rst delete mode 100644 user_guide_src/source/libraries/typography.rst delete mode 100644 user_guide_src/source/libraries/unit_testing.rst delete mode 100644 user_guide_src/source/libraries/uri.rst delete mode 100644 user_guide_src/source/libraries/user_agent.rst delete mode 100644 user_guide_src/source/libraries/xmlrpc.rst delete mode 100644 user_guide_src/source/libraries/zip.rst delete mode 100644 user_guide_src/source/license.rst delete mode 100644 user_guide_src/source/overview/appflow.rst delete mode 100644 user_guide_src/source/overview/at_a_glance.rst delete mode 100644 user_guide_src/source/overview/features.rst delete mode 100644 user_guide_src/source/overview/getting_started.rst delete mode 100644 user_guide_src/source/overview/goals.rst delete mode 100644 user_guide_src/source/overview/index.rst delete mode 100644 user_guide_src/source/overview/mvc.rst delete mode 100644 user_guide_src/source/tutorial/conclusion.rst delete mode 100644 user_guide_src/source/tutorial/create_news_items.rst delete mode 100644 user_guide_src/source/tutorial/index.rst delete mode 100644 user_guide_src/source/tutorial/news_section.rst delete mode 100644 user_guide_src/source/tutorial/static_pages.rst diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 88c774283..000000000 --- a/.travis.yml +++ /dev/null @@ -1,57 +0,0 @@ -language: php -dist: precise - -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - master - - hhvm - -env: - - DB=mysql - - DB=mysqli - - DB=pgsql - - DB=sqlite - - DB=pdo/mysql - - DB=pdo/pgsql - - DB=pdo/sqlite - -sudo: false - -before_script: - - sh -c "composer install --dev --no-progress" - - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS ci_test;' -U postgres; fi" - - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'create database ci_test;' -U postgres; fi" - - sh -c "if [ '$DB' = 'mysql' ] || [ '$DB' = 'mysqli' ] || [ '$DB' = 'pdo/mysql' ]; then mysql -e 'create database IF NOT EXISTS ci_test;'; fi" - -script: php -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 -d mbstring.internal_encoding=UTF-8 vendor/bin/phpunit --coverage-text --configuration tests/travis/$DB.phpunit.xml - -matrix: - allow_failures: - - php: hhvm - - php: master - exclude: - - php: hhvm - env: DB=pgsql - - php: hhvm - env: DB=pdo/pgsql - - php: 7.0 - env: DB=mysql - - php: 7.1 - env: DB=mysql - - php: 7.2 - env: DB=mysql - - php: master - env: DB=mysql - -branches: - only: - - develop - - 3.0-stable - - 3.1-stable - - /^feature\/.+$/ diff --git a/DCO.txt b/DCO.txt deleted file mode 100644 index a404c0d38..000000000 --- a/DCO.txt +++ /dev/null @@ -1,25 +0,0 @@ -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/build-release.sh b/build-release.sh deleted file mode 100755 index 6b3b31d12..000000000 --- a/build-release.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env bash - -cd $(dirname $BASH_SOURCE) - -if [ $# -eq 0 ]; then - echo 'Usage: '$BASH_SOURCE' ' - exit 1 -fi - -version_number=$1 - -if [ ${#version_number} -lt 5 ] -then - echo "Provided version number is too short" - exit 1 -elif [ ${version_number: -4} == "-dev" ] -then - echo "'-dev' releases are not allowed" - exit 1 -fi - -version_id=${version_number:0:5} -version_id=${version_id//./} -upgrade_rst='user_guide_src/source/installation/upgrade_'$version_id'.rst' - -if [ ${#version_id} -ne 3 ] -then - echo "Invalid version number format" - exit 1 -elif [ `grep -c -F --regexp="'$version_number'" system/core/CodeIgniter.php` -ne 1 ] -then - echo "Provided version number doesn't match in system/core/CodeIgniter.php" - exit 1 -elif [ `grep -c -F --regexp="'$version_number'" user_guide_src/source/conf.py` -ne 2 ] -then - echo "Provided version number doesn't match in user_guide_src/source/conf.py" - exit 1 -elif [ `grep -c -F --regexp="$version_number (Current version) " user_guide_src/source/installation/downloads.rst` -ne 1 ] -then - echo "user_guide_src/source/installation/downloads.rst doesn't appear to contain a link for this version" - exit 1 -elif [ ! -f "$upgrade_rst" ] -then - echo "${upgrade_rst} doesn't exist" - exit 1 -fi - -echo "Running tests ..." - -cd tests/ -phpunit - -if [ $? -ne 0 ] -then - echo "Build FAILED!" - exit 1 -fi - -cd .. -cd user_guide_src/ - -echo "" -echo "Building HTML docs; please check output for warnings ..." -echo "" - -make html - -echo "" - -if [ $? -ne 0 ] -then - echo "Build FAILED!" - exit 1 -fi - -echo "Building EPUB docs; please check output for warnings ..." -echo "" - -make epub - -echo "" - -if [ $? -ne 0 ] -then - echo "Build FAILED!" - exit 1 -fi - -cd .. - -if [ -d user_guide/ ] -then - rm -r user_guide/ -fi - -cp -r user_guide_src/build/html/ user_guide/ -cp user_guide_src/build/epub/CodeIgniter.epub "CodeIgniter ${version_number}.epub" - -echo "Build complete." diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml deleted file mode 100644 index 6dc58c259..000000000 --- a/phpdoc.dist.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - CodeIgniter v3.0.0 API - - ./api/ - - - ./api/ - - - ./system - - - - warn - - ./api/log/{DATE}.log - ./api/{DATE}.errors.log - - - \ No newline at end of file diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php deleted file mode 100644 index b4e56bdae..000000000 --- a/tests/Bootstrap.php +++ /dev/null @@ -1,76 +0,0 @@ -= 3.5.6 - - pear channel-discover pear.phpunit.de - pear channel-discover pear.symfony.com - pear install phpunit/PHPUnit - -vfsStream - - pear channel-discover pear.bovigo.org - pear install bovigo/vfsStream-beta - -#### Installation of PEAR and PHPUnit on Ubuntu - - Installation on Ubuntu requires a few steps. Depending on your setup you may - need to use 'sudo' to install these. Mileage may vary but these steps are a - good start. - - # Install the PEAR package - sudo apt-get install php-pear - - # Add a few sources to PEAR - pear channel-discover pear.phpunit.de - pear channel-discover pear.symfony-project.com - pear channel-discover components.ez.no - pear channel-discover pear.bovigo.org - - # Finally install PHPUnit and vfsStream (including dependencies) - pear install --alldeps phpunit/PHPUnit - pear install --alldeps bovigo/vfsStream-beta - - # Finally, run 'phpunit' from within the ./tests directory - # and you should be on your way! - -## Test Suites: - -CodeIgniter bootstraps a request very directly, with very flat class -hierarchy. As a result, there is no main CodeIgniter class until the -controller is instantiated. - -This has forced the core classes to be relatively decoupled, which is -a good thing. However, it makes that portion of code relatively hard -to test. - -Right now that means we'll probably have two core test suites, along -with a base for application and package tests. That gives us: - -1. Bootstrap Test - test common.php and sanity check codeigniter.php [in planning] -2. System Test - test core components in relative isolation [in development] -3. Application Test - bootstrapping for application/tests [not started] -4. Package Test - bootstrapping for /tests [not started] - -### Test Environment: - -The test/Bootstrap.php file establishes global constants such as BASEPATH, -APPPATH, and VIEWPATH, initializing them to point to VFS locations. The -test case class employs vfsStream to make a clean virtual filesystem with -the necessary paths for every individual test. - -Within each test case, VFS directory objects are available to use as arguments -to the VFS convenience functions (see below): - -- ci_vfs_root: VFS filesystem root -- ci_app_root: Application directory -- ci_base_root: System directory -- ci_view_root: Views directory - -Classes being instantiated for testing are read from the actual filesystem -by the unit test autoloader, as are mockups created in tests/mocks. If you -need access to the real system directory, the SYSTEM_PATH constant always -points to it. - -Any other resources which need to be read from the path constants must be -created or cloned within your test. Functions for doing so are outlined -below. - -### CI_TestCase Documentation - -Test cases should extend CI_TestCase. This internally extends -PHPUnit\_Framework\_TestCase, so you have access to all of your -usual PHPUnit methods. - -We need to provide a simple way to modify the globals and the -common function output. We also need to be able to mock up -the super object as we please. - -Current API is *not stable*. Names and implementations will change. - - $this->ci_set_config($key, $val) - -Set the global config variables in a mock Config object. If key is an array, -it will replace the entire config array. They are _not_ merged. If called -without any parameters, it will create the mock object but not set any values. -The mock Config object also provides rudimentary item() and load() stubs for -delivering configured values to classes being tested and handling config load -calls, respectively. The load() stub does _not_ actually load any files, it -only records the filename provided. Check the config->loaded array to verify -calls made. - - $this->ci_instance($obj) - -Set the object to use as the "super object", in a lot -of cases this will be a simple stdClass with the attributes -you need it to have. If no parameter, will return the instance. - - $this->ci_instance_var($name, $val) - -Add an attribute to the super object. This is useful if you -set up a simple instance in setUp and then need to add different -class mockups to your super object. - - $this->ci_core_class($name) - -Get the _class name_ of a core class, so that you can instantiate -it. The variable is returned by reference and is tied to the correct -$GLOBALS key. For example: - - $cfg =& $this->ci_core_class('cfg'); // returns 'CI_Config' - $cfg = new $cfg; // instantiates config and overwrites the CFG global - - $this->ci_set_core_class($name, $obj) - -An alternative way to set one of the core globals. - - $this->ci_vfs_mkdir($name, $root) - -Creates a new directory in the test VFS. Pass a directory object to be the -parent directory or none to create a root-level directory. Returns the new -directory object. - - $this->ci_vfs_create($file, $content, $root, $path) - -Creates a new VFS file. '.php' is automatically appended to the filename if -it has no extension. Pass a directory object as the root, and an optional path -to recurse and/or create for containing the file. Path may be a string (such -as 'models/subdir') or an array (e.g. - array('models', 'subdir') ). Existing -directories in the VFS root will be recursed until a new directory is -identified - all others in the path will be created, so you can mix-and-match -old and new directories. If $file is an array (key = name, value = content), -multiple files will be created in the same path. - - $this->ci_vfs_clone($path) - -Clones an existing file from the real filesystem to exist in the same path of -the VFS. Path must be relative to the project root (i.e. - starting with -'system' or 'application'). - - $this->ci_vfs_path($path, $base) - -Creates a VFS file path string suitable for use with PHP file operations. Path -may be absolute from the VFS root, or relative to a base path. It is often -useful to use APPPATH or BASEPATH as the base. - - $this->helper($name) - -Loads a helper from the real filesystem. - - $this->lang($name) - -Loads a language file from the real filesystem and returns the $lang array. - - $this->ci_get_config() __internal__ - -Returns the global config array. Internal as you shouldn't need to -call this (you're setting it, after all). Used internally to make -CI's get_config() work. - - CI_TestCase::instance() __internal__ - -Returns an instance of the current test case. We force phpunit to -run with backup-globals enabled, so this will always be the instance -of the currently running test class. - -### Going forward - -#### 1. Bootstrap Test - -Testing common.php should be pretty simple. Include the file, and test the -functions. May require some tweaking so that we can grab the statics from all -methods (see is_loaded()). Testing the actual CodeIgniter.php file will most -likely be an output test for the default view, with some object checking after -the file runs. Needs consideration. - -#### 2. System Test - -Testing the core system relies on being able to isolate the core components -as much as possible. A few of them access other core classes as globals. These -should be mocked up and easy to manipulate. - -All functions in common.php should be a minimal implementation, or and mapped -to a method in the test's parent class to gives us full control of their output. - -#### 3. Application Test: - -Not sure yet, needs to handle: - -- Libraries -- Helpers -- Models -- MY_* files -- Controllers (uh...?) -- Views? (watir, selenium, cucumber?) -- Database Testing - -#### 4. Package Test: - -I don't have a clue how this will work. - -Needs to be able to handle packages -that are used multiple times within the application (i.e. EE/Pyro modules) -as well as packages that are used by multiple applications (library distributions) \ No newline at end of file diff --git a/tests/codeigniter/Setup_test.php b/tests/codeigniter/Setup_test.php deleted file mode 100644 index 5317c56c7..000000000 --- a/tests/codeigniter/Setup_test.php +++ /dev/null @@ -1,13 +0,0 @@ -assertTrue(defined('PROJECT_BASE')); - $this->assertTrue(defined('BASEPATH')); - $this->assertTrue(defined('APPPATH')); - $this->assertTrue(defined('VIEWPATH')); - } - -} \ No newline at end of file diff --git a/tests/codeigniter/core/Benchmark_test.php b/tests/codeigniter/core/Benchmark_test.php deleted file mode 100644 index 33bd742b2..000000000 --- a/tests/codeigniter/core/Benchmark_test.php +++ /dev/null @@ -1,67 +0,0 @@ -benchmark = new CI_Benchmark(); - } - - // -------------------------------------------------------------------- - - public function test_mark() - { - $this->assertEmpty($this->benchmark->marker); - - $this->benchmark->mark('code_start'); - - $this->assertCount(1, $this->benchmark->marker); - $this->assertArrayHasKey('code_start', $this->benchmark->marker); - } - - // -------------------------------------------------------------------- - - public function test_elapsed_time() - { - $this->assertEquals('{elapsed_time}', $this->benchmark->elapsed_time()); - $this->assertEmpty($this->benchmark->elapsed_time('undefined_point')); - - $this->benchmark->mark('code_start'); - $this->benchmark->mark('code_end'); - - // Override values, because time isn't testable, but make sure the markers were set - if (isset($this->benchmark->marker['code_start']) && is_float($this->benchmark->marker['code_start'])) - { - $this->benchmark->marker['code_start'] = 1389956144.1944; - } - - if (isset($this->benchmark->marker['code_end']) && is_float($this->benchmark->marker['code_end'])) - { - $this->benchmark->marker['code_end'] = 1389956145.1946; - } - - $this->assertEquals('1', $this->benchmark->elapsed_time('code_start', 'code_end', 0)); - $this->assertEquals('1.0', $this->benchmark->elapsed_time('code_start', 'code_end', 1)); - $this->assertEquals('1.00', $this->benchmark->elapsed_time('code_start', 'code_end', 2)); - $this->assertEquals('1.000', $this->benchmark->elapsed_time('code_start', 'code_end', 3)); - $this->assertEquals('1.0002', $this->benchmark->elapsed_time('code_start', 'code_end', 4)); - $this->assertEquals('1.0002', $this->benchmark->elapsed_time('code_start', 'code_end')); - - // Test with non-existing 2nd marker, but again - we need to override the value - $this->benchmark->elapsed_time('code_start', 'code_end2'); - if (isset($this->benchmark->marker['code_end2']) && is_float($this->benchmark->marker['code_end2'])) - { - $this->benchmark->marker['code_end2'] = 1389956146.2046; - } - - $this->assertEquals('2.0102', $this->benchmark->elapsed_time('code_start', 'code_end2')); - } - - // -------------------------------------------------------------------- - - public function test_memory_usage() - { - $this->assertEquals('{memory_usage}', $this->benchmark->memory_usage()); - } - -} diff --git a/tests/codeigniter/core/Common_test.php b/tests/codeigniter/core/Common_test.php deleted file mode 100644 index effae50c5..000000000 --- a/tests/codeigniter/core/Common_test.php +++ /dev/null @@ -1,69 +0,0 @@ -assertTrue(is_php('1.2.0')); - $this->assertFalse(is_php('9999.9.9')); - } - - // ------------------------------------------------------------------------ - - public function test_stringify_attributes() - { - $this->assertEquals(' class="foo" id="bar"', _stringify_attributes(array('class' => 'foo', 'id' => 'bar'))); - - $atts = new stdClass; - $atts->class = 'foo'; - $atts->id = 'bar'; - $this->assertEquals(' class="foo" id="bar"', _stringify_attributes($atts)); - - $atts = new stdClass; - $this->assertEquals('', _stringify_attributes($atts)); - - $this->assertEquals(' class="foo" id="bar"', _stringify_attributes('class="foo" id="bar"')); - - $this->assertEquals('', _stringify_attributes(array())); - } - - // ------------------------------------------------------------------------ - - public function test_stringify_js_attributes() - { - $this->assertEquals('width=800,height=600', _stringify_attributes(array('width' => '800', 'height' => '600'), TRUE)); - - $atts = new stdClass; - $atts->width = 800; - $atts->height = 600; - $this->assertEquals('width=800,height=600', _stringify_attributes($atts, TRUE)); - } - - // ------------------------------------------------------------------------ - - public function test_html_escape() - { - $this->assertEquals( - html_escape('Here is a string containing "quoted" text.'), - 'Here is a string containing "quoted" text.' - ); - - $this->assertEquals( - html_escape(array('associative' => 'and', array('multi' => 'dimentional'))), - array('associative' => 'and', array('multi' => 'dimentional')) - ); - } - - // ------------------------------------------------------------------------ - - public function test_remove_invisible_characters() - { - $raw_string = 'Here is a string containing invisible'.chr(0x08).' text %0e.'; - $removed_string = 'Here is a string containing invisible text %0e.'; - $this->assertEquals($removed_string, remove_invisible_characters($raw_string, FALSE)); - - $raw_string = 'Here is a string %0econtaining url_encoded invisible%1F text.'; - $removed_string = 'Here is a string containing url_encoded invisible text.'; - $this->assertEquals($removed_string, remove_invisible_characters($raw_string)); - } -} diff --git a/tests/codeigniter/core/Config_test.php b/tests/codeigniter/core/Config_test.php deleted file mode 100644 index b5c9e849d..000000000 --- a/tests/codeigniter/core/Config_test.php +++ /dev/null @@ -1,240 +0,0 @@ -ci_core_class('cfg'); - - // set predictable config values - $this->cfg = array( - 'index_page' => 'index.php', - 'base_url' => 'http://example.com/', - 'subclass_prefix' => 'MY_' - ); - $this->ci_set_config($this->cfg); - - $this->config = new $cls; - } - - // -------------------------------------------------------------------- - - public function test_item() - { - $this->assertEquals($this->cfg['base_url'], $this->config->item('base_url')); - - // Bad Config value - $this->assertNull($this->config->item('no_good_item')); - - // Index - $this->assertNull($this->config->item('no_good_item', 'bad_index')); - $this->assertNull($this->config->item('no_good_item', 'default')); - } - - // -------------------------------------------------------------------- - - public function test_set_item() - { - $this->assertNull($this->config->item('not_yet_set')); - - $this->config->set_item('not_yet_set', 'is set'); - $this->assertEquals('is set', $this->config->item('not_yet_set')); - } - - // -------------------------------------------------------------------- - - public function test_slash_item() - { - // Bad Config value - $this->assertNull($this->config->slash_item('no_good_item')); - - $this->assertEquals($this->cfg['base_url'], $this->config->slash_item('base_url')); - $this->assertEquals($this->cfg['subclass_prefix'].'/', $this->config->slash_item('subclass_prefix')); - } - - // -------------------------------------------------------------------- - - public function test_base_url() - { - // Test regular base URL - $base_url = $this->cfg['base_url']; - $this->assertEquals($base_url, $this->config->base_url()); - - // Test with URI - $uri = 'test'; - $this->assertEquals($base_url.$uri, $this->config->base_url($uri)); - - // Clear base_url - $this->ci_set_config('base_url', ''); - - // Rerun constructor - $cls =& $this->ci_core_class('cfg'); - $this->config = new $cls; - - // Test default base - $this->assertEquals('http://localhost/', $this->config->base_url()); - - // Capture server vars - $old_host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : NULL; - $old_script_name = isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : NULL; - $old_script_filename = $_SERVER['SCRIPT_FILENAME']; - $old_https = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : NULL; - $old_server_addr = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : NULL; - - // The 'Host' header is user input and must not be trusted - $_SERVER['HTTP_HOST'] = 'test.com'; - $this->config = new $cls; - $this->assertEquals('http://localhost/', $this->config->base_url()); - - // However, we may fallback to the server's IP address - $_SERVER['SERVER_ADDR'] = '127.0.0.1'; - $_SERVER['SCRIPT_NAME'] = '/base_test.php'; - $_SERVER['SCRIPT_FILENAME'] = '/foo/bar/base_test.php'; - $this->config = new $cls; - $this->assertEquals('http://127.0.0.1/', $this->config->base_url()); - - // Making sure that HTTPS and URI path are also detected - $_SERVER['HTTPS'] = 'on'; - $_SERVER['SCRIPT_NAME'] = '/path/base_test.php'; - $_SERVER['SCRIPT_FILENAME'] = '/foo/bar/path/base_test.php'; - $this->config = new $cls; - $this->assertEquals('https://127.0.0.1/path/', $this->config->base_url()); - - // Restore server vars - $_SERVER['HTTP_HOST'] = $old_host; - $_SERVER['SCRIPT_NAME'] = $old_script_name; - $_SERVER['SCRIPT_FILENAME'] = $old_script_filename; - $_SERVER['HTTPS'] = $old_https; - $_SERVER['SERVER_ADDR'] = $old_server_addr; - } - - // -------------------------------------------------------------------- - - public function test_site_url() - { - $base_url = $this->cfg['base_url']; - $index_page = $this->cfg['index_page']; - $this->assertEquals($base_url.$index_page, $this->config->site_url()); - - $old_base = $this->config->item('base_url'); - $this->config->set_item('base_url', ''); - - $q_string = $this->config->item('enable_query_strings'); - $this->config->set_item('enable_query_strings', FALSE); - - $uri = 'test'; - $uri2 = '1'; - $this->assertEquals($index_page.'/'.$uri, $this->config->site_url($uri)); - $this->assertEquals($index_page.'/'.$uri.'/'.$uri2, $this->config->site_url(array($uri, $uri2))); - - $this->assertEquals($index_page.'/test/', $this->config->site_url('test/')); - - $suffix = 'ing'; - $this->config->set_item('url_suffix', $suffix); - - $arg = 'pass'; - $this->assertEquals($index_page.'/'.$uri.$suffix, $this->config->site_url($uri)); - $this->assertEquals($index_page.'/'.$uri.$suffix.'?'.$arg, $this->config->site_url($uri.'?'.$arg)); - - $this->config->set_item('url_suffix', FALSE); - $this->config->set_item('enable_query_strings', TRUE); - - $this->assertEquals($index_page.'?'.$uri, $this->config->site_url($uri)); - $this->assertEquals($index_page.'?0='.$uri.'&1='.$uri2, $this->config->site_url(array($uri, $uri2))); - - $this->config->set_item('base_url', $old_base); - - $this->assertEquals($base_url.$index_page.'?'.$uri, $this->config->site_url($uri)); - - // back to home base - $this->config->set_item('enable_query_strings', $q_string); - } - - // -------------------------------------------------------------------- - - public function test_system_url() - { - $this->assertEquals($this->cfg['base_url'].'system/', $this->config->system_url()); - } - - // -------------------------------------------------------------------- - - public function test_load() - { - // Test regular load - $file = 'test.php'; - $key = 'testconfig'; - $val = 'my_value'; - $cfg = array($key => $val); - $this->ci_vfs_create($file, 'ci_app_root, 'config'); - $this->assertTrue($this->config->load($file)); - $this->assertEquals($val, $this->config->item($key)); - - // Test reload - value should not change - $val2 = 'new_value'; - $cfg = array($key => $val2); - $this->ci_vfs_create($file, 'ci_app_root, 'config'); - $this->assertTrue($this->config->load($file)); - $this->assertEquals($val, $this->config->item($key)); - - // Test section load - $file = 'secttest'; - $cfg = array( - 'one' => 'prime', - 'two' => 2, - 'three' => TRUE - ); - $this->ci_vfs_create($file.'.php', 'ci_app_root, 'config'); - $this->assertTrue($this->config->load($file, TRUE)); - $this->assertEquals($cfg, $this->config->item($file)); - - // Test section merge - $cfg2 = array( - 'three' => 'tres', - 'number' => 42, - 'letter' => 'Z' - ); - - $pkg_dir = 'package'; - $this->ci_vfs_create( - $file.'.php', - 'ci_app_root, - array($pkg_dir, 'config') - ); - array_unshift($this->config->_config_paths, $this->ci_vfs_path($pkg_dir.'/', APPPATH)); - $this->assertTrue($this->config->load($file, TRUE)); - $this->assertEquals(array_merge($cfg, $cfg2), $this->config->item($file)); - array_shift($this->config->_config_paths); - - // Test graceful fail of invalid file - $file = 'badfile'; - $this->ci_vfs_create($file, '', $this->ci_app_root, 'config'); - $this->assertFalse($this->config->load($file, FALSE, TRUE)); - - // Test regular fail of invalid file - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Your '.$this->ci_vfs_path('config/'.$file.'.php', APPPATH). - ' file does not appear to contain a valid configuration array.' - ); - $this->assertNull($this->config->load($file)); - } - - // -------------------------------------------------------------------- - - public function test_load_nonexistent() - { - // Test graceful fail of nonexistent file - $this->assertFalse($this->config->load('not_config_file', FALSE, TRUE)); - - // Test regular fail - $file = 'absentia'; - $this->setExpectedException( - 'RuntimeException', - 'CI Error: The configuration file '.$file.'.php does not exist.' - ); - $this->assertNull($this->config->load($file)); - } - -} \ No newline at end of file diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php deleted file mode 100644 index 976941d41..000000000 --- a/tests/codeigniter/core/Input_test.php +++ /dev/null @@ -1,281 +0,0 @@ -ci_set_config('allow_get_array', TRUE); - $this->ci_set_config('global_xss_filtering', FALSE); - $this->ci_set_config('csrf_protection', FALSE); - - $security = new Mock_Core_Security(); - - $this->ci_set_config('charset', 'UTF-8'); - $utf8 = new Mock_Core_Utf8(); - - $this->input = new Mock_Core_Input($security, $utf8); - } - - // -------------------------------------------------------------------- - - public function test_get_not_exists() - { - $this->assertSame(array(), $this->input->get()); - $this->assertNull($this->input->get('foo')); - } - - // -------------------------------------------------------------------- - - public function test_get_exist() - { - $_SERVER['REQUEST_METHOD'] = 'GET'; - $_GET['foo'] = 'bar'; - - $this->assertArrayHasKey('foo', $this->input->get()); - $this->assertEquals('bar', $this->input->get('foo')); - } - - // -------------------------------------------------------------------- - - public function test_get_exist_with_xss_clean() - { - $_SERVER['REQUEST_METHOD'] = 'GET'; - $_GET['harm'] = "Hello, i try to your site"; - - $this->assertArrayHasKey('harm', $this->input->get()); - $this->assertEquals("Hello, i try to your site", $this->input->get('harm')); - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $this->input->get('harm', TRUE)); - } - - // -------------------------------------------------------------------- - - public function test_post_not_exists() - { - $this->assertSame(array(), $this->input->post()); - $this->assertNull($this->input->post('foo')); - } - - // -------------------------------------------------------------------- - - public function test_post_exist() - { - $_SERVER['REQUEST_METHOD'] = 'POST'; - $_POST['foo'] = 'bar'; - - $this->assertArrayHasKey('foo', $this->input->post()); - $this->assertEquals('bar', $this->input->post('foo')); - } - - // -------------------------------------------------------------------- - - public function test_post_exist_with_xss_clean() - { - $_SERVER['REQUEST_METHOD'] = 'POST'; - $_POST['harm'] = "Hello, i try to your site"; - - $this->assertArrayHasKey('harm', $this->input->post()); - $this->assertEquals("Hello, i try to your site", $this->input->post('harm')); - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $this->input->post('harm', TRUE)); - } - - // -------------------------------------------------------------------- - - public function test_post_get() - { - $_SERVER['REQUEST_METHOD'] = 'POST'; - $_POST['foo'] = 'bar'; - - $this->assertEquals('bar', $this->input->post_get('foo')); - } - - // -------------------------------------------------------------------- - - public function test_get_post() - { - $_SERVER['REQUEST_METHOD'] = 'GET'; - $_GET['foo'] = 'bar'; - - $this->assertEquals('bar', $this->input->get_post('foo')); - } - - // -------------------------------------------------------------------- - - public function test_cookie() - { - $_COOKIE['foo'] = 'bar'; - $this->assertEquals('bar', $this->input->cookie('foo')); - $this->assertNull($this->input->cookie('bar')); - } - - // -------------------------------------------------------------------- - - public function test_server() - { - $this->assertEquals('GET', $this->input->server('REQUEST_METHOD')); - } - - // -------------------------------------------------------------------- - - public function test_fetch_from_array() - { - $data = array( - 'foo' => 'bar', - 'harm' => 'Hello, i try to your site', - ); - - $foo = $this->input->fetch_from_array($data, 'foo'); - $harm = $this->input->fetch_from_array($data, 'harm'); - $harmless = $this->input->fetch_from_array($data, 'harm', TRUE); - - $this->assertEquals('bar', $foo); - $this->assertEquals("Hello, i try to your site", $harm); - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $harmless); - - $_SERVER['REQUEST_METHOD'] = 'POST'; - $_POST['foo']['bar'] = 'baz'; - $barArray = array('bar' => 'baz'); - - $this->assertEquals('baz', $this->input->post('foo[bar]')); - $this->assertEquals($barArray, $this->input->post('foo[]')); - $this->assertNull($this->input->post('foo[baz]')); - } - - // -------------------------------------------------------------------- - - public function test_valid_ip() - { - $this->assertTrue($this->input->valid_ip('192.18.0.1')); - $this->assertTrue($this->input->valid_ip('192.18.0.1', 'ipv4')); - $this->assertFalse($this->input->valid_ip('555.0.0.0')); - $this->assertFalse($this->input->valid_ip('2001:db8:0:85a3::ac1f:8001', 'ipv4')); - - // v6 tests - $this->assertFalse($this->input->valid_ip('192.18.0.1', 'ipv6')); - - $ip_v6 = array( - '2001:0db8:0000:85a3:0000:0000:ac1f:8001', - '2001:db8:0:85a3:0:0:ac1f:8001', - '2001:db8:0:85a3::ac1f:8001' - ); - - foreach ($ip_v6 as $ip) - { - $this->assertTrue($this->input->valid_ip($ip)); - $this->assertTrue($this->input->valid_ip($ip, 'ipv6')); - } - } - - // -------------------------------------------------------------------- - - public function test_method() - { - $_SERVER['REQUEST_METHOD'] = 'GET'; - $this->assertEquals('get', $this->input->method()); - $this->assertEquals('GET', $this->input->method(TRUE)); - $_SERVER['REQUEST_METHOD'] = 'POST'; - $this->assertEquals('post', $this->input->method()); - $this->assertEquals('POST', $this->input->method(TRUE)); - } - - // -------------------------------------------------------------------- - - public function test_is_ajax_request() - { - $this->assertFalse($this->input->is_ajax_request()); - $_SERVER['HTTP_X_REQUESTED_WITH'] = 'test'; - $this->assertFalse($this->input->is_ajax_request()); - $_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'; - $this->assertTrue($this->input->is_ajax_request()); - } - - // -------------------------------------------------------------------- - - public function test_input_stream() - { - $this->markTestSkipped('TODO: Find a way to test input://'); - } - - // -------------------------------------------------------------------- - - public function test_set_cookie() - { - $this->markTestSkipped('TODO: Find a way to test HTTP headers'); - } - - // -------------------------------------------------------------------- - - public function test_get_request_header() - { - $this->markTestSkipped('TODO: Find a way to test HTTP headers'); - } - - // -------------------------------------------------------------------- - - public function test_ip_address() - { - $this->input->ip_address = '127.0.0.1'; - $this->assertEquals('127.0.0.1', $this->input->ip_address()); - - // 127.0.0.1 is set in our Bootstrap file - $this->input->ip_address = FALSE; - $this->assertEquals('127.0.0.1', $this->input->ip_address()); - - // Invalid - $_SERVER['REMOTE_ADDR'] = 'invalid_ip_address'; - $this->input->ip_address = FALSE; // reset cached value - $this->assertEquals('0.0.0.0', $this->input->ip_address()); - - $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; - - // Proxy_ips tests - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', '127.0.0.3, 127.0.0.4, 127.0.0.2'); - $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.2'; - $this->assertEquals('127.0.0.1', $this->input->ip_address()); - - // Invalid spoof - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', 'invalid_ip_address'); - $_SERVER['HTTP_CLIENT_IP'] = 'invalid_ip_address'; - $this->assertEquals('127.0.0.1', $this->input->ip_address()); - - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', 'http://foo/bar/baz, 127.0.0.1/1'); - $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.1'; - $this->assertEquals('127.0.0.1', $this->input->ip_address()); - - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', 'http://foo/bar/baz, 127.0.0.2'); - $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.2'; - $_SERVER['REMOTE_ADDR'] = '127.0.0.2'; - $this->assertEquals('127.0.0.2', $this->input->ip_address()); - - //IPv6 - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', 'FE80:0000:0000:0000:0202:B3FF:FE1E:8329/1, FE80:0000:0000:0000:0202:B3FF:FE1E:8300/2'); - $_SERVER['HTTP_CLIENT_IP'] = 'FE80:0000:0000:0000:0202:B3FF:FE1E:8300'; - $_SERVER['REMOTE_ADDR'] = 'FE80:0000:0000:0000:0202:B3FF:FE1E:8329'; - $this->assertEquals('FE80:0000:0000:0000:0202:B3FF:FE1E:8300', $this->input->ip_address()); - - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', '0::/32'); - $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.7'; - $_SERVER['REMOTE_ADDR'] = '0000:0000:0000:0000:0000:0000:0000:0001'; - $this->assertEquals('127.0.0.7', $this->input->ip_address()); - - $this->input->ip_address = FALSE; - $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; // back to reality - } - - // -------------------------------------------------------------------- - - public function test_user_agent() - { - $_SERVER['HTTP_USER_AGENT'] = 'test'; - $this->assertEquals('test', $this->input->user_agent()); - } -} diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php deleted file mode 100644 index 4958f42e1..000000000 --- a/tests/codeigniter/core/Lang_test.php +++ /dev/null @@ -1,101 +0,0 @@ -ci_core_class('load'); - $this->ci_instance_var('load', new $loader_cls); - $cls = $this->ci_core_class('lang'); - $this->lang = new $cls; - } - - // -------------------------------------------------------------------- - - public function test_load() - { - // Regular usage - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english')); - $this->assertEquals('URI STRING', $this->lang->language['profiler_uri_string']); - - // Already loaded file - $this->assertNull($this->lang->load('profiler', 'english')); - - // Unspecified language (defaults to english) - $this->ci_vfs_clone('system/language/english/date_lang.php'); - $this->assertTrue($this->lang->load('date')); - $this->assertEquals('Year', $this->lang->language['date_year']); - - // A language other than english - $this->ci_vfs_clone('system/language/english/email_lang.php', 'system/language/german/'); - $this->assertTrue($this->lang->load('email', 'german')); - $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); - - // Non-existent file - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load('nonexistent'); - } - - // -------------------------------------------------------------------- - - public function test_non_alpha_idiom() - { - // Non-alpha idiom (should act the same as unspecified language) - // test with existing file - $this->ci_vfs_clone('system/language/english/number_lang.php'); - $this->ci_vfs_clone('system/language/english/number_lang.php', 'system/language/123funny/'); - $this->assertTrue($this->lang->load('number', '123funny')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); - - // test without existing file - $this->ci_vfs_clone('system/language/english/email_lang.php'); - $this->assertTrue($this->lang->load('email', '456funny')); - $this->assertEquals('You did not specify a SMTP hostname.', $this->lang->language['email_no_hostname']); - } - - // -------------------------------------------------------------------- - - public function test_multiple_file_load() - { - // Multiple files - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $files = array( - 0 => 'profiler', - 1 => 'nonexistent' - ); - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load($files, 'english'); - } - - // -------------------------------------------------------------------- - - public function test_alternative_path_load() - { - // Alternative Path - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); - } - - // -------------------------------------------------------------------- - - /** - * @depends test_load - */ - public function test_line() - { - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->lang->load('profiler', 'english'); - $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); - $this->assertFalse($this->lang->line('nonexistent_string')); - $this->assertFalse($this->lang->line(NULL)); - } -} diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php deleted file mode 100644 index 8c5bb3021..000000000 --- a/tests/codeigniter/core/Loader_test.php +++ /dev/null @@ -1,583 +0,0 @@ -ci_core_class('loader'); - $this->load = new $loader(); - - // Get CI instance - $this->ci_obj = $this->ci_instance(); - - // Set subclass prefix - $this->prefix = 'MY_'; - $this->ci_set_config('subclass_prefix', $this->prefix); - } - - // -------------------------------------------------------------------- - - public function test_library() - { - // Test getting CI_Loader object - $this->assertInstanceOf('CI_Loader', $this->load->library(NULL)); - - // Create library in VFS - $lib = 'unit_test_lib'; - $class = 'CI_'.ucfirst($lib); - $this->ci_vfs_create(ucfirst($lib), 'ci_base_root, 'libraries'); - - // Test is_loaded fail - $this->assertFalse($this->load->is_loaded(ucfirst($lib))); - - // Test loading as an array. - $this->assertInstanceOf('CI_Loader', $this->load->library(array($lib))); - $this->assertTrue(class_exists($class), $class.' does not exist'); - $this->assertAttributeInstanceOf($class, $lib, $this->ci_obj); - - // Create library in VFS - $lib = array('unit_test_lib' => 'unit_test_lib'); - - // Test loading as an array (int). - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - $this->assertTrue(class_exists($class), $class.' does not exist'); - - // Test a string given to params - $this->assertInstanceOf('CI_Loader', $this->load->library($lib, ' ')); - - // test non existent lib - $lib = 'non_existent_test_lib'; - - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested class: '.ucfirst($lib) - ); - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - } - - // -------------------------------------------------------------------- - - public function test_bad_library() - { - $lib = 'bad_test_lib'; - $this->ci_vfs_create(ucfirst($lib), '', $this->ci_app_root, 'libraries'); - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Non-existent class: '.ucfirst($lib) - ); - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - } - - // -------------------------------------------------------------------- - - public function test_library_extension() - { - // Create library and extension in VFS - $name = 'ext_test_lib'; - $lib = ucfirst($name); - $class = 'CI_'.$lib; - $ext = $this->prefix.$lib; - $this->ci_vfs_create($lib, 'ci_base_root, 'libraries'); - $this->ci_vfs_create($ext, 'ci_app_root, 'libraries'); - - // Test loading with extension - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - $this->assertTrue(class_exists($class), $class.' does not exist'); - $this->assertTrue(class_exists($ext), $ext.' does not exist'); - $this->assertAttributeInstanceOf($class, $name, $this->ci_obj); - $this->assertAttributeInstanceOf($ext, $name, $this->ci_obj); - - // Test reloading with object name - $obj = 'exttest'; - $this->assertInstanceOf('CI_Loader', $this->load->library($lib, NULL, $obj)); - $this->assertAttributeInstanceOf($class, $obj, $this->ci_obj); - $this->assertAttributeInstanceOf($ext, $obj, $this->ci_obj); - - // Test reloading - unset($this->ci_obj->$name); - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - $this->assertObjectHasAttribute($name, $this->ci_obj); - - // Create baseless library - $name = 'ext_baseless_lib'; - $lib = ucfirst($name); - $class = $this->prefix.$lib; - $this->ci_vfs_create($class, 'ci_app_root, 'libraries'); - - // Test missing base class - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested class: '.$lib - ); - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - } - - // -------------------------------------------------------------------- - - public function test_library_config() - { - // Create library in VFS - $lib = 'unit_test_config_lib'; - $class = 'CI_'.ucfirst($lib); - $content = 'config = $params; } }'; - $this->ci_vfs_create(ucfirst($lib), $content, $this->ci_base_root, 'libraries'); - - // Create config file - $cfg = array( - 'foo' => 'bar', - 'bar' => 'baz', - 'baz' => false - ); - $this->ci_vfs_create($lib, 'ci_app_root, 'config'); - - // Test object name and config - $obj = 'testy'; - $this->assertInstanceOf('CI_Loader', $this->load->library($lib, NULL, $obj)); - $this->assertTrue(class_exists($class), $class.' does not exist'); - $this->assertAttributeInstanceOf($class, $obj, $this->ci_obj); - $this->assertEquals($cfg, $this->ci_obj->$obj->config); - - // Test is_loaded - $this->assertEquals($obj, $this->load->is_loaded(ucfirst($lib))); - - // Test to load another class with the same object name - $lib = 'another_test_lib'; - $class = ucfirst($lib); - $this->ci_vfs_create(ucfirst($lib), 'ci_app_root, 'libraries'); - $this->setExpectedException( - 'RuntimeException', - "CI Error: Resource '".$obj."' already exists and is not a ".$class." instance." - ); - $this->load->library($lib, NULL, $obj); - } - - // -------------------------------------------------------------------- - - public function test_load_library_in_application_dir() - { - // Create library in VFS - $lib = 'super_test_library'; - $class = ucfirst($lib); - $this->ci_vfs_create(ucfirst($lib), 'ci_app_root, 'libraries'); - - // Load library - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - - // Was the model class instantiated. - $this->assertTrue(class_exists($class), $class.' does not exist'); - $this->assertAttributeInstanceOf($class, $lib, $this->ci_obj); - } - - // -------------------------------------------------------------------- - - public function test_driver() - { - // Call the autoloader, to include system/libraries/Driver.php - class_exists('CI_Driver_Library', TRUE); - - // Create driver in VFS - $driver = 'unit_test_driver'; - $dir = ucfirst($driver); - $class = 'CI_'.$dir; - $content = 'ci_vfs_create(ucfirst($driver), $content, $this->ci_base_root, 'libraries/'.$dir); - - // Test loading as an array. - $this->assertInstanceOf('CI_Loader', $this->load->driver(array($driver))); - $this->assertTrue(class_exists($class), $class.' does not exist'); - $this->assertAttributeInstanceOf($class, $driver, $this->ci_obj); - - // Test loading as a library with a name - $obj = 'testdrive'; - $this->assertInstanceOf('CI_Loader', $this->load->library($driver, NULL, $obj)); - $this->assertAttributeInstanceOf($class, $obj, $this->ci_obj); - - // Test a string given to params - $this->assertInstanceOf('CI_Loader', $this->load->driver($driver, ' ')); - } - - // -------------------------------------------------------------------- - - public function test_models() - { - $this->ci_set_core_class('model', 'CI_Model'); - - // Create model in VFS - $model = 'Unit_test_model'; - $content = 'ci_vfs_create($model, $content, $this->ci_app_root, 'models'); - - // Load model - $this->assertInstanceOf('CI_Loader', $this->load->model($model)); - - // Was the model class instantiated. - $this->assertTrue(class_exists($model)); - $this->assertObjectHasAttribute($model, $this->ci_obj); - - // Test no model given - $this->assertInstanceOf('CI_Loader', $this->load->model('')); - } - - // -------------------------------------------------------------------- - - public function test_model_subdir() - { - // Make sure base class is loaded - we'll test _ci_include later - $this->ci_core_class('model'); - - // Create modelin VFS - $model = 'Test_sub_model'; - $base = 'CI_Model'; - $subdir = 'cars'; - $this->ci_vfs_create($model, 'ci_app_root, - array('models', $subdir)); - - // Load model - $name = 'testors'; - $this->assertInstanceOf('CI_Loader', $this->load->model($subdir.'/'.$model, $name)); - - // Was the model class instantiated? - $this->assertTrue(class_exists($model)); - $this->assertObjectHasAttribute($name, $this->ci_obj); - $this->assertAttributeInstanceOf($base, $name, $this->ci_obj); - $this->assertAttributeInstanceOf($model, $name, $this->ci_obj); - - // Test name conflict - $obj = 'conflict'; - $this->ci_obj->$obj = new stdClass(); - $this->setExpectedException( - 'RuntimeException', - 'The model name you are loading is the name of a resource that is already being used: '.$obj - ); - $this->load->model('not_real', $obj); - } - - // -------------------------------------------------------------------- - - public function test_non_existent_model() - { - $this->setExpectedException( - 'RuntimeException', - 'Unable to locate the model you have specified: Ci_test_nonexistent_model.php' - ); - - $this->load->model('ci_test_nonexistent_model.php'); - } - - // -------------------------------------------------------------------- - - // public function testDatabase() - // { - // $this->assertInstanceOf('CI_Loader', $this->load->database()); - // $this->assertInstanceOf('CI_Loader', $this->load->dbutil()); - // } - - // -------------------------------------------------------------------- - - public function test_load_view() - { - // Create view in VFS - $view = 'unit_test_view'; - $var = 'hello'; - $value = 'World!'; - $content = 'This is my test page. '; - $this->ci_vfs_create($view, $content.'ci_app_root, 'views'); - - // Test returning view - $out = $this->load->view($view, array($var => $value), TRUE); - $this->assertEquals($content.$value, $out); - - // Mock output class - $output = $this->getMockBuilder('CI_Output')->setMethods(array('append_output'))->getMock(); - $output->expects($this->once())->method('append_output')->with($content.$value); - $this->ci_instance_var('output', $output); - - // Test view output and $vars as an object - $vars = new stdClass(); - $vars->$var = $value; - $this->assertInstanceOf('CI_Loader', $this->load->view($view, $vars)); - } - - // -------------------------------------------------------------------- - - public function test_non_existent_view() - { - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested file: ci_test_nonexistent_view.php' - ); - - $this->load->view('ci_test_nonexistent_view', array('foo' => 'bar')); - } - - // -------------------------------------------------------------------- - - public function test_file() - { - // Create view in VFS - $dir = 'views'; - $file = 'ci_test_mock_file'; - $content = 'Here is a test file, which we will load now.'; - $this->ci_vfs_create($file, $content, $this->ci_app_root, $dir); - - // Just like load->view(), take the output class out of the mix here. - $out = $this->load->file(APPPATH.$dir.'/'.$file.'.php', TRUE); - $this->assertEquals($content, $out); - - // Test non-existent file - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested file: ci_test_file_not_exists' - ); - - $this->load->file('ci_test_file_not_exists', TRUE); - } - - // -------------------------------------------------------------------- - - public function test_vars() - { - $key1 = 'foo'; - $val1 = 'bar'; - $key2 = 'boo'; - $val2 = 'hoo'; - $this->assertInstanceOf('CI_Loader', $this->load->vars(array($key1 => $val1))); - $this->assertInstanceOf('CI_Loader', $this->load->vars($key2, $val2)); - $this->assertEquals($val1, $this->load->get_var($key1)); - $this->assertEquals(array($key1 => $val1, $key2 => $val2), $this->load->get_vars()); - } - - // -------------------------------------------------------------------- - - public function test_clear_vars() - { - $key1 = 'foo'; - $val1 = 'bar'; - $key2 = 'boo'; - $val2 = 'hoo'; - $this->assertInstanceOf('CI_Loader', $this->load->vars(array($key1 => $val1))); - $this->assertInstanceOf('CI_Loader', $this->load->vars($key2, $val2)); - $this->assertEquals($val1, $this->load->get_var($key1)); - $this->assertEquals(array($key1 => $val1, $key2 => $val2), $this->load->get_vars()); - - $this->assertInstanceOf('CI_Loader', $this->load->clear_vars()); - $this->assertEquals('', $this->load->get_var($key1)); - $this->assertEquals('', $this->load->get_var($key2)); - } - - // -------------------------------------------------------------------- - - public function test_helper() - { - // Create helper in VFS - $helper = 'test'; - $func = '_my_helper_test_func'; - $content = 'ci_vfs_create($helper.'_helper', $content, $this->ci_base_root, 'helpers'); - - // Create helper extension - $exfunc = '_my_extension_func'; - $content = 'ci_vfs_create($this->prefix.$helper.'_helper', $content, $this->ci_app_root, 'helpers'); - - // Load helper - $this->assertInstanceOf('CI_Loader', $this->load->helper($helper)); - $this->assertTrue(function_exists($func), $func.' does not exist'); - $this->assertTrue(function_exists($exfunc), $exfunc.' does not exist'); - - // Create baseless extension - $ext = 'bad_ext'; - $this->ci_vfs_create($this->prefix.$ext.'_helper', '', $this->ci_app_root, 'helpers'); - - // Test bad extension - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested file: helpers/'.$ext.'_helper.php' - ); - $this->load->helper($ext); - } - - // -------------------------------------------------------------------- - - public function test_non_existent_helper() - { - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested file: helpers/bad_helper.php' - ); - $this->load->helper('bad'); - } - - // -------------------------------------------------------------------- - - public function test_loading_multiple_helpers() - { - // Create helpers in VFS - $helpers = array(); - $funcs = array(); - $files = array(); - for ($i = 1; $i <= 3; ++$i) { - $helper = 'test'.$i; - $helpers[] = $helper; - $func = '_my_helper_test_func'.$i; - $funcs[] = $func; - $files[$helper.'_helper'] = 'ci_vfs_create($files, NULL, $this->ci_base_root, 'helpers'); - - // Load helpers - $this->assertInstanceOf('CI_Loader', $this->load->helpers($helpers)); - - // Verify helper existence - foreach ($funcs as $func) { - $this->assertTrue(function_exists($func), $func.' does not exist'); - } - } - - // -------------------------------------------------------------------- - - public function test_language() - { - // Mock lang class and test load call - $file = 'test'; - $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load'))->getMock(); - $lang->expects($this->once())->method('load')->with($file); - $this->ci_instance_var('lang', $lang); - $this->assertInstanceOf('CI_Loader', $this->load->language($file)); - } - - // -------------------------------------------------------------------- - - public function test_packages() - { - // Create model in VFS package path - $dir = 'third-party'; - $lib = 'unit_test_package'; - $class = ucfirst($lib); - $this->ci_vfs_create(ucfirst($lib), 'ci_app_root, array($dir, 'libraries')); - - // Get paths - $paths = $this->load->get_package_paths(TRUE); - - // Test failed load without path - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested class: '.ucfirst($lib) - ); - $this->load->library($lib); - - // Add path and verify - $path = APPPATH.$dir.'/'; - $this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path)); - $this->assertContains($path, $this->load->get_package_paths(TRUE)); - - // Test successful load - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - $this->assertTrue(class_exists($class), $class.' does not exist'); - - // Add another path - $path2 = APPPATH.'another/'; - $this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path2)); - $this->assertContains($path2, $this->load->get_package_paths(TRUE)); - - // Remove last path - $this->assertInstanceOf('CI_Loader', $this->load->remove_package_path()); - $this->assertNotContains($path2, $this->load->get_package_paths(TRUE)); - - // Remove path and verify restored paths - $this->assertInstanceOf('CI_Loader', $this->load->remove_package_path($path)); - $this->assertEquals($paths, $this->load->get_package_paths(TRUE)); - } - - // -------------------------------------------------------------------- - - public function test_remove_package_path() - { - $dir = 'third-party'; - $path = APPPATH.$dir.'/'; - $path2 = APPPATH.'another/'; - $paths = $this->load->get_package_paths(TRUE); - - $this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path)); - $this->assertInstanceOf('CI_Loader', $this->load->remove_package_path($path)); - $this->assertEquals($paths, $this->load->get_package_paths(TRUE)); - - $this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path2)); - $this->assertInstanceOf('CI_Loader', $this->load->remove_package_path()); - $this->assertNotContains($path2, $this->load->get_package_paths(TRUE)); - } - - // -------------------------------------------------------------------- - - public function test_load_config() - { - $cfg = 'someconfig'; - $this->assertTrue($this->load->config($cfg, FALSE)); - $this->assertContains($cfg, $this->ci_obj->config->loaded); - } - - // -------------------------------------------------------------------- - - public function test_initialize() - { - // Create helper in VFS - $helper = 'autohelp'; - $hlp_func = '_autohelp_test_func'; - $content = 'ci_vfs_create($helper.'_helper', $content, $this->ci_app_root, 'helpers'); - - // Create library in VFS - $lib = 'autolib'; - $lib_class = 'CI_'.ucfirst($lib); - $this->ci_vfs_create(ucfirst($lib), 'ci_base_root, 'libraries'); - - // Create driver in VFS - $drv = 'autodrv'; - $subdir = ucfirst($drv); - $drv_class = 'CI_'.$subdir; - $this->ci_vfs_create(ucfirst($drv), 'ci_base_root, array('libraries', $subdir)); - - // Create model in VFS package path - $dir = 'testdir'; - $path = APPPATH.$dir.'/'; - $model = 'Automod'; - $this->ci_vfs_create($model, 'ci_app_root, array($dir, 'models')); - - // Create autoloader config - $cfg = array( - 'packages' => array($path), - 'helper' => array($helper), - 'libraries' => array($lib), - 'drivers' => array($drv), - 'model' => array($model), - 'config' => array('config1', 'config2') - ); - $this->ci_vfs_create('autoload', 'ci_app_root, 'config'); - - $this->load->initialize(); - - // Verify path - $this->assertContains($path, $this->load->get_package_paths()); - - // Verify helper - $this->assertTrue(function_exists($hlp_func), $hlp_func.' does not exist'); - - // Verify library - $this->assertTrue(class_exists($lib_class), $lib_class.' does not exist'); - $this->assertAttributeInstanceOf($lib_class, $lib, $this->ci_obj); - - // Verify driver - $this->assertTrue(class_exists($drv_class), $drv_class.' does not exist'); - $this->assertAttributeInstanceOf($drv_class, $drv, $this->ci_obj); - - // Verify model - $this->assertTrue(class_exists($model), $model.' does not exist'); - $this->assertAttributeInstanceOf($model, $model, $this->ci_obj); - - // Verify config calls - $this->assertEquals($cfg['config'], $this->ci_obj->config->loaded); - } -} diff --git a/tests/codeigniter/core/Log_test.php b/tests/codeigniter/core/Log_test.php deleted file mode 100644 index 103af342b..000000000 --- a/tests/codeigniter/core/Log_test.php +++ /dev/null @@ -1,63 +0,0 @@ -setAccessible(TRUE); - $threshold = new ReflectionProperty('CI_Log', '_threshold'); - $threshold->setAccessible(TRUE); - $date_fmt = new ReflectionProperty('CI_Log', '_date_fmt'); - $date_fmt->setAccessible(TRUE); - $file_ext = new ReflectionProperty('CI_Log', '_file_ext'); - $file_ext->setAccessible(TRUE); - $file_perms = new ReflectionProperty('CI_Log', '_file_permissions'); - $file_perms->setAccessible(TRUE); - $enabled = new ReflectionProperty('CI_Log', '_enabled'); - $enabled->setAccessible(TRUE); - - $this->ci_set_config('log_path', '/root/'); - $this->ci_set_config('log_threshold', 'z'); - $this->ci_set_config('log_date_format', 'd.m.Y'); - $this->ci_set_config('log_file_extension', ''); - $this->ci_set_config('log_file_permissions', ''); - $instance = new CI_Log(); - - $this->assertEquals($path->getValue($instance), '/root/'); - $this->assertEquals($threshold->getValue($instance), 1); - $this->assertEquals($date_fmt->getValue($instance), 'd.m.Y'); - $this->assertEquals($file_ext->getValue($instance), 'php'); - $this->assertEquals($file_perms->getValue($instance), 0644); - $this->assertFalse($enabled->getValue($instance)); - - $this->ci_set_config('log_path', ''); - $this->ci_set_config('log_threshold', '0'); - $this->ci_set_config('log_date_format', ''); - $this->ci_set_config('log_file_extension', '.log'); - $this->ci_set_config('log_file_permissions', 0600); - $instance = new CI_Log(); - - $this->assertEquals($path->getValue($instance), APPPATH.'logs/'); - $this->assertEquals($threshold->getValue($instance), 0); - $this->assertEquals($date_fmt->getValue($instance), 'Y-m-d H:i:s'); - $this->assertEquals($file_ext->getValue($instance), 'log'); - $this->assertEquals($file_perms->getValue($instance), 0600); - $this->assertEquals($enabled->getValue($instance), TRUE); - } - - // -------------------------------------------------------------------- - - public function test_format_line() - { - $this->ci_set_config('log_path', ''); - $this->ci_set_config('log_threshold', 0); - $instance = new CI_Log(); - - $format_line = new ReflectionMethod($instance, '_format_line'); - $format_line->setAccessible(TRUE); - $this->assertEquals( - $format_line->invoke($instance, 'LEVEL', 'Timestamp', 'Message'), - "LEVEL - Timestamp --> Message\n" - ); - } -} diff --git a/tests/codeigniter/core/Model_test.php b/tests/codeigniter/core/Model_test.php deleted file mode 100644 index 80dc97b3b..000000000 --- a/tests/codeigniter/core/Model_test.php +++ /dev/null @@ -1,37 +0,0 @@ -ci_core_class('loader'); - $this->load = new $loader(); - $this->ci_obj = $this->ci_instance(); - $this->ci_set_core_class('model', 'CI_Model'); - - $model_code =<<ci_vfs_create('Test_model', $model_code, $this->ci_app_root, 'models'); - $this->load->model('test_model'); - } - - // -------------------------------------------------------------------- - - public function test__get() - { - $this->assertEquals('foo', $this->ci_obj->test_model->property); - - $this->ci_obj->controller_property = 'bar'; - $this->assertEquals('bar', $this->ci_obj->test_model->controller_property); - } - -} \ No newline at end of file diff --git a/tests/codeigniter/core/Output_test.php b/tests/codeigniter/core/Output_test.php deleted file mode 100644 index 887c077d7..000000000 --- a/tests/codeigniter/core/Output_test.php +++ /dev/null @@ -1,63 +0,0 @@ -_output_data =<< - - Basic HTML - - - Test - - -HTML; - $this->ci_set_config('charset', 'UTF-8'); - $output = $this->ci_core_class('output'); - $this->output = new $output(); - } - - // -------------------------------------------------------------------- - - public function test_set_get_append_output() - { - $append = "\n"; - - $this->assertEquals( - $this->_output_data.$append, - $this->output - ->set_output($this->_output_data) - ->append_output("\n") - ->get_output() - ); - } - - // -------------------------------------------------------------------- - - public function test_get_content_type() - { - $this->assertEquals('text/html', $this->output->get_content_type()); - } - - // -------------------------------------------------------------------- - - public function test_get_header() - { - $this->assertNull($this->output->get_header('Non-Existent-Header')); - - // TODO: Find a way to test header() values as well. Currently, - // PHPUnit prevents this by not using output buffering. - - $this->output->set_content_type('text/plain', 'WINDOWS-1251'); - $this->assertEquals( - 'text/plain; charset=WINDOWS-1251', - $this->output->get_header('content-type') - ); - } - -} diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php deleted file mode 100644 index c3113adba..000000000 --- a/tests/codeigniter/core/Security_test.php +++ /dev/null @@ -1,353 +0,0 @@ -ci_set_config('csrf_protection', TRUE); - $this->ci_set_config('csrf_token_name', 'ci_csrf_token'); - $this->ci_set_config('csrf_cookie_name', 'ci_csrf_cookie'); - - $this->security = new Mock_Core_Security(); - } - - // -------------------------------------------------------------------- - - public function test_csrf_verify() - { - $_SERVER['REQUEST_METHOD'] = 'GET'; - - $this->assertInstanceOf('CI_Security', $this->security->csrf_verify()); - } - - // -------------------------------------------------------------------- - - public function test_csrf_verify_invalid() - { - // Without issuing $_POST[csrf_token_name], this request will triggering CSRF error - $_SERVER['REQUEST_METHOD'] = 'POST'; - - $this->setExpectedException('RuntimeException', 'CI Error: The action you have requested is not allowed'); - - $this->security->csrf_verify(); - } - - // -------------------------------------------------------------------- - - public function test_csrf_verify_valid() - { - $_SERVER['REQUEST_METHOD'] = 'POST'; - $_POST[$this->security->csrf_token_name] = $this->security->csrf_hash; - - $this->assertInstanceOf('CI_Security', $this->security->csrf_verify()); - } - - // -------------------------------------------------------------------- - - public function test_get_csrf_hash() - { - $this->assertEquals($this->security->csrf_hash, $this->security->get_csrf_hash()); - } - - // -------------------------------------------------------------------- - - public function test_get_csrf_token_name() - { - $this->assertEquals('ci_csrf_token', $this->security->get_csrf_token_name()); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean() - { - $harm_string = "Hello, i try to your site"; - - $harmless_string = $this->security->xss_clean($harm_string); - - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $harmless_string); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_string_array() - { - $harm_strings = array( - "Hello, i try to your site", - "Simple clean string", - "Hello, i try to your site" - ); - - $harmless_strings = $this->security->xss_clean($harm_strings); - - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $harmless_strings[0]); - $this->assertEquals("Simple clean string", $harmless_strings[1]); - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $harmless_strings[2]); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_image_valid() - { - $harm_string = ''; - - $xss_clean_return = $this->security->xss_clean($harm_string, TRUE); - -// $this->assertTrue($xss_clean_return); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_image_invalid() - { - $harm_string = ''; - - $xss_clean_return = $this->security->xss_clean($harm_string, TRUE); - - $this->assertFalse($xss_clean_return); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_entity_double_encoded() - { - $input = 'Clickhere'; - $this->assertEquals('Clickhere', $this->security->xss_clean($input)); - } - - // -------------------------------------------------------------------- - - public function text_xss_clean_js_link_removal() - { - // This one is to prevent a false positive - $this->assertEquals( - "", - $this->security->xss_clean("") - ); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_js_img_removal() - { - $input = 'Clickhere'; - $this->assertEquals('', $this->security->xss_clean($input)); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_sanitize_naughty_html_tags() - { - $this->assertEquals('<unclosedTag', $this->security->xss_clean('assertEquals('<blink>', $this->security->xss_clean('')); - $this->assertEquals('', $this->security->xss_clean('')); - - $this->assertEquals( - ' src="x">', - $this->security->xss_clean(' src="x">') - ); - - $this->assertEquals( - 'on=">"x onerror="alert(1)">', - $this->security->xss_clean('on=">"x onerror="alert(1)">') - ); - - $this->assertEquals( - "\n><!-\n