summaryrefslogtreecommitdiffstats
path: root/system/libraries/Controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Controller.php')
-rw-r--r--system/libraries/Controller.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php
index 74b233ef3..9d858e6c2 100644
--- a/system/libraries/Controller.php
+++ b/system/libraries/Controller.php
@@ -301,9 +301,18 @@ class Controller extends CI_Base {
}
+ $exceptions = array('dbutil', 'dbexport');
+
foreach ($autoload['libraries'] as $item)
{
- $this->_ci_init_class($item);
+ if ( ! in_array($item, $exceptions))
+ {
+ $this->_ci_init_class($item);
+ }
+ else
+ {
+ $this->_ci_init_dbextra($item);
+ }
}
unset($autoload['libraries']);
@@ -453,6 +462,23 @@ class Controller extends CI_Base {
// --------------------------------------------------------------------
/**
+ * Initialize Database Ancillary Classes
+ *
+ * @access private
+ * @param str class name
+ * @return void
+ */
+ function _ci_init_dbextra($class)
+ {
+ $map = array('dbutil' => 'DB_utility', 'dbexport' => 'DB_export');
+ require_once(BASEPATH.'database/'.$map[$class].EXT);
+
+ $this->init_class('CI_'.$map[$class], $class);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Returns TRUE if a class is loaded, FALSE if not
*
* @access public