summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-17 22:55:18 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-17 22:55:18 +0100
commiteae17d19fa32847f2b5a0a1b195f912dc8386ecf (patch)
tree627a3a94f64d78ae5bdcd1c6a0785fc7fce87aff /system/database
parentbe18b9637d8a2c35e4044defc6ce1acaa21dc303 (diff)
Fix issues #751 and #2004
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_query_builder.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 00294c3df..3154d148b 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -2513,8 +2513,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
{
continue;
}
-
- $this->$qb_variable = array_unique(array_merge($this->$qb_cache_var, $this->$qb_variable));
+ $this->$qb_variable = array_merge($this->$qb_variable, array_diff($this->$qb_cache_var, $this->$qb_variable));
}
// If we are "protecting identifiers" we need to examine the "from"
@@ -2524,7 +2523,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
$this->_track_aliases($this->qb_from);
}
- $this->qb_no_escape = $this->qb_cache_no_escape;
+ $this->qb_no_escape = array_merge($this->qb_no_escape, array_diff($this->qb_cache_no_escape, $this->qb_no_escape));
}
// --------------------------------------------------------------------