summaryrefslogtreecommitdiffstats
path: root/system/libraries/Controller.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-26 10:13:06 +0200
committeradmin <devnull@localhost>2006-09-26 10:13:06 +0200
commit6e00bab0ecfbbdd35d135a297d54a4989a44e500 (patch)
tree407afc6eeac98d04b62c72c40a2540b3c3857681 /system/libraries/Controller.php
parent954246e23f7bc01d0c8d7b72e81e9ea4b376fd0c (diff)
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