includes/common_cli.php
changeset 1143 e271ae801c62
parent 1099 73abd46f5148
child 1202 5d63267470cd
equal deleted inserted replaced
1142:c522ea3871a3 1143:e271ae801c62
    28 
    28 
    29 // The first thing we need to do is start the database connection. At this point, for all we know, Enano might not
    29 // The first thing we need to do is start the database connection. At this point, for all we know, Enano might not
    30 // even be installed. If this connection attempt fails and it's because of a missing or corrupt config file, the
    30 // even be installed. If this connection attempt fails and it's because of a missing or corrupt config file, the
    31 // user will be redirected (intelligently) to install.php.
    31 // user will be redirected (intelligently) to install.php.
    32 
    32 
    33 $config_file = ( defined('IN_ENANO_INSTALL') ) ? '/config.new.php' : '/config.php';
    33 $config_file = ( defined('IN_ENANO_INSTALL') && !defined('ENANO_INSTALLED') ) ? '/config.new.php' : '/config.php';
    34 @include(ENANO_ROOT . $config_file);
    34 @include(ENANO_ROOT . $config_file);
    35 unset($dbuser, $dbpasswd);
    35 unset($dbuser, $dbpasswd);
    36 if ( !isset($dbdriver) )
    36 if ( !isset($dbdriver) )
    37   $dbdriver = 'mysql';
    37   $dbdriver = 'mysql';
    38 
    38