equal
deleted
inserted
replaced
152 |
152 |
153 // The first thing we need to do is start the database connection. At this point, for all we know, Enano might not |
153 // The first thing we need to do is start the database connection. At this point, for all we know, Enano might not |
154 // even be installed. If this connection attempt fails and it's because of a missing or corrupt config file, the |
154 // even be installed. If this connection attempt fails and it's because of a missing or corrupt config file, the |
155 // user will be redirected (intelligently) to install.php. |
155 // user will be redirected (intelligently) to install.php. |
156 |
156 |
157 @include(ENANO_ROOT . '/config.php'); |
157 $config_file = ( defined('IN_ENANO_INSTALL') ) ? '/config.new.php' : '/config.php'; |
|
158 @include(ENANO_ROOT . $config_file); |
158 unset($dbuser, $dbpasswd); |
159 unset($dbuser, $dbpasswd); |
159 if ( !isset($dbdriver) ) |
160 if ( !isset($dbdriver) ) |
160 $dbdriver = 'mysql'; |
161 $dbdriver = 'mysql'; |
161 |
162 |
162 $db = new $dbdriver(); |
163 $db = new $dbdriver(); |