summaryrefslogtreecommitdiffstats
path: root/system/database/DB_utility.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-07 20:56:59 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-07 20:56:59 +0200
commitcd221aba73cb7a117c70ca237f0ee9dc14f80cf1 (patch)
tree39db53d645226c212eb697494320eef6302544a0 /system/database/DB_utility.php
parent1fcce9667fe8d1925a36549e22124411f5828230 (diff)
parent6c776538c4e8f1b932d5ec7431c1c8de8a5642a6 (diff)
Merge upstream branch
Diffstat (limited to 'system/database/DB_utility.php')
-rw-r--r--system/database/DB_utility.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 587dfdc01..02c921834 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -212,7 +212,7 @@ abstract class CI_DB_utility extends CI_DB_forge {
$out = rtrim($out).$newline;
// Next blast through the result array and build out the rows
- foreach ($query->result_array() as $row)
+ while ($row = $query->unbuffered_row('array'))
{
foreach ($row as $item)
{
@@ -258,7 +258,7 @@ abstract class CI_DB_utility extends CI_DB_forge {
// Generate the result
$xml = '<'.$root.'>'.$newline;
- foreach ($query->result_array() as $row)
+ while ($row = $query->unbuffered_row())
{
$xml .= $tab.'<'.$element.'>'.$newline;
foreach ($row as $key => $val)
@@ -343,7 +343,7 @@ abstract class CI_DB_utility extends CI_DB_forge {
if ($prefs['format'] === 'zip')
{
// Set the filename if not provided (only needed with Zip files)
- if ($prefs['filename'] == '')
+ if ($prefs['filename'] === '')
{
$prefs['filename'] = (count($prefs['tables']) === 1 ? $prefs['tables'] : $this->db->database)
.date('Y-m-d_H-i', time()).'.sql';
@@ -369,7 +369,7 @@ abstract class CI_DB_utility extends CI_DB_forge {
$CI->zip->add_data($prefs['filename'], $this->_backup($prefs));
return $CI->zip->get_zip();
}
- elseif ($prefs['format'] == 'txt') // Was a text file requested?
+ elseif ($prefs['format'] === 'txt') // Was a text file requested?
{
return $this->_backup($prefs);
}