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