From a287a34c215903d3452023d74149eb5880125715 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 5 Nov 2012 23:19:59 +0200 Subject: Refactored DB Forge - PDO subdrivers are isolated from each other now. - Added compatibility for pretty much all of the features, for every DB platform. - Unified the way that stuff works in general. - Fixes issue #1005. --- system/core/Loader.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'system/core/Loader.php') diff --git a/system/core/Loader.php b/system/core/Loader.php index 88fbdb6e1..808fa80df 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -392,7 +392,20 @@ class CI_Loader { require_once(BASEPATH.'database/DB_forge.php'); require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_forge.php'); - $class = 'CI_DB_'.$CI->db->dbdriver.'_forge'; + + if ( ! empty($CI->db->subdriver)) + { + $driver_path = BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/subdrivers/'.$CI->db->dbdriver.'_'.$CI->db->subdriver.'_forge.php'; + if (file_exists($driver_path)) + { + require_once($driver_path); + $class = 'CI_DB_'.$CI->db->dbdriver.'_'.$CI->db->subdriver.'_forge'; + } + } + else + { + $class = 'CI_DB_'.$CI->db->dbdriver.'_forge'; + } $CI->dbforge = new $class(); } -- cgit v1.2.3-24-g4f1b