diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-07 21:25:16 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-07 21:25:16 +0200 |
commit | 27af930d4ed1daf9f2710b005d103c7f1c7d919d (patch) | |
tree | ffe257a549ae70749dcf4646695a0d73535e237e /system/database/DB_utility.php | |
parent | 87ac4260063e3a62805cc8f6f73cd2eb18da663a (diff) | |
parent | 928b9aa6340654b1dbb69af44c41468456f0b7b6 (diff) |
Merge upstream branch
Diffstat (limited to 'system/database/DB_utility.php')
-rw-r--r-- | system/database/DB_utility.php | 8 |
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); } |