Skip to content

Commit

Permalink
Fix #275 -- regression in db::_compile_select(). Thanks @patwork for …
Browse files Browse the repository at this point in the history
…the patch
  • Loading branch information
gaker committed May 6, 2011
1 parent 02958b5 commit 2e1837a
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions system/database/DB_active_rec.php
Expand Up @@ -60,7 +60,7 @@ class CI_DB_active_record extends CI_DB_driver {
var $ar_cache_set = array(); var $ar_cache_set = array();


var $ar_no_escape = array(); var $ar_no_escape = array();

var $ar_cache_no_escape = array();


// -------------------------------------------------------------------- // --------------------------------------------------------------------


Expand Down Expand Up @@ -93,6 +93,7 @@ function select($select = '*', $escape = NULL)
{ {
$this->ar_cache_select[] = $val; $this->ar_cache_select[] = $val;
$this->ar_cache_exists[] = 'select'; $this->ar_cache_exists[] = 'select';
$this->ar_cache_no_escape[] = $escape;
} }
} }
} }
Expand Down Expand Up @@ -1933,16 +1934,17 @@ function flush_cache()
{ {
$this->_reset_run( $this->_reset_run(
array( array(
'ar_cache_select' => array(), 'ar_cache_select' => array(),
'ar_cache_from' => array(), 'ar_cache_from' => array(),
'ar_cache_join' => array(), 'ar_cache_join' => array(),
'ar_cache_where' => array(), 'ar_cache_where' => array(),
'ar_cache_like' => array(), 'ar_cache_like' => array(),
'ar_cache_groupby' => array(), 'ar_cache_groupby' => array(),
'ar_cache_having' => array(), 'ar_cache_having' => array(),
'ar_cache_orderby' => array(), 'ar_cache_orderby' => array(),
'ar_cache_set' => array(), 'ar_cache_set' => array(),
'ar_cache_exists' => array() 'ar_cache_exists' => array(),
'ar_cache_no_escape' => array()
) )
); );
} }
Expand Down Expand Up @@ -1984,6 +1986,8 @@ function _merge_cache()
{ {
$this->_track_aliases($this->ar_from); $this->_track_aliases($this->ar_from);
} }

$this->ar_no_escape = $this->ar_cache_no_escape;
} }


// -------------------------------------------------------------------- // --------------------------------------------------------------------
Expand Down

0 comments on commit 2e1837a

Please sign in to comment.