From c3a4a8d973b9c0a7cc935d150b8b1c6898037c45 Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Mon, 14 Feb 2011 13:40:08 -0500 Subject: Whitespace cleanup in db classes --- system/database/DB_active_rec.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/database/DB_active_rec.php') diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index ce9d1c1af..06ec3cd95 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -1167,7 +1167,7 @@ class CI_DB_active_record extends CI_DB_driver { { $clean = array(); - foreach($row as $value) + foreach ($row as $value) { $clean[] = $this->escape($value); } @@ -1425,7 +1425,7 @@ class CI_DB_active_record extends CI_DB_driver { $index_set = FALSE; $clean = array(); - foreach($v as $k2 => $v2) + foreach ($v as $k2 => $v2) { if ($k2 == $index) { @@ -1569,7 +1569,7 @@ class CI_DB_active_record extends CI_DB_driver { } elseif (is_array($table)) { - foreach($table as $single_table) + foreach ($table as $single_table) { $this->delete($single_table, $where, $limit, FALSE); } -- cgit v1.2.3-24-g4f1b From d0ac1a250608c1fe21f11bb96c4291e38962b187 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Tue, 15 Feb 2011 22:54:08 +0000 Subject: Better potential fix for escaping MySQL keywords with backticks on insert/update. --- system/database/DB_active_rec.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/DB_active_rec.php') diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 06ec3cd95..ee72dbbf4 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -954,7 +954,7 @@ class CI_DB_active_record extends CI_DB_driver { } else { - $this->ar_set[$this->_protect_identifiers($k)] = $this->escape($v); + $this->ar_set[$this->_protect_identifiers($k, FALSE, TRUE)] = $this->escape($v); } } @@ -1156,7 +1156,7 @@ class CI_DB_active_record extends CI_DB_driver { $this->ar_set[] = array(); return; } - + ksort($row); // puts $row in the same order as our keys if ($escape === FALSE) -- cgit v1.2.3-24-g4f1b