summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-05-21 00:10:36 +0200
committerAndrey Andreev <narf@devilix.net>2015-05-21 00:10:36 +0200
commitb8cd5e657363795f127ae5e02e69972627b3fe9c (patch)
tree2c815ed41ecb857f3b2b5e7ae49fde6bef48cb86
parent3a1975956dfd99dd2cab05e530c8aecb0984b4a9 (diff)
Fix a bug in the CSV export DB utility
Reported via the forums: http://forum.codeigniter.com/thread-61810.html
-rw-r--r--system/database/DB_utility.php4
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 3 insertions, 2 deletions
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 57356ac53..78398ea83 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -249,7 +249,7 @@ abstract class CI_DB_utility {
$out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $name).$enclosure.$delim;
}
- $out = substr(rtrim($out), 0, -strlen($delim)).$newline;
+ $out = substr($out, 0, -strlen($delim)).$newline;
// Next blast through the result array and build out the rows
while ($row = $query->unbuffered_row('array'))
@@ -258,7 +258,7 @@ abstract class CI_DB_utility {
{
$out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $item).$enclosure.$delim;
}
- $out = substr(rtrim($out), 0, -strlen($delim)).$newline;
+ $out = substr($out, 0, -strlen($delim)).$newline;
}
return $out;
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 15be738d6..5c2c4d944 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -29,6 +29,7 @@ Bug fixes for 3.0.1
- Fixed a bug (#3823) - :doc:`Session Library <libraries/sessions>` drivers Redis and Memcached didn't properly handle locks that are blocking the request for more than 30 seconds.
- Fixed a bug (#3846) - :doc:`Image Manipulation Library <libraries/image_lib>` method `image_mirror_gd()` didn't properly initialize its variables.
- Fixed a bug (#3854) - `field_data()` didn't work properly with the Oracle (OCI8) database driver.
+- Fixed a bug in the :doc:`Database Utility Class <database/utilities>` method ``csv_from_result()`` didn't work with a whitespace CSV delimiter.
Version 3.0.0
=============