From 2410c30c457e108c1f57978df610e82abab0361e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 8 Dec 2015 13:25:19 +0200 Subject: Remove CI_DB_driver::load_rdriver() --- system/database/DB_driver.php | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'system/database/DB_driver.php') diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 25e70ec3f..bc016efbf 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -622,7 +622,6 @@ abstract class CI_DB_driver { // cached query if it exists if ($this->cache_on === TRUE && $return_object === TRUE && $this->_cache_init()) { - $this->load_rdriver(); if (FALSE !== ($cache = $this->CACHE->read($sql))) { return $cache; @@ -710,9 +709,9 @@ abstract class CI_DB_driver { return TRUE; } - // Load and instantiate the result driver - $driver = $this->load_rdriver(); - $RES = new $driver($this); + // Instantiate the driver-specific result class + $driver = 'CI_DB_'.$this->dbdriver.'_result'; + $RES = new $driver($this); // Is query caching enabled? If so, we'll serialize the // result object and save it to a cache file. @@ -741,26 +740,6 @@ abstract class CI_DB_driver { // -------------------------------------------------------------------- - /** - * Load the result drivers - * - * @return string the name of the result class - */ - public function load_rdriver() - { - $driver = 'CI_DB_'.$this->dbdriver.'_result'; - - if ( ! class_exists($driver, FALSE)) - { - require_once(BASEPATH.'database/DB_result.php'); - require_once(BASEPATH.'database/drivers/'.$this->dbdriver.'/'.$this->dbdriver.'_result.php'); - } - - return $driver; - } - - // -------------------------------------------------------------------- - /** * Simple Query * This is a simplified version of the query() function. Internally -- cgit v1.2.3-24-g4f1b