summaryrefslogtreecommitdiffstats
path: root/system/database/DB_forge.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/DB_forge.php')
-rw-r--r--system/database/DB_forge.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index 2b9fb169a..34140c6e0 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -40,7 +40,7 @@ abstract class CI_DB_forge {
*
* @var object
*/
- public $db;
+ protected $db;
/**
* Fields data
@@ -150,13 +150,12 @@ abstract class CI_DB_forge {
/**
* Class constructor
*
+ * @param object &$db Database object
* @return void
*/
- public function __construct()
+ public function __construct(&$db)
{
- // Assign the main database object to $this->db
- $CI =& get_instance();
- $this->db =& $CI->db;
+ $this->db =& $db;
log_message('debug', 'Database Forge Class Initialized');
}