summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml5
-rw-r--r--system/core/Output.php4
-rw-r--r--system/database/DB_driver.php2
-rw-r--r--system/helpers/directory_helper.php2
-rw-r--r--tests/codeigniter/helpers/directory_helper_test.php4
-rw-r--r--tests/travis/mysql.phpunit.xml2
-rw-r--r--tests/travis/pdo/mysql.phpunit.xml2
-rw-r--r--tests/travis/pdo/pgsql.phpunit.xml2
-rw-r--r--tests/travis/pdo/sqlite.phpunit.xml2
-rw-r--r--tests/travis/pgsql.phpunit.xml2
-rw-r--r--tests/travis/sqlite.phpunit.xml2
-rw-r--r--user_guide_src/source/changelog.rst11
-rw-r--r--user_guide_src/source/general/reserved_names.rst2
13 files changed, 25 insertions, 17 deletions
diff --git a/.travis.yml b/.travis.yml
index 2496def0b..62acf05e5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,6 +3,11 @@ language: php
php:
- 5.3
- 5.4
+
+services:
+ - mysql
+ - postgresql
+ - sqlite
env:
- DB=mysql
diff --git a/system/core/Output.php b/system/core/Output.php
index 9842f834d..052367ed6 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -552,13 +552,13 @@ class CI_Output {
fclose($fp);
// Strip out the embedded timestamp
- if ( ! preg_match('/\d+TS--->/', $cache, $match))
+ if ( ! preg_match('/^(\d+)TS--->/', $cache, $match))
{
return FALSE;
}
$last_modified = filemtime($cache_path);
- $expire = str_replace('TS--->', '', $match[0]);
+ $expire = $match[1];
// Has the file expired?
if ($_SERVER['REQUEST_TIME'] >= $expire && is_really_writable($cache_path))
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 9628e9a9e..e61af91b7 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1353,7 +1353,7 @@ abstract class CI_DB_driver {
$trace = debug_backtrace();
foreach ($trace as $call)
{
- if (isset($call['file']) && strpos($call['file'], BASEPATH.'database') === FALSE && isset($call['class']) && strpos($call['class'], 'Loader') !== FALSE)
+ if (isset($call['file'], $call['class']) && strpos($call['file'], BASEPATH.'database') === FALSE && strpos($call['class'], 'Loader') !== FALSE)
{
// Found it - use a relative path for safety
$message[] = 'Filename: '.str_replace(array(APPPATH, BASEPATH), '', $call['file']);
diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php
index e7d3b5e8a..7d6b6770e 100644
--- a/system/helpers/directory_helper.php
+++ b/system/helpers/directory_helper.php
@@ -62,7 +62,7 @@ if ( ! function_exists('directory_map'))
while (FALSE !== ($file = readdir($fp)))
{
// Remove '.', '..', and hidden files [optional]
- if ( ! trim($file, '.') OR ($hidden === FALSE && $file[0] === '.'))
+ if ($file === '.' OR $file === '..' OR ($hidden === FALSE && $file[0] === '.'))
{
continue;
}
diff --git a/tests/codeigniter/helpers/directory_helper_test.php b/tests/codeigniter/helpers/directory_helper_test.php
index 176ff1d78..c39ccd8d0 100644
--- a/tests/codeigniter/helpers/directory_helper_test.php
+++ b/tests/codeigniter/helpers/directory_helper_test.php
@@ -19,6 +19,7 @@ class Directory_helper_test extends CI_TestCase {
'benchmark.html' => '',
'database' => array('active_record.html' => '', 'binds.html' => ''),
'email.html' => '',
+ '0' => '',
'.hiddenfile.txt' => ''
)
);
@@ -30,7 +31,8 @@ class Directory_helper_test extends CI_TestCase {
'libraries' => array(
'benchmark.html',
'database' => array('active_record.html', 'binds.html'),
- 'email.html'
+ 'email.html',
+ '0'
)
);
diff --git a/tests/travis/mysql.phpunit.xml b/tests/travis/mysql.phpunit.xml
index 38c8eba48..06d4a011b 100644
--- a/tests/travis/mysql.phpunit.xml
+++ b/tests/travis/mysql.phpunit.xml
@@ -18,7 +18,7 @@
</testsuite>
</testsuites>
<filter>
- <whitelist addUncoveredFilesFromWhitelist="true">
+ <whitelist addUncoveredFilesFromWhitelist="false">
<directory suffix=".php">../../system</directory>
</whitelist>
</filter>
diff --git a/tests/travis/pdo/mysql.phpunit.xml b/tests/travis/pdo/mysql.phpunit.xml
index c3113a66f..7121edc45 100644
--- a/tests/travis/pdo/mysql.phpunit.xml
+++ b/tests/travis/pdo/mysql.phpunit.xml
@@ -18,7 +18,7 @@
</testsuite>
</testsuites>
<filter>
- <whitelist addUncoveredFilesFromWhitelist="true">
+ <whitelist addUncoveredFilesFromWhitelist="false">
<directory suffix=".php">../../../system</directory>
</whitelist>
</filter>
diff --git a/tests/travis/pdo/pgsql.phpunit.xml b/tests/travis/pdo/pgsql.phpunit.xml
index 232025523..df3ff986e 100644
--- a/tests/travis/pdo/pgsql.phpunit.xml
+++ b/tests/travis/pdo/pgsql.phpunit.xml
@@ -18,7 +18,7 @@
</testsuite>
</testsuites>
<filter>
- <whitelist addUncoveredFilesFromWhitelist="true">
+ <whitelist addUncoveredFilesFromWhitelist="false">
<directory suffix=".php">../../../system</directory>
</whitelist>
</filter>
diff --git a/tests/travis/pdo/sqlite.phpunit.xml b/tests/travis/pdo/sqlite.phpunit.xml
index 3d1256721..7d867f6d1 100644
--- a/tests/travis/pdo/sqlite.phpunit.xml
+++ b/tests/travis/pdo/sqlite.phpunit.xml
@@ -18,7 +18,7 @@
</testsuite>
</testsuites>
<filter>
- <whitelist addUncoveredFilesFromWhitelist="true">
+ <whitelist addUncoveredFilesFromWhitelist="false">
<directory suffix=".php">../../../system</directory>
</whitelist>
</filter>
diff --git a/tests/travis/pgsql.phpunit.xml b/tests/travis/pgsql.phpunit.xml
index 51e433d76..bfddbf6b5 100644
--- a/tests/travis/pgsql.phpunit.xml
+++ b/tests/travis/pgsql.phpunit.xml
@@ -18,7 +18,7 @@
</testsuite>
</testsuites>
<filter>
- <whitelist addUncoveredFilesFromWhitelist="true">
+ <whitelist addUncoveredFilesFromWhitelist="false">
<directory suffix=".php">../../system</directory>
</whitelist>
</filter>
diff --git a/tests/travis/sqlite.phpunit.xml b/tests/travis/sqlite.phpunit.xml
index 701165734..75c946aee 100644
--- a/tests/travis/sqlite.phpunit.xml
+++ b/tests/travis/sqlite.phpunit.xml
@@ -18,7 +18,7 @@
</testsuite>
</testsuites>
<filter>
- <whitelist addUncoveredFilesFromWhitelist="true">
+ <whitelist addUncoveredFilesFromWhitelist="false">
<directory suffix=".php">../../system</directory>
</whitelist>
</filter>
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index ed1b33835..73d9fb0ec 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -51,8 +51,8 @@ Release Date: Not Released
- Changed detection of ``$view_folder`` so that if it's not found in the current path, it will now also be searched for under the application folder.
- Path constants BASEPATH, APPPATH and VIEWPATH are now (internally) defined as absolute paths.
- Updated email validation methods to use ``filter_var()`` instead of PCRE.
- - Changed environment defaults to report all errors in 'development' and only fatal ones in 'testing' and 'production' but only display them in 'development'.
- - Updated ip_address lengths from 16 to 45 for supporting ipv6 address on trackback library and captcha helper.
+ - Changed environment defaults to report all errors in *development* and only fatal ones in *testing*, *production* but only display them in *development*.
+ - Updated *ip_address* database field lengths from 16 to 45 for supporting IPv6 address on :doc:`Trackback Library <libraries/trackback>` and :doc:`Captcha Helper <helpers/captcha_helper>`.
- Helpers
@@ -145,7 +145,7 @@ Release Date: Not Released
- Added capability for packages to hold database.php config files
- Added subdrivers support (currently only used by PDO).
- Added client compression support for MySQL and MySQLi.
- - Removed Loader class from Database error to better find the likely culprit.
+ - Removed :doc:`Loader Class <libraries/loader>` from Database error to better find the likely culprit.
- Libraries
@@ -202,7 +202,7 @@ Release Date: Not Released
- Added support for setting custom attributes.
- Deprecated usage of the "anchor_class" setting (use the new "attributes" setting instead).
- Added $config['reuse_query_string'] to allow automatic repopulation of query string arguments, combined with normal URI segments.
- - Removed the default ``&nbsp;`` from a number of the configuration variables.
+ - Removed the default ``&nbsp;`` from a number of the configuration variables.
- Added the ability to use a proxy with the :doc:`XML-RPC Library <libraries/xmlrpc>`.
- Core
@@ -341,7 +341,8 @@ Bug fixes for 3.0
- Fixed a bug (#1613) - :doc:`Form Helper <helpers/form_helper>` functions ``form_multiselect()``, ``form_dropdown()`` didn't properly handle empty array option groups.
- Fixed a bug (#1605) - :doc:`Pagination Library <libraries/pagination>` produced incorrect *previous* and *next* link values.
- Fixed a bug in SQLSRV's ``affected_rows()`` method where an erroneous function name was used.
-- Fixed a bug (#1000) - Change syntax of $view_file to $_ci_view_file to prevent being overwritten by application.
+- Fixed a bug (#1000) - Change syntax of ``$view_file`` to ``$_ci_view_file`` to prevent being overwritten by application.
+- Fixed a bug (#1757) - :doc:`Directory Helper <helpers/directory_helper>` function ``directory_map()`` was skipping files and directories named *0*.
Version 2.1.2
=============
diff --git a/user_guide_src/source/general/reserved_names.rst b/user_guide_src/source/general/reserved_names.rst
index 5ce7fc2ff..3354375c5 100644
--- a/user_guide_src/source/general/reserved_names.rst
+++ b/user_guide_src/source/general/reserved_names.rst
@@ -45,11 +45,11 @@ Constants
---------
- ENVIRONMENT
-- EXT
- FCPATH
- SELF
- BASEPATH
- APPPATH
+- VIEWPATH
- CI_VERSION
- FILE_READ_MODE
- FILE_WRITE_MODE