diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php
index 74b233e..9d858e6 100644
--- a/system/libraries/Controller.php
+++ b/system/libraries/Controller.php
@@ -301,9 +301,18 @@
}
+ $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 @@
// --------------------------------------------------------------------
/**
+ * 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