Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 1 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
| 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
| 5 | * An open source application development framework for PHP 4.3.2 or newer |
| 6 | * |
| 7 | * @package CodeIgniter |
| 8 | * @author ExpressionEngine Dev Team |
Derek Jones | 7f3719f | 2010-01-05 13:35:37 +0000 | [diff] [blame] | 9 | * @copyright Copyright (c) 2008 - 2010, EllisLab, Inc. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 10 | * @license http://codeigniter.com/user_guide/license.html |
| 11 | * @link http://codeigniter.com |
| 12 | * @since Version 1.0 |
| 13 | * @filesource |
| 14 | */ |
| 15 | |
| 16 | // ------------------------------------------------------------------------ |
| 17 | |
| 18 | /** |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 19 | * System Initialization File |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 20 | * |
| 21 | * Loads the base classes and executes the request. |
| 22 | * |
| 23 | * @package CodeIgniter |
| 24 | * @subpackage codeigniter |
| 25 | * @category Front-controller |
| 26 | * @author ExpressionEngine Dev Team |
| 27 | * @link http://codeigniter.com/user_guide/ |
| 28 | */ |
| 29 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 30 | /* |
| 31 | * ------------------------------------------------------ |
| 32 | * Define the CodeIgniter Version |
| 33 | * ------------------------------------------------------ |
| 34 | */ |
| 35 | define('CI_VERSION', '2.0'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 36 | |
| 37 | /* |
| 38 | * ------------------------------------------------------ |
| 39 | * Load the global functions |
| 40 | * ------------------------------------------------------ |
| 41 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 42 | require(BASEPATH.'core/Common'.EXT); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 43 | |
| 44 | /* |
| 45 | * ------------------------------------------------------ |
| 46 | * Load the compatibility override functions |
| 47 | * ------------------------------------------------------ |
| 48 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 49 | require(BASEPATH.'core/Compat'.EXT); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 50 | |
| 51 | /* |
| 52 | * ------------------------------------------------------ |
| 53 | * Load the framework constants |
| 54 | * ------------------------------------------------------ |
| 55 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 56 | require(APPPATH.'config/constants'.EXT); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 57 | |
| 58 | /* |
| 59 | * ------------------------------------------------------ |
| 60 | * Define a custom error handler so we can log PHP errors |
| 61 | * ------------------------------------------------------ |
| 62 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 63 | set_error_handler('_exception_handler'); |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 64 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 65 | if ( ! is_php('5.3')) |
| 66 | { |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 67 | @set_magic_quotes_runtime(0); // Kill magic quotes |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 68 | } |
Derek Jones | 962d225 | 2009-08-05 04:26:11 +0000 | [diff] [blame] | 69 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 70 | /* |
| 71 | * ------------------------------------------------------ |
| 72 | * Set the subclass_prefix |
| 73 | * ------------------------------------------------------ |
| 74 | * |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 75 | * Normally the "subclass_prefix" is set in the config file. |
| 76 | * The subclass prefix allows CI to know if a core class is |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 77 | * being extended via a library in the local application |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 78 | * "libraries" folder. Since CI allows config items to be |
| 79 | * overriden via data set in the main index. php file, |
| 80 | * before proceeding we need to know if a subclass_prefix |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 81 | * override exists. If so, we will set this value now, |
| 82 | * before any classes are loaded |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 83 | * Note: Since the config file data is cached it doesn't |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 84 | * hurt to load it here. |
| 85 | */ |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 86 | if (isset($assign_to_config['subclass_prefix']) AND $assign_to_config['subclass_prefix'] != '') |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 87 | { |
| 88 | get_config(array('subclass_prefix' => $assign_to_config['subclass_prefix'])); |
| 89 | } |
Pascal Kriete | f566af5 | 2010-11-09 13:03:26 -0500 | [diff] [blame] | 90 | |
| 91 | /* |
| 92 | * ------------------------------------------------------ |
| 93 | * Set a liberal script execution time limit |
| 94 | * ------------------------------------------------------ |
| 95 | */ |
| 96 | if (function_exists("set_time_limit") == TRUE AND @ini_get("safe_mode") == 0) |
| 97 | { |
| 98 | @set_time_limit(300); |
| 99 | } |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 100 | |
| 101 | /* |
| 102 | * ------------------------------------------------------ |
| 103 | * Start the timer... tick tock tick tock... |
| 104 | * ------------------------------------------------------ |
| 105 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 106 | $BM =& load_class('Benchmark', 'core'); |
| 107 | $BM->mark('total_execution_time_start'); |
| 108 | $BM->mark('loading_time:_base_classes_start'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 109 | |
| 110 | /* |
| 111 | * ------------------------------------------------------ |
| 112 | * Instantiate the hooks class |
| 113 | * ------------------------------------------------------ |
| 114 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 115 | $EXT =& load_class('Hooks', 'core'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 116 | |
| 117 | /* |
| 118 | * ------------------------------------------------------ |
| 119 | * Is there a "pre_system" hook? |
| 120 | * ------------------------------------------------------ |
| 121 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 122 | $EXT->_call_hook('pre_system'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 123 | |
| 124 | /* |
| 125 | * ------------------------------------------------------ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 126 | * Instantiate the config class |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 127 | * ------------------------------------------------------ |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 128 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 129 | $CFG =& load_class('Config', 'core'); |
| 130 | |
| 131 | // Do we have any manually set config items in the index.php file? |
| 132 | if (isset($assign_to_config)) |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 133 | { |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 134 | $CFG->_assign_to_config($assign_to_config); |
| 135 | } |
| 136 | |
| 137 | /* |
| 138 | * ------------------------------------------------------ |
| 139 | * Instantiate the Unicode class |
| 140 | * ------------------------------------------------------ |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 141 | * |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 142 | * Note: Order here is rather important as the Unicode |
| 143 | * class needs to be used very early on, but it cannot |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 144 | * properly determine if UTf-8 can be supported until |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 145 | * after the Config class is instantiated. |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 146 | * |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 147 | */ |
| 148 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 149 | $UNI =& load_class('Unicode', 'core'); |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 150 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 151 | /* |
| 152 | * ------------------------------------------------------ |
| 153 | * Instantiate the URI class |
| 154 | * ------------------------------------------------------ |
| 155 | */ |
| 156 | $URI =& load_class('URI', 'core'); |
| 157 | |
| 158 | /* |
| 159 | * ------------------------------------------------------ |
| 160 | * Instantiate the routing class and set the routing |
| 161 | * ------------------------------------------------------ |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 162 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 163 | $RTR =& load_class('Router', 'core'); |
| 164 | $RTR->_set_routing(); |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 165 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 166 | // Set any routing overrides that may exist in the main index file |
| 167 | if (isset($routing)) |
| 168 | { |
| 169 | $RTR->_set_overrides($routing); |
| 170 | } |
| 171 | |
| 172 | /* |
| 173 | * ------------------------------------------------------ |
| 174 | * Instantiate the output class |
| 175 | * ------------------------------------------------------ |
| 176 | */ |
| 177 | $OUT =& load_class('Output', 'core'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 178 | |
| 179 | /* |
| 180 | * ------------------------------------------------------ |
| 181 | * Is there a valid cache file? If so, we're done... |
| 182 | * ------------------------------------------------------ |
| 183 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 184 | if ($EXT->_call_hook('cache_override') === FALSE) |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 185 | { |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 186 | if ($OUT->_display_cache($CFG, $URI) == TRUE) |
| 187 | { |
| 188 | exit; |
| 189 | } |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 190 | } |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 191 | |
| 192 | /* |
| 193 | * ------------------------------------------------------ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 194 | * Load the Input class and sanitize globals |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 195 | * ------------------------------------------------------ |
| 196 | */ |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 197 | $IN =& load_class('Input', 'core'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 198 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 199 | /* |
| 200 | * ------------------------------------------------------ |
| 201 | * Load the Language class |
| 202 | * ------------------------------------------------------ |
| 203 | */ |
| 204 | $LANG =& load_class('Lang', 'core'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 205 | |
| 206 | /* |
| 207 | * ------------------------------------------------------ |
| 208 | * Load the app controller and local controller |
| 209 | * ------------------------------------------------------ |
| 210 | * |
| 211 | * Note: Due to the poor object handling in PHP 4 we'll |
| 212 | * conditionally load different versions of the base |
| 213 | * class. Retaining PHP 4 compatibility requires a bit of a hack. |
Derek Jones | 1efda7b | 2010-03-02 13:30:20 -0600 | [diff] [blame] | 214 | * @PHP4 |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 215 | * |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 216 | */ |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 217 | if (is_php('5.0.0') == TRUE) |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 218 | { |
| 219 | require(BASEPATH.'core/Base5'.EXT); |
| 220 | } |
| 221 | else |
| 222 | { |
| 223 | // The Loader class needs to be included first when running PHP 4.x |
| 224 | load_class('Loader', 'core'); |
| 225 | require(BASEPATH.'core/Base4'.EXT); |
| 226 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 227 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 228 | // Load the base controller class |
| 229 | require BASEPATH.'core/Controller'.EXT; |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 230 | |
Greg Aker | fa28135 | 2010-03-22 14:41:27 -0500 | [diff] [blame] | 231 | if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller'.EXT)) |
| 232 | { |
| 233 | require APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller'.EXT; |
| 234 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 235 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 236 | // Load the local application controller |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 237 | // Note: The Router class automatically validates the controller path using the router->_validate_request(). |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 238 | // If this include fails it means that the default controller in the Routes.php file is not resolving to something valid. |
| 239 | if ( ! file_exists(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT)) |
| 240 | { |
| 241 | show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.'); |
| 242 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 243 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 244 | include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT); |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 245 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 246 | // Set a mark point for benchmarking |
| 247 | $BM->mark('loading_time:_base_classes_end'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 248 | |
| 249 | /* |
| 250 | * ------------------------------------------------------ |
| 251 | * Security check |
| 252 | * ------------------------------------------------------ |
| 253 | * |
| 254 | * None of the functions in the app controller or the |
| 255 | * loader class can be called via the URI, nor can |
| 256 | * controller functions that begin with an underscore |
| 257 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 258 | $class = $RTR->fetch_class(); |
| 259 | $method = $RTR->fetch_method(); |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 260 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 261 | if ( ! class_exists($class) |
| 262 | OR $method == 'controller' |
| 263 | OR strncmp($method, '_', 1) == 0 |
| 264 | OR in_array(strtolower($method), array_map('strtolower', get_class_methods('Controller'))) |
| 265 | ) |
| 266 | { |
| 267 | show_404("{$class}/{$method}"); |
| 268 | } |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 269 | |
| 270 | /* |
| 271 | * ------------------------------------------------------ |
| 272 | * Is there a "pre_controller" hook? |
| 273 | * ------------------------------------------------------ |
| 274 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 275 | $EXT->_call_hook('pre_controller'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 276 | |
| 277 | /* |
| 278 | * ------------------------------------------------------ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 279 | * Instantiate the requested controller |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 280 | * ------------------------------------------------------ |
| 281 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 282 | // Mark a start point so we can benchmark the controller |
| 283 | $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start'); |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 284 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 285 | $CI = new $class(); |
| 286 | |
| 287 | /* |
| 288 | * ------------------------------------------------------ |
| 289 | * Is there a "post_controller_constructor" hook? |
| 290 | * ------------------------------------------------------ |
| 291 | */ |
| 292 | $EXT->_call_hook('post_controller_constructor'); |
| 293 | |
| 294 | /* |
| 295 | * ------------------------------------------------------ |
| 296 | * Call the requested method |
| 297 | * ------------------------------------------------------ |
| 298 | */ |
| 299 | // Is there a "remap" function? If so, we call it instead |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 300 | if (method_exists($CI, '_remap')) |
| 301 | { |
| 302 | $CI->_remap($method); |
| 303 | } |
| 304 | else |
| 305 | { |
| 306 | // is_callable() returns TRUE on some versions of PHP 5 for private and protected |
| 307 | // methods, so we'll use this workaround for consistent behavior |
| 308 | if ( ! in_array(strtolower($method), array_map('strtolower', get_class_methods($CI)))) |
| 309 | { |
| 310 | show_404("{$class}/{$method}"); |
| 311 | } |
| 312 | |
| 313 | // Call the requested method. |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 314 | // Any URI segments present (besides the class/function) will be passed to the method for convenience |
| 315 | call_user_func_array(array(&$CI, $method), array_slice($URI->rsegments, 2)); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 316 | } |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 317 | |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 318 | |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 319 | // Mark a benchmark end point |
| 320 | $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 321 | |
| 322 | /* |
| 323 | * ------------------------------------------------------ |
| 324 | * Is there a "post_controller" hook? |
| 325 | * ------------------------------------------------------ |
| 326 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 327 | $EXT->_call_hook('post_controller'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 328 | |
| 329 | /* |
| 330 | * ------------------------------------------------------ |
| 331 | * Send the final rendered output to the browser |
| 332 | * ------------------------------------------------------ |
| 333 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 334 | if ($EXT->_call_hook('display_override') === FALSE) |
| 335 | { |
| 336 | $OUT->_display(); |
| 337 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 338 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 339 | /* |
| 340 | * ------------------------------------------------------ |
| 341 | * Is there a "post_system" hook? |
| 342 | * ------------------------------------------------------ |
| 343 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 344 | $EXT->_call_hook('post_system'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 345 | |
| 346 | /* |
| 347 | * ------------------------------------------------------ |
| 348 | * Close the DB connection if one exists |
| 349 | * ------------------------------------------------------ |
| 350 | */ |
Derek Jones | 218876c | 2010-03-02 13:11:00 -0600 | [diff] [blame] | 351 | if (class_exists('CI_DB') AND isset($CI->db)) |
| 352 | { |
| 353 | $CI->db->close(); |
| 354 | } |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 355 | |
| 356 | |
| 357 | /* End of file CodeIgniter.php */ |
Derek Jones | c68dfbf | 2010-03-02 12:59:23 -0600 | [diff] [blame] | 358 | /* Location: ./system/core/CodeIgniter.php */ |