summaryrefslogtreecommitdiffstats
path: root/system/database/DB_utility.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-11 21:05:40 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-11 21:05:40 +0200
commit5d28176a76355b230f1c4e1858475def4e34fa4c (patch)
tree16f5a1cf6846928d23cba3a9192e7091fff04bdc /system/database/DB_utility.php
parente6302791d229e42c8fc42a3982a10eb63508197f (diff)
Fix issue #1264
Diffstat (limited to 'system/database/DB_utility.php')
-rw-r--r--system/database/DB_utility.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 02c921834..6a3b40779 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -35,7 +35,6 @@
abstract class CI_DB_utility extends CI_DB_forge {
public $db;
- public $data_cache = array();
// Platform specific SQL strings
// Just setting those defaults to FALSE as they are mostly MySQL-specific
@@ -60,29 +59,29 @@ abstract class CI_DB_utility extends CI_DB_forge {
public function list_databases()
{
// Is there a cached result?
- if (isset($this->data_cache['db_names']))
+ if (isset($this->db->data_cache['db_names']))
{
- return $this->data_cache['db_names'];
+ return $this->db->data_cache['db_names'];
}
elseif ($this->_list_databases === FALSE)
{
return ($this->db->db_debug) ? $this->db->display_error('db_unsuported_feature') : FALSE;
}
- $this->data_cache['db_names'] = array();
+ $this->db->data_cache['db_names'] = array();
$query = $this->db->query($this->_list_databases);
if ($query === FALSE)
{
- return $this->data_cache['db_names'];
+ return $this->db->data_cache['db_names'];
}
for ($i = 0, $c = count($query); $i < $c; $i++)
{
- $this->data_cache['db_names'] = current($query[$i]);
+ $this->db->data_cache['db_names'] = current($query[$i]);
}
- return $this->data_cache['db_names'];
+ return $this->db->data_cache['db_names'];
}
// --------------------------------------------------------------------